/* ============================================================================
   Awwee renderer styles (scoped under .awwee-msg — cannot leak to the page)
   ----------------------------------------------------------------------------
   NOTE ON !important: site-wide CSS resets commonly kill list bullets and
   italics. These few rules are deliberately forced so the chat renders the same
   on any theme. Everything stays scoped under .awwee-msg, so nothing else on
   the site is affected.

   DARK / LIGHT: the colour follows the CHAT PANEL's own theme, not the OS.
   Put class="awwee-light" or "awwee-dark" on the chat container (the same place
   your sun/moon toggle switches). Light = blue (readable on white).
   Dark = brand yellow (pops on dark). Never yellow on white — it disappears.
   ============================================================================ */

.awwee-msg {
  --awwee-key: #1a6fd4;              /* default = light mode blue */
  line-height: 1.55;
  word-break: break-word;
}

/* theme, driven by the chat panel's own toggle (authoritative).
   .aw.light / .aw.dark are the exact classes the sun/moon button in
   awwee-chat.js already toggles — no extra JS hook needed. */
.aw.light .awwee-msg { --awwee-key: #1a6fd4; }  /* blue on light background */
.aw.dark  .awwee-msg { --awwee-key: #ffcf33; }  /* yellow on dark background */

/* line rhythm: a blank line becomes a real gap between thoughts */
.awwee-msg .awwee-line { display: block; }
.awwee-msg .awwee-line + .awwee-line,
.awwee-msg .awwee-line + ul, .awwee-msg .awwee-line + ol,
.awwee-msg ul + .awwee-line, .awwee-msg ol + .awwee-line { margin-top: 0.55em; }

/* emphasis — forced past site resets */
.awwee-msg strong, .awwee-msg b { font-weight: 700 !important; }
.awwee-msg em, .awwee-msg i     { font-style: italic !important; }
.awwee-msg u {
  text-decoration: underline !important;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

/* the key mark (Awwee v14.1, approved style A): a soft marker behind the words. The text keeps
   the bubble's own colour, so it reads the same in light and dark and never shouts. */
.awwee-msg { --awwee-mark: rgba(26, 111, 212, 0.13); }
.aw.light .awwee-msg { --awwee-mark: rgba(26, 111, 212, 0.13); }
.aw.dark  .awwee-msg { --awwee-mark: rgba(255, 207, 51, 0.26); }
.awwee-msg .awwee-key {
  display: inline;
  background: var(--awwee-mark);
  color: inherit;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 5px;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* strikethrough */
.awwee-msg s, .awwee-msg del { text-decoration: line-through !important; }

/* inline code — light grey background, slightly smaller, matches spec.
   Color forced to blue in BOTH themes (fixed brand blue, not the
   theme-switching --awwee-key variable used for highlight/links) —
   overrides any site-wide <code> color default (e.g. Bootstrap's
   reddish-pink) that would otherwise leak in. */
.awwee-msg code {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #1a6fd4 !important;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.92em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.aw.dark .awwee-msg code {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #f8b600 !important;
}

/* links — theme-aware key colour, always underlined, always new tab
   (target="_blank" is set in the JS; rel="noopener noreferrer" too) */
.awwee-msg a {
  color: var(--awwee-key);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.awwee-msg a:hover { opacity: 0.85; }

/* LISTS — most sites reset list-style to none, so set it explicitly */
.awwee-msg ul.awwee-ul {
  list-style: disc outside !important;
  margin: 0.45em 0 !important;
  padding-left: 1.35em !important;
}
.awwee-msg ol.awwee-ol {
  list-style: decimal outside !important;
  margin: 0.45em 0 !important;
  padding-left: 1.5em !important;
}
.awwee-msg ul.awwee-ul > li {
  list-style: disc outside !important;
}
.awwee-msg ol.awwee-ol > li {
  list-style: decimal outside !important;
}
.awwee-msg li {
  display: list-item !important;
  margin: 0.22em 0;
  padding: 0;
}
.awwee-msg li::marker { color: inherit; }

/* emoji a touch larger reads warmer */
.awwee-msg .awwee-emoji { font-size: 1.15em; line-height: 1; vertical-align: -0.05em; }

/* gentle entrance; respects reduced-motion */
@keyframes awweeRise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.awwee-msg.awwee-animate { animation: awweeRise 260ms ease-out both; }
@media (prefers-reduced-motion: reduce) { .awwee-msg.awwee-animate { animation: none; } }

/* ============================================================================
   Chat reading comfort (carried from Awwee v14.0.4): more air between lines and
   between thoughts, and the scroll-down arrow sits at the right above the input,
   never on top of the text or a card.
   ============================================================================ */
#my-chat .awwee-msg { line-height: 1.6; }
#my-chat .awwee-msg .awwee-line + .awwee-line { margin-top: 0.7em; }
#my-chat #scrollToBottomBtn {
  left: auto !important;
  right: 6px !important;
  bottom: 12px !important;
  margin: 0 !important;
  transform: none !important;
  opacity: 0.92;
}

/* ============================================================================
   Quick reply chips (Awwee v14.1). Drawn by chat.js under a finished reply when
   the reply carries `suggestions`. Light is the default; .aw.dark is the same
   class the sun/moon button already toggles.
   ============================================================================ */
#chat-box .aw-chips-row { width: 100%; }
#chat-box .aw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  padding: 0 0 4px;
}
#chat-box .aw-chips .aw-chip {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  margin: 0;
  min-height: 44px;
  max-width: 100%;
  padding: 6px 13px;
  border: 2px solid #0F0D0B;
  border-radius: 12px;
  background: #FFFFFF;
  color: #0F0D0B;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 120ms ease, transform 120ms ease;
  animation: awweeRise 220ms ease-out backwards;
}
#chat-box .aw-chips .aw-chip:hover { background: #FFF4BF; }
#chat-box .aw-chips .aw-chip:active { transform: translateY(1px); }
#chat-box .aw-chips .aw-chip:focus-visible { outline: 3px solid #1A6FD4; outline-offset: 2px; }

/* the one chip that answers the booking ask: the same yellow button the cards use */
#chat-box .aw-chips .aw-chip--go {
  padding: 6px 18px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(#FFD047, #FFC531 55%, #F7B400);
  box-shadow: 0 3px 0 #D99600;
  color: #0A0A0C;
  font-family: 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
#chat-box .aw-chips .aw-chip--go:hover { background: linear-gradient(#FFD75E, #FFCB45 55%, #F9BC14); }
#chat-box .aw-chips .aw-chip--go:active { transform: translateY(2px); box-shadow: 0 1px 0 #D99600; }

.aw.dark #chat-box .aw-chips .aw-chip {
  border-color: #FFFFFF;
  background: #221E1A;
  color: #FFFFFF;
}
.aw.dark #chat-box .aw-chips .aw-chip:hover { background: #3A3122; }
.aw.dark #chat-box .aw-chips .aw-chip:focus-visible { outline-color: #FFCF33; }
.aw.dark #chat-box .aw-chips .aw-chip--go {
  border: 0;
  background: linear-gradient(#FFD047, #FFC531 55%, #F7B400);
  box-shadow: 0 3px 0 #C98A00;
  color: #0A0A0C;
}
.aw.dark #chat-box .aw-chips .aw-chip--go:hover { background: linear-gradient(#FFD75E, #FFCB45 55%, #F9BC14); }
.aw.dark #chat-box .aw-chips .aw-chip--go:active { box-shadow: 0 1px 0 #C98A00; }

/* phones: the chips use the full row (no empty avatar column), so two sit side by side */
@media (max-width: 767.98px) {
  #chat-box .aw-chips-row .chat-row > .bot-img { display: none; }
}
/* narrow phones (360 px Android): two equal columns, so the chips still sit two by two */
@media (max-width: 380px) {
  #chat-box .aw-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #chat-box .aw-chips .aw-chip { width: 100%; padding-left: 10px; padding-right: 10px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  #chat-box .aw-chips .aw-chip { animation: none; transition: none; }
}
