/* FarOverseas guided chatbot — isolated component styles. */
#fo-chat-widget,
#fo-chat-widget * {
  box-sizing: border-box;
}

#fo-chat-widget {
  --fo-chat-teal: var(--color-harbor-teal, #0e7c7b);
  --fo-chat-teal-dark: var(--color-ink-teal, #0a2e2f);
  --fo-chat-accent: var(--color-signal-teal, #14b8a6);
  --fo-chat-sand: var(--color-sand, #f7f5f0);
  --fo-chat-line: var(--color-line, #e2ded3);
  --fo-chat-text: var(--color-ink-teal, #0a2e2f);
  --fo-chat-muted: var(--color-stone, #5c6664);
  --fo-chat-shadow: 0 20px 64px rgba(10, 46, 47, .22);
  position: fixed;
  right: clamp(1.25rem, 3vw, 2rem);
  bottom: calc(clamp(1.25rem, 3vw, 2rem) + 58px + 25px);
  z-index: calc(var(--z-overlay, 200) + 2);
  font-family: var(--font-body, Inter, Arial, sans-serif);
  color: var(--fo-chat-text);
  line-height: 1.45;
  font-size: 14px;
}

#fo-chat-widget button,
#fo-chat-widget input,
#fo-chat-widget a {
  font: inherit;
}

#fo-chat-widget button {
  -webkit-tap-highlight-color: transparent;
}

#fo-chat-widget [hidden] {
  display: none !important;
}

.fo-chat-launcher {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--fo-chat-teal), var(--fo-chat-teal-dark));
  color: #fff;
  box-shadow: var(--fo-chat-shadow);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.fo-chat-launcher:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 54px rgba(10, 46, 47, .3);
}

.fo-chat-launcher:focus-visible,
#fo-chat-widget button:focus-visible,
#fo-chat-widget a:focus-visible,
#fo-chat-widget input:focus-visible {
  outline: 3px solid var(--fo-chat-accent);
  outline-offset: 3px;
}

.fo-chat-launcher svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fo-chat-launcher-close { display: none; }
.fo-chat-launcher.is-open .fo-chat-launcher-icon { display: none; }
.fo-chat-launcher.is-open .fo-chat-launcher-close { display: block; }

.fo-chat-launcher::after {
  content: "Product assistant";
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translate(6px, -50%);
  padding: 8px 12px;
  border-radius: 9px;
  background: var(--fo-chat-teal-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  box-shadow: 0 8px 24px rgba(10,46,47,.16);
}
.fo-chat-launcher:hover::after { opacity: 1; transform: translate(0, -50%); }
.fo-chat-launcher.is-open::after { content: "Close assistant"; }

.fo-chat-window {
  position: fixed;
  right: clamp(1.25rem, 3vw, 2rem);
  bottom: calc(clamp(1.25rem, 3vw, 2rem) + 58px + 25px);
  width: min(390px, calc(100vw - 34px));
  height: min(650px, 72vh);
  height: min(650px, 72dvh);
  min-height: 360px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  overflow: hidden;
  border: 1px solid rgba(10,46,47,.1);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--fo-chat-shadow);
  transform-origin: bottom right;
  animation: fo-chat-enter 180ms ease-out both;
}

@keyframes fo-chat-enter {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.fo-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 13px;
  color: #fff;
  background: linear-gradient(120deg, var(--fo-chat-teal-dark), var(--fo-chat-teal));
}
.fo-chat-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.23);
  border-radius: 13px;
  background: rgba(255,255,255,.12);
}
.fo-chat-brand-mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fo-chat-heading { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; }
.fo-chat-heading strong { font-family: var(--font-display, Manrope, sans-serif); font-size: 14px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
.fo-chat-heading span { display: flex; align-items: center; gap: 6px; font-size: 11px; color: rgba(255,255,255,.82); }
.fo-chat-heading span i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #7be0ad; box-shadow: 0 0 0 3px rgba(123,224,173,.16); }
.fo-chat-reset,
.fo-chat-minimize {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  background: rgba(255,255,255,.1);
  transition: background 160ms ease;
}
.fo-chat-reset:hover,
.fo-chat-minimize:hover { background: rgba(255,255,255,.22); }
.fo-chat-reset svg,
.fo-chat-minimize svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.fo-chat-log {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 16px 13px 13px;
  background: linear-gradient(180deg, #fbfcfa 0%, #f6f8f5 100%);
  scrollbar-width: thin;
  scrollbar-color: rgba(14,124,123,.28) transparent;
}
.fo-chat-line { display: flex; align-items: flex-end; gap: 7px; max-width: 100%; }
.fo-chat-line--user { justify-content: flex-end; }
.fo-chat-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  border-radius: 9px 9px 9px 3px;
  color: #fff;
  background: var(--fo-chat-teal);
  font-family: var(--font-display, Manrope, sans-serif);
  font-weight: 800;
  font-size: 11px;
}
.fo-chat-bubble {
  max-width: calc(100% - 32px);
  padding: 10px 12px;
  border: 1px solid #e7ebe5;
  border-radius: 14px 14px 14px 4px;
  background: #fff;
  color: #263e3b;
  font-size: 12.5px;
  line-height: 1.58;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: 0 2px 8px rgba(10,46,47,.035);
}
.fo-chat-line--user .fo-chat-bubble {
  max-width: 88%;
  color: #fff;
  background: var(--fo-chat-teal);
  border-color: var(--fo-chat-teal);
  border-radius: 14px 14px 4px 14px;
}
.fo-chat-options {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 7px;
  padding: 1px 0 2px 32px;
}
.fo-chat-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(14,124,123,.33) !important;
  border-radius: 999px;
  background: #fff !important;
  color: var(--fo-chat-teal-dark) !important;
  text-align: left;
  text-decoration: none;
  line-height: 1.3;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.fo-chat-option:hover {
  background: var(--fo-chat-teal) !important;
  color: #fff !important;
  border-color: var(--fo-chat-teal) !important;
  transform: translateY(-1px);
}
.fo-chat-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e8ece7;
  background: #fff;
}
.fo-chat-composer[hidden] { display: none !important; }
.fo-chat-composer input {
  min-width: 0;
  flex: 1;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #dfe6df;
  border-radius: 11px;
  outline: none;
  background: #fbfcfa;
  color: var(--fo-chat-text);
  font-size: 12px;
}
.fo-chat-composer input::placeholder { color: #8a9791; }
.fo-chat-composer input:focus { border-color: var(--fo-chat-teal); box-shadow: 0 0 0 3px rgba(14,124,123,.1); }
.fo-chat-composer button {
  display: flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--fo-chat-teal) !important;
  color: #fff !important;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.fo-chat-composer button:hover { background: var(--fo-chat-teal-dark) !important; transform: translateX(1px); }
.fo-chat-composer button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fo-chat-footnote {
  padding: 7px 10px 9px;
  color: #77827b;
  background: #fff;
  text-align: center;
  font-size: 9.5px;
  border-top: 1px solid #f0f2ef;
}

@media (max-width: 640px) {
  #fo-chat-widget {
    right: 12px;
    bottom: calc(12px + 52px + 12px);
  }
  .fo-chat-launcher { width: 52px; height: 52px; }
  .fo-chat-launcher svg { width: 24px; height: 24px; }
  .fo-chat-launcher::after { display: none; }
  .fo-chat-window {
    right: 10px;
    bottom: calc(12px + 52px + 12px);
    width: calc(100vw - 20px);
    height: min(620px, 76vh);
    height: min(620px, 76dvh);
    min-height: 330px;
    border-radius: 17px;
  }
  .fo-chat-header { padding: 12px 10px; gap: 8px; }
  .fo-chat-log { padding: 13px 10px 11px; gap: 10px; }
  .fo-chat-options { padding-left: 31px; gap: 6px; }
  .fo-chat-option { min-height: 32px; padding: 7px 10px; }
}

@media (max-width: 360px) {
  .fo-chat-heading strong { font-size: 12px; }
  .fo-chat-heading span { font-size: 10px; }
  .fo-chat-brand-mark { flex-basis: 34px; width: 34px; height: 34px; }
  .fo-chat-reset, .fo-chat-minimize { flex-basis: 27px; width: 27px; height: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  .fo-chat-window { animation: none; }
  #fo-chat-widget *, #fo-chat-widget *::before, #fo-chat-widget *::after { transition-duration: .01ms !important; }
}
/* ==========================================================
   CHATBOT LAUNCHER — PULSING RINGS
   Matches the animation around the WhatsApp button.
   ========================================================== */

.fo-chat-launcher {
  isolation: isolate;
}

/* Expanding circle around the chatbot icon */
.fo-chat-launcher::before {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px solid rgba(20, 184, 166, 0.7);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: fo-chat-pulse 3.5s ease-out infinite;
}

/* Keep the chatbot icon above the animated circle */
.fo-chat-launcher svg {
  position: relative;
  z-index: 1;
}

/* Expand and fade, like the WhatsApp widget */
@keyframes fo-chat-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }

  70% {
    transform: scale(1.7);
    opacity: 0;
  }

  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

/* Stop pulsing while the chatbot is open */
.fo-chat-launcher.is-open::before {
  animation: none;
  opacity: 0;
}

/* Respect accessibility preferences */
@media (prefers-reduced-motion: reduce) {
  .fo-chat-launcher::before {
    animation: none;
    display: none;
  }
}
/* Match chatbot button size to WhatsApp */
.fo-chat-launcher {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
}

.fo-chat-launcher svg {
  width: 28px;
  height: 28px;
}

/* Match WhatsApp dimensions on mobile */
@media (max-width: 640px) {
  .fo-chat-launcher {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .fo-chat-launcher svg {
    width: 24px;
    height: 24px;
  }
}
/* =========================================
   MOBILE CHATBOT RESPONSIVENESS FIX
   ========================================= */

@media (max-width: 640px) {
  #fo-chat-widget {
    right: 12px;
    bottom: calc(12px + 52px + 12px);
  }

  .fo-chat-window {
    /* Keep the panel inside the viewport */
    right: 12px;
    left: auto;
    width: min(360px, calc(100vw - 24px));

    /* Shorter, more comfortable mobile panel */
    height: min(460px, 58vh);
    height: min(460px, 58dvh);
    min-height: 300px;
    max-height: calc(100dvh - 150px);

    /* Preserve space for the WhatsApp button */
    bottom: calc(12px + 52px + 12px);

    border-radius: 17px;
  }

  /* Tighter spacing on small screens */
  .fo-chat-header {
    padding: 10px;
    gap: 7px;
  }

  .fo-chat-log {
    min-height: 0;
    padding: 11px 9px;
    gap: 8px;
  }

  .fo-chat-options {
    padding-left: 28px;
    gap: 6px;
  }

  .fo-chat-option {
    min-height: 32px;
    padding: 7px 9px;
  }
}

@media (max-width: 380px) {
  .fo-chat-window {
    width: calc(100vw - 24px);
    height: min(420px, 56dvh);
    min-height: 280px;
  }

  .fo-chat-heading strong {
    font-size: 12px;
  }

  .fo-chat-heading span {
    font-size: 10px;
  }
}
/* MOBILE: Align chatbot and WhatsApp buttons */
@media (max-width: 640px) {
  #fo-chat-widget {
    right: 20px;
    bottom: 84px;
    bottom: calc(clamp(1.25rem, 3vw, 2rem) + 58px + 20px);
  }

  .fo-chat-launcher {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
  }

  .fo-chat-launcher svg {
    width: 24px;
    height: 24px;
  }

  .fo-chat-window {
    right: 16px;
    bottom: 84px;
    width: calc(100vw - 32px);
    max-width: 360px;
    height: min(460px, 58dvh);
    min-height: 280px;
    max-height: calc(100dvh - 140px);
  }
}