/* Amazing Team — site-wide FAQ chatbot (light theme) */
.at-faq-fab {
  position: fixed;
  right: 1.1rem;
  bottom: 1.25rem;
  z-index: 80;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 999px;
  border: 1.5px solid var(--gold);
  background: linear-gradient(145deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--gold);
  box-shadow: 0 10px 28px rgba(12, 35, 64, 0.28);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
  font-family: var(--font);
}
.at-faq-fab:hover {
  transform: translateY(-2px) scale(1.04);
  filter: brightness(1.06);
  box-shadow: 0 14px 32px rgba(196, 163, 90, 0.28);
}
.at-faq-fab:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.at-faq-fab svg { width: 1.45rem; height: 1.45rem; display: block; }
.at-faq-fab .fab-dot {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #3cb8a9;
  box-shadow: 0 0 0 2px #fff;
}
.at-faq-fab[aria-expanded="true"] { border-color: #3cb8a9; color: #3cb8a9; }

.at-faq-panel {
  position: fixed;
  right: 1rem;
  bottom: 5.1rem;
  z-index: 81;
  width: min(100% - 1.5rem, 360px);
  height: min(72vh, 520px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(12, 35, 64, 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.at-faq-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.at-faq-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-soft) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.at-faq-head .title-wrap { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.at-faq-avatar {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(196, 163, 90, 0.18);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.85rem;
}
.at-faq-head strong {
  display: block;
  font-size: 0.98rem;
  color: #fff;
  line-height: 1.25;
}
.at-faq-head .sub {
  display: block;
  font-size: 0.72rem;
  color: #3cb8a9;
  letter-spacing: 0.04em;
  margin-top: 0.1rem;
}
.at-faq-head-actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.at-faq-close {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #cfd8e3;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.at-faq-close:hover { border-color: var(--gold); color: var(--gold); }

.at-faq-voice {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #cfd8e3;
  cursor: pointer;
  font-size: 0.68rem;
  font-family: var(--font);
  line-height: 1.2;
  white-space: nowrap;
}
.at-faq-voice:hover { border-color: #3cb8a9; color: #3cb8a9; }
.at-faq-voice.on {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(196, 163, 90, 0.12);
}

.at-faq-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: var(--cream);
  scroll-behavior: smooth;
}
.at-faq-msg {
  max-width: 92%;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.55;
  word-break: break-word;
}
.at-faq-msg.bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
  white-space: pre-line;
}
.at-faq-msg.bot a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.at-faq-msg.user {
  align-self: flex-end;
  background: rgba(196, 163, 90, 0.16);
  border: 1px solid rgba(196, 163, 90, 0.45);
  color: var(--text);
  border-bottom-right-radius: 4px;
}
.at-faq-msg .msg-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: #3cb8a9;
  margin-bottom: 0.3rem;
}
.at-faq-msg.user .msg-label { color: var(--gold); text-align: right; }
.at-faq-msg.bot .msg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}
.at-faq-msg.bot .msg-top .msg-label { margin-bottom: 0; }
.at-faq-speak {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(60, 184, 169, 0.08);
  color: #3cb8a9;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  line-height: 1;
  flex-shrink: 0;
  padding: 0;
}
.at-faq-speak:hover { border-color: var(--gold); color: var(--gold); }
.at-faq-speak.speaking {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(196, 163, 90, 0.14);
  animation: at-faq-pulse 1.1s ease infinite;
}
@keyframes at-faq-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 163, 90, 0.35); }
  50% { box-shadow: 0 0 0 4px rgba(196, 163, 90, 0); }
}

.at-faq-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.65rem 0.85rem 0.15rem;
  background: #fff;
  border-top: 1px solid var(--border);
  max-height: 5.8rem;
  overflow-y: auto;
}
.at-faq-chip {
  font-size: 0.75rem;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--cream);
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font);
  transition: 0.15s ease;
  line-height: 1.3;
}
.at-faq-chip:hover {
  border-color: var(--navy);
  color: var(--navy);
}
.at-faq-chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

.at-faq-note {
  padding: 0 0.85rem 0.45rem;
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.4;
  background: #fff;
  margin: 0;
}

.at-faq-input {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  padding: 0.65rem 0.75rem 0.8rem;
  background: #fff;
  border-top: 1px solid var(--border);
}
.at-faq-input input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--cream);
  color: var(--text);
  font-size: 0.88rem;
  font-family: var(--font);
  outline: none;
}
.at-faq-input input::placeholder { color: #8a939c; }
.at-faq-input input:focus { border-color: var(--accent); }
.at-faq-send {
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 999px;
  flex-shrink: 0;
  border: none;
  background: var(--gold);
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(196, 163, 90, 0.28);
}
.at-faq-send:hover { filter: brightness(1.06); }

body.at-faq-open .at-faq-panel {
  bottom: 1rem;
  height: min(78vh, 560px);
  z-index: 90;
}

@media (max-width: 480px) {
  .at-faq-panel {
    right: 0.6rem;
    left: 0.6rem;
    width: auto;
    bottom: 4.8rem;
    height: min(68vh, 480px);
  }
  .at-faq-fab { right: 0.85rem; bottom: 1rem; }
}
