/* ========================================================================
   SHARED WHATSAPP ASSISTANT
   Restores the Paan Singgit concierge while constraining the source image.
   This file must load after the page-specific stylesheet.
   ======================================================================== */

body.has-floating-assistant .wa-assistant {
  --wa-concierge-green: #19aa59;
  --wa-concierge-green-dark: #087c3d;
  --wa-concierge-gold: #e7bd6f;
}

body.has-floating-assistant .wa-assistant-launcher {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

body.has-floating-assistant .wa-assistant-toggle {
  position: relative;
  isolation: isolate;
  width: auto !important;
  min-width: 164px !important;
  max-width: none !important;
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  overflow: visible;
  gap: 0 !important;
  padding: 0 20px 0 18px !important;
  border-color: rgba(255, 255, 255, 0.34);
  border-radius: 999px !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), transparent 42%),
    linear-gradient(135deg, var(--wa-concierge-green), var(--wa-concierge-green-dark));
  box-shadow:
    0 17px 38px rgba(5, 91, 42, 0.31),
    0 0 0 1px rgba(231, 189, 111, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

body.has-floating-assistant .wa-assistant-toggle::after {
  position: absolute;
  z-index: -1;
  inset: -5px;
  border: 1px solid rgba(231, 189, 111, 0.28);
  border-radius: inherit;
  box-shadow: 0 0 22px rgba(22, 170, 86, 0.18);
  content: "";
  opacity: 0.78;
  pointer-events: none;
  transition:
    opacity 0.24s ease,
    transform 0.24s ease;
}

body.has-floating-assistant .wa-assistant-toggle:hover::after,
body.has-floating-assistant .wa-assistant-toggle[aria-expanded="true"]::after {
  opacity: 1;
  transform: scale(1.025);
}

body.has-floating-assistant .wa-assistant-toggle > svg,
body.has-floating-assistant .wa-assistant-toggle > span:last-child {
  position: relative;
  z-index: 3;
}

body.has-floating-assistant .wa-assistant-toggle > svg {
  display: block;
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
}

body.has-floating-assistant .wa-assistant-toggle > span:last-child {
  /* Override the legacy page rule that hides the WhatsApp label. */
  display: inline !important;
  margin-left: 8px;
}

body.has-floating-assistant .wa-concierge-peek {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: calc(100% - 7px);
  /*
   * Page-specific stylesheets contain a legacy `display: none !important`
   * rule for the mascot. This shared file is loaded last, so the matching
   * important declaration below restores it on every page.
   */
  display: block !important;
  width: 90px;
  max-width: 90px;
  height: 100px;
  max-height: 100px;
  overflow: hidden;
  border-radius: 0 0 34px 34px;
  filter: drop-shadow(0 13px 16px rgba(19, 5, 8, 0.28));
  pointer-events: none;
  transform: translateX(-50%);
  animation: waConciergeFloat 6.8s ease-in-out infinite;
}

body.has-floating-assistant .wa-concierge-peek::before {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 3px;
  left: 10px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(238, 194, 108, 0.72), transparent);
  box-shadow: 0 0 12px rgba(238, 194, 108, 0.28);
  content: "";
}

body.has-floating-assistant .wa-concierge-peek::after {
  position: absolute;
  z-index: -1;
  bottom: 2px;
  left: 50%;
  width: 50px;
  height: 10px;
  border-radius: 50%;
  background: rgba(6, 80, 40, 0.18);
  content: "";
  filter: blur(7px);
  transform: translateX(-50%);
}

body.has-floating-assistant .wa-concierge-peek img {
  position: absolute;
  bottom: -34px;
  left: 50%;
  display: block !important;
  width: 88px;
  min-width: 0;
  max-width: 88px;
  height: auto;
  max-height: 134px;
  object-fit: contain;
  transform: translateX(-50%);
}

body.has-floating-assistant .wa-assistant-panel {
  bottom: 132px;
  overflow: visible;
  border-color: rgba(231, 189, 111, 0.26);
  border-radius: 22px;
  background:
    radial-gradient(circle at 86% 7%, rgba(231, 189, 111, 0.13), transparent 28%),
    rgba(255, 255, 255, 0.975);
  box-shadow:
    0 34px 84px rgba(31, 6, 10, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.68),
    0 0 36px rgba(19, 153, 77, 0.12);
}

body.has-floating-assistant .wa-assistant-head {
  min-height: 78px;
  padding: 14px 56px 14px 14px;
  border-radius: 21px 21px 0 0;
  background:
    radial-gradient(circle at 92% 0, rgba(255, 255, 255, 0.14), transparent 38%),
    linear-gradient(135deg, #541016 0%, #8f1119 58%, #b61b23 100%);
}

body.has-floating-assistant .wa-assistant-avatar--paan {
  display: grid;
  width: 46px;
  min-width: 46px;
  max-width: 46px;
  height: 46px;
  min-height: 46px;
  max-height: 46px;
  flex: 0 0 46px;
  place-items: center;
  overflow: hidden;
  padding: 2px;
  border: 1px solid rgba(238, 194, 108, 0.62);
  border-radius: 50%;
  background: linear-gradient(145deg, #6f0b12, #26070a);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(30, 4, 8, 0.2);
}

body.has-floating-assistant .wa-assistant-avatar--paan img {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  border-radius: 50%;
  object-fit: contain;
  object-position: center top;
  transform: none;
}

body.has-floating-assistant .wa-assistant-options a {
  border-color: rgba(80, 34, 38, 0.08);
  background: linear-gradient(180deg, #ffffff, #fff9f8);
}

body.has-floating-assistant .wa-assistant-options a:hover,
body.has-floating-assistant .wa-assistant-options a:focus-visible {
  border-color: rgba(25, 170, 89, 0.28);
  background: linear-gradient(180deg, #ffffff, #f4fff8);
  box-shadow: 0 10px 24px rgba(9, 112, 53, 0.08);
}

@keyframes waConciergeFloat {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-4px);
  }
}

@media (min-width: 621px) and (max-width: 980px) {
  body.has-floating-assistant .wa-assistant-panel {
    bottom: 124px;
  }

  body.has-floating-assistant .wa-concierge-peek {
    width: 72px;
    max-width: 72px;
    height: 76px;
    max-height: 76px;
  }

  body.has-floating-assistant .wa-concierge-peek img {
    bottom: -32px;
    width: 82px;
    max-width: 82px;
  }
}

@media (max-width: 620px) {
  body.has-floating-assistant .wa-assistant-toggle {
    width: auto !important;
    min-width: 154px !important;
    max-width: none !important;
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    padding: 0 20px 0 18px !important;
    border-radius: 999px !important;
  }

  body.has-floating-assistant .wa-assistant-toggle > span:last-child {
    display: inline !important;
  }

  body.has-floating-assistant .wa-assistant-toggle > svg {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
    margin: 0;
  }

  body.has-floating-assistant .wa-assistant-panel {
    right: 16px;
    bottom: 106px;
    left: 16px;
    width: auto;
    max-height: calc(100dvh - 130px);
    overflow-y: auto;
  }

  body.has-floating-assistant .wa-concierge-peek {
    bottom: calc(100% - 5px) !important;
    width: 72px !important;
    max-width: 72px !important;
    height: 88px !important;
    max-height: 88px !important;
    overflow: visible !important;
    border-radius: 0 !important;
  }

  body.has-floating-assistant .wa-concierge-peek img {
    bottom: -25px !important;
    width: 72px !important;
    max-width: 72px !important;
    max-height: 110px !important;
  }

  body.has-floating-assistant .wa-concierge-peek::before {
    right: 8px;
    bottom: 2px;
    left: 8px;
  }

  body.has-floating-assistant .wa-assistant-avatar--paan {
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    flex-basis: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.has-floating-assistant .wa-concierge-peek {
    animation: none;
  }
}
