:root {
  --junj-float-accent: #b04035;
  --junj-float-dark: #221815;
  --junj-float-wechat: #2f86eb;
  --junj-float-whatsapp: #25d366;
  --junj-float-size: 56px;
  --junj-float-gap: 14px;
  --junj-float-offset-bottom: 24px;
  --junj-float-offset-right: 24px;
}

.junj-float-bar {
  position: fixed;
  right: var(--junj-float-offset-right);
  bottom: var(--junj-float-offset-bottom);
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--junj-float-gap);
  pointer-events: none;
}

.junj-float-bar > * {
  pointer-events: auto;
}

.junj-float-bar__menu {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--junj-float-gap);
}

.junj-float-bar__menu[hidden] {
  display: none;
}

.junj-float-bar.is-open .junj-float-bar__menu {
  display: flex;
}

.junj-float-bar__fab,
.junj-float-bar__toggle {
  display: grid;
  border:1px solid #ccc;
  place-items: center;
  inline-size: var(--junj-float-size);
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(34, 24, 21, 0.22);
  transition: transform 0.24s ease, box-shadow 0.24s ease, opacity 0.24s ease;
}

.junj-float-bar__fab .iconfont,
.junj-float-bar__toggle .iconfont {
  font-size: 24px;
  line-height: 1;
}

.junj-float-bar__fab:hover,
.junj-float-bar__fab:focus-visible,
.junj-float-bar__toggle:hover,
.junj-float-bar__toggle:focus-visible {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 28px rgba(34, 24, 21, 0.28);
  outline: 0;
}

.junj-float-bar__fab--form {
  background: var(--junj-float-accent);
}

.junj-float-bar__fab--wechat {
  background: var(--junj-float-wechat);
}

.junj-float-bar__fab--whatsapp {
  background: var(--junj-float-whatsapp);
}

.junj-float-bar__fab.is-active {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 12px 28px rgba(34, 24, 21, 0.28);
}

.junj-float-bar__toggle {
  background: var(--junj-float-dark);
}

.junj-float-bar__toggle-icon {
  position: relative;
  inline-size: 18px;
  block-size: 18px;
}

.junj-float-bar__toggle-icon::before,
.junj-float-bar__toggle-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #fff;
  border-radius: 999px;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.junj-float-bar__toggle-icon::before {
  width: 18px;
  height: 2px;
  transform: translate(-50%, -50%);
}

.junj-float-bar__toggle-icon::after {
  width: 2px;
  height: 18px;
  transform: translate(-50%, -50%);
}

.junj-float-bar.is-open .junj-float-bar__toggle-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.junj-float-bar.is-open .junj-float-bar__toggle-icon::after {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.junj-float-bar.is-open .junj-float-bar__fab {
  animation: junjFloatFabIn 0.28s ease both;
}

.junj-float-bar.is-open .junj-float-bar__fab:nth-child(1) {
  animation-delay: 0.04s;
}

.junj-float-bar.is-open .junj-float-bar__fab:nth-child(2) {
  animation-delay: 0.08s;
}

.junj-float-bar.is-open .junj-float-bar__fab:nth-child(3) {
  animation-delay: 0.12s;
}

@keyframes junjFloatFabIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.88);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.junj-float-overlay {
  position: fixed;
  inset: 0;
  z-index: 9991;
  background: rgba(34, 24, 21, 0.48);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.junj-float-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.junj-float-panel {
  position: fixed;
  right: var(--junj-float-offset-right);
  bottom: calc(var(--junj-float-offset-bottom) + var(--junj-float-size) + 16px);
  z-index: 9992;
  width: min(420px, calc(100vw - 48px));
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 48px rgba(34, 24, 21, 0.24);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.32s ease, transform 0.32s ease, visibility 0.32s ease;
}

.junj-float-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.junj-float-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: var(--junj-float-dark);
  color: #fff;
}

.junj-float-panel__header h2,
.junj-float-panel__header .junj-float-panel__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.junj-float-panel__close {
  display: grid;
  place-items: center;
  inline-size: 34px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.24s ease, border-color 0.24s ease;
}

.junj-float-panel__close:hover,
.junj-float-panel__close:focus-visible {
  background: var(--junj-float-accent);
  border-color: var(--junj-float-accent);
  outline: 0;
}

.junj-float-panel__body {
  overflow: auto;
  padding: 20px;
}

.junj-float-panel__body--center {
  display: grid;
  place-items: center;
  min-height: 280px;
}

.junj-float-panel--wechat {
  width: min(320px, calc(100vw - 48px));
}

.junj-float-wechat__qr {
  display: block;
  width: min(100%, 240px);
  height: auto;
  margin-inline: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(34, 24, 21, 0.12);
}

.junj-float-wechat__placeholder {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 24px 12px;
  color: #666;
  text-align: center;
}

.junj-float-wechat__placeholder .iconfont {
  font-size: 42px;
  color: var(--junj-float-accent);
}

.junj-float-panel__body .wpcf7-form label,
.junj-float-panel__body .wpcf7-form p {
  margin-bottom: 12px;
}

.junj-float-panel__body .wpcf7-form input[type="text"],
.junj-float-panel__body .wpcf7-form input[type="email"],
.junj-float-panel__body .wpcf7-form input[type="tel"],
.junj-float-panel__body .wpcf7-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dedbd9;
  border-radius: 10px;
  font-size: 14px;
}

.junj-float-panel__body .wpcf7-form input[type="submit"],
.junj-float-panel__body .wpcf7-form button[type="submit"] {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--junj-float-dark);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.24s ease;
}

.junj-float-panel__body .wpcf7-form input[type="submit"]:hover,
.junj-float-panel__body .wpcf7-form button[type="submit"]:hover {
  background: var(--junj-float-accent);
}

body.junj-float-panel-open {
  overflow: hidden;
}


.junj-mobile-dock {
  display: none;
}
@media (max-width: 767px) {
  :root {
    --junj-float-size: 52px;
    --junj-float-gap: 12px;
    --junj-float-offset-bottom: max(16px, env(safe-area-inset-bottom, 0px) + 12px);
    --junj-float-offset-right: 16px;
    --junj-mobile-dock-height: calc(80px + env(safe-area-inset-bottom, 0px));
  }

  .junj-float-bar {
    display: none;
  }

  .junj-mobile-dock {
    display: flex;
    box-sizing: border-box;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9990;
    width: 100%;
    height: var(--junj-mobile-dock-height);
    min-height: var(--junj-mobile-dock-height);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    align-items: stretch;
    justify-content: space-around;
    gap: 4px;
    background: #fff;
    box-shadow: 0 -8px 24px rgba(34, 24, 21, 0.14);
  }

  .junj-mobile-dock__item {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    padding: 4px 2px;
    border: 0;
    background: transparent;
    color: var(--junj-float-dark);
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .junj-mobile-dock__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    background: var(--junj-float-dark);
  }

  .junj-mobile-dock__icon .iconfont {
    font-size: 20px;
    line-height: 1;
  }

  .junj-mobile-dock__item--form .junj-mobile-dock__icon {
    background: var(--junj-float-accent);
  }

  .junj-mobile-dock__item--wechat .junj-mobile-dock__icon {
    background: var(--junj-float-wechat);
  }

  .junj-mobile-dock__item--whatsapp .junj-mobile-dock__icon {
    background: var(--junj-float-whatsapp);
  }

  .junj-mobile-dock__label {
    max-width: 100%;
    overflow: hidden;
    color: var(--junj-float-dark);
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .junj-mobile-dock__item.is-active .junj-mobile-dock__icon {
    box-shadow: 0 0 0 3px rgba(176, 64, 53, 0.28);
  }

  body:has(.junj-mobile-dock) {
    padding-bottom: var(--junj-mobile-dock-height);
  }

  .junj-float-panel {
    left: 16px;
    right: 16px;
    width: auto;
    bottom: calc(var(--junj-mobile-dock-height) + 12px);
    max-height: calc(100vh - var(--junj-mobile-dock-height) - 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .junj-float-bar__fab,
  .junj-float-bar__toggle,
  .junj-float-bar__toggle-icon::before,
  .junj-float-bar__toggle-icon::after,
  .junj-float-overlay,
  .junj-float-panel,
  .junj-float-bar.is-open .junj-float-bar__fab {
    animation: none;
    transition: none;
  }
}
