/* =====================================================================
   ASCEND COACH - theme for the chat assistant widget.

   The assistant ships in its own purple. This file repaints it in the
   site's ivory and gold and puts Cormorant on its headings, so the chat
   reads as part of the page rather than a bolted-on box.

   Loaded BEFORE the widget's own stylesheet arrives (the widget injects
   chat.css from JavaScript), which is why every rule here is written to
   win on specificity rather than on order. Nothing here depends on the
   widget's internals beyond its class names.

   The widget also reads brand_color / brand_color_dark from its admin
   settings and sets them as inline custom properties, which would beat a
   plain :root declaration. That is why the overrides below are scoped to
   .fpc-widget with !important on the two brand variables: the admin can
   still change the colours, but out of the box it matches the site.
   ===================================================================== */

.fpc-widget {
  --fpc-brand:      #b8862b !important;   /* Ascend gold */
  --fpc-brand-dark: #8a6215 !important;   /* deep gold, hover */
  --fpc-ink:        #1c1a16;
  --fpc-muted:      #8a8377;
  --fpc-line:       rgba(28,26,22,.12);
  --fpc-bg:         #fffdf9;
  --fpc-bot-bubble: #f5efe4;
  --fpc-radius:     20px;
  --fpc-shadow:     0 30px 70px -30px rgba(60,46,20,.55);

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
               Helvetica, Arial, sans-serif;
}

/* ------------------------------------------------------------ LAUNCHER */
.fpc-widget .fpc-launcher {
  background: linear-gradient(100deg,#8a6215 0%,#b8862b 26%,#e9cd85 50%,#b8862b 74%,#8a6215 100%);
  background-size: 220% 100%;
  color: #fffdf7;
  font-weight: 600;
  letter-spacing: .02em;
  box-shadow: 0 16px 38px -14px rgba(138,98,21,.7);
  transition: background-position .5s cubic-bezier(.22,1,.36,1),
              transform .2s ease, box-shadow .2s ease;
}
.fpc-widget .fpc-launcher:hover {
  background-position: 100% 0;
  box-shadow: 0 24px 50px -14px rgba(138,98,21,.8);
}
.fpc-widget .fpc-launcher-badge { background: #c9773f; border-color: #fffdf9; }

/* --------------------------------------------------------------- PANEL */
.fpc-widget .fpc-panel {
  border: 1px solid rgba(184,134,43,.22);
  background: var(--fpc-bg);
}

.fpc-widget .fpc-header {
  background: linear-gradient(120deg,#8a6215,#b8862b 55%,#c79736);
  color: #fffdf7;
}
.fpc-widget .fpc-title {
  font-family: 'Cormorant','Cormorant Garamond',Georgia,serif;
  font-size: 1.32rem;
  font-weight: 500;
  letter-spacing: -.01em;
}
.fpc-widget .fpc-subtitle { opacity: .88; font-size: .78rem; letter-spacing: .01em; }
.fpc-widget .fpc-avatar {
  background: rgba(255,253,247,.18);
  color: #fffdf7;
  border: 1px solid rgba(255,253,247,.4);
  font-family: 'Cormorant','Cormorant Garamond',Georgia,serif;
  font-weight: 600;
}
.fpc-widget .fpc-close { color: #fffdf7; opacity: .8; }
.fpc-widget .fpc-close:hover { opacity: 1; }

/* ------------------------------------------------------------ MESSAGES */
.fpc-widget .fpc-body { background: var(--fpc-bg); }
.fpc-widget .fpc-msg-bot .fpc-bubble {
  background: var(--fpc-bot-bubble);
  color: #3d3931;
  border: 1px solid rgba(28,26,22,.05);
}
.fpc-widget .fpc-msg-user .fpc-bubble {
  background: linear-gradient(120deg,#8a6215,#b8862b);
  color: #fffdf7;
}
.fpc-widget .fpc-bubble a { color: var(--fpc-brand-dark); text-underline-offset: 2px; }
.fpc-widget .fpc-msg-user .fpc-bubble a { color: #fff5dc; }

/* --------------------------------------------------- CHIPS AND STARTERS */
.fpc-widget .fpc-chip {
  background: #fffdf7;
  border: 1px solid rgba(184,134,43,.3);
  color: #8a6215;
  font-weight: 500;
  border-radius: 100px;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.fpc-widget .fpc-chip:hover {
  background: #fdf6e5;
  border-color: var(--fpc-brand);
  transform: translateY(-1px);
}

/* ---------------------------------------------------------- TIME SLOTS */
.fpc-widget .fpc-slot {
  background: #fffdf7;
  border: 1px solid rgba(184,134,43,.28);
  color: #3d3931;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.fpc-widget .fpc-slot:hover {
  background: #fdf6e5;
  border-color: var(--fpc-brand);
  color: #8a6215;
  transform: translateY(-1px);
}
.fpc-widget .fpc-slots-more { color: var(--fpc-brand-dark); font-weight: 600; }

/* -------------------------------------------------------- BOOKING FORM */
.fpc-widget .fpc-form {
  background: #fffdf7;
  border: 1px solid rgba(184,134,43,.24);
  border-radius: 16px;
}
.fpc-widget .fpc-form input,
.fpc-widget .fpc-form textarea,
.fpc-widget .fpc-form select {
  background: #fdfcf9;
  border: 1px solid rgba(28,26,22,.16);
  border-radius: 10px;
  color: var(--fpc-ink);
  font-family: inherit;
}
.fpc-widget .fpc-form input:focus,
.fpc-widget .fpc-form textarea:focus,
.fpc-widget .fpc-form select:focus {
  outline: 0;
  border-color: var(--fpc-brand);
  box-shadow: 0 0 0 4px rgba(184,134,43,.13);
  background: #fff;
}
.fpc-widget .fpc-btn {
  background: linear-gradient(100deg,#8a6215,#b8862b 40%,#d9a94a 70%,#8a6215);
  background-size: 200% 100%;
  color: #fffdf7;
  font-weight: 600;
  letter-spacing: .02em;
  border-radius: 100px;
  transition: background-position .5s cubic-bezier(.22,1,.36,1);
}
.fpc-widget .fpc-btn:hover:not(:disabled) { background-position: 100% 0; }
.fpc-widget .fpc-btn-ghost {
  background: none;
  color: var(--fpc-muted);
  border-radius: 100px;
}
.fpc-widget .fpc-btn-ghost:hover { background: #f5efe4; color: var(--fpc-ink); }
.fpc-widget .fpc-field label { color: #6c665c; font-weight: 600; }
.fpc-widget .fpc-form-when { color: var(--fpc-brand-dark); font-weight: 600; }
.fpc-widget .fpc-consent { color: var(--fpc-muted); }
.fpc-widget .fpc-slot-day-label {
  font-family: 'Cormorant','Cormorant Garamond',Georgia,serif;
  font-size: 1.05rem;
  color: var(--fpc-ink);
}
.fpc-widget .fpc-slot.fpc-selected {
  background: #fdf6e5;
  border-color: var(--fpc-brand);
  color: #8a6215;
}
.fpc-widget .fpc-form-error { background: #fdf1ee; color: #a8452f; }

/* -------------------------------------------------------- CONFIRMATION */
.fpc-widget .fpc-confirm {
  background: linear-gradient(150deg,#fffdf8,#faf1dd);
  border: 1px solid rgba(184,134,43,.3);
  border-radius: 16px;
}
.fpc-widget .fpc-confirm-head strong {
  font-family: 'Cormorant','Cormorant Garamond',Georgia,serif;
  font-size: 1.24rem;
  font-weight: 500;
}
.fpc-widget .fpc-confirm-check {
  background: linear-gradient(150deg,#c79736,#8a6215);
  color: #fffdf7;
}
.fpc-widget .fpc-confirm-ref {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--fpc-brand-dark);
}

/* ------------------------------------------------------------ COMPOSER */
.fpc-widget .fpc-composer { background: #fffdf9; border-top: 1px solid var(--fpc-line); }
.fpc-widget .fpc-input {
  background: #fdfcf9;
  border: 1px solid rgba(28,26,22,.14);
  border-radius: 14px;
  color: var(--fpc-ink);
  font-family: inherit;
}
.fpc-widget .fpc-input:focus {
  outline: 0;
  border-color: var(--fpc-brand);
  box-shadow: 0 0 0 3px rgba(184,134,43,.12);
}
.fpc-widget .fpc-send {
  background: linear-gradient(120deg,#8a6215,#b8862b);
  color: #fffdf7;
}
.fpc-widget .fpc-send:hover { background: linear-gradient(120deg,#7a5612,#a4761f); }
.fpc-widget .fpc-credit { color: var(--fpc-muted); letter-spacing: .12em; }

/* The typing dots pick up the brand colour rather than the default grey. */
.fpc-widget .fpc-typing span { background: rgba(184,134,43,.55); }

@media (prefers-reduced-motion: reduce) {
  .fpc-widget .fpc-launcher,
  .fpc-widget .fpc-chip,
  .fpc-widget .fpc-slot { transition: none; }
}
