/* Orange v3 — Panel 6 support module: two-sided FAQ + chat widget.
   Self-contained; reuses v3.css design tokens (never hardcodes brand hexes). */

/* ── layout: FAQ-first single column; chat collapses below it ───── */
/* closed: symmetric padding so the FAQ content sits vertically centered in the panel */
.panel--help .help-inner {
  padding-top: 96px; padding-bottom: 96px;
  transition: padding-bottom .35s var(--ease);
}
/* open: only when the chat region is showing, add room so the expanded card
   isn't jammed against the scroll bottom */
.panel--help .help-inner:has(#chat-region:not([hidden])) { padding-bottom: 300px; }
.help-stack {
  max-width: 980px;
  margin: 0 auto;
  text-align: left;
}

/* ── primary: FAQ (visually dominant, scannable two-up grid) ───── */
.help-eyebrow {
  font: 600 var(--fs-mono)/1 var(--f-mono);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 18px;
}
.help-faq .faq-grid--two {       /* two columns on desktop; v3.css collapses to 1 on mobile */
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 36px) clamp(28px, 4vw, 52px);
  max-width: none;
  margin: 0;
}

/* ── escalation: the collapsed "sign that points to the chat" ──── */
.help-escalate { margin-top: clamp(36px, 5vw, 56px); }

/* the box is a STATIC neumorphic card (cream extrusion). It is not a control;
   only the CTA below is. (The hero "Find your nearest Orange" box now uses a
   separate rim-lit pill style — .find-pill in v3.css — so the two intentionally
   differ.) */
.escalate {
  display: flex; align-items: center; gap: 20px;
  width: 100%; box-sizing: border-box;
  padding: 20px clamp(18px, 2.4vw, 26px);
  color: var(--ink);
  background: linear-gradient(145deg, #FFF3E1, #FFE7C9);
  border-radius: 20px;
  outline: 1px solid var(--cream); outline-offset: 5px;   /* floating cream ring */
  box-shadow:
    10px 10px 24px rgba(228,196,153,.6),
    -10px -10px 24px rgba(255,246,232,.75);
}
.escalate__copy { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.escalate__hook {
  margin: 0;
  font-family: var(--f-display); font-weight: 700;
  font-size: var(--fs-head); letter-spacing: -.01em;
  line-height: 1.15; color: var(--ink);
}
.escalate__sub { margin: 0; font-size: var(--fs-body); color: var(--ink-soft); line-height: 1.4; }

/* "Chat with us" — the actual button, styled like .btn--solid ("Find one →") */
.escalate__cta {
  display: inline-flex; align-items: center; gap: 9px;
  flex: 0 0 auto; cursor: pointer;
  padding: 12px 20px; border: 0; border-radius: 999px;
  background: var(--orange); color: #fff;
  font: 700 14px/1 var(--f-body);
  box-shadow: 0 12px 26px -10px rgba(252,54,0,.7);
  transition: background .15s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.escalate__cta:hover { transform: translateY(-2px); background: var(--orange-deep); }
.escalate__cta:active { transform: translateY(0); }
.escalate__chevron {
  display: inline-flex; width: 18px; height: 18px;
  transition: transform .25s var(--ease);
}
.escalate__chevron svg { width: 100%; height: 100%; }
.escalate__cta[aria-expanded="true"] .escalate__chevron { transform: rotate(180deg); }

/* ── collapsible chat region ───────────────────────────────────── */
.chat-region {
  margin-top: 14px;
  animation: chat-region-in .32s var(--ease);
}
@keyframes chat-region-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

/* ── right: chat card ──────────────────────────────────────────── */
/* the [hidden] attribute must always win over the display rules below */
.chat-card [hidden] { display: none !important; }

.chat-card {
  display: flex; flex-direction: column;
  max-width: 540px;          /* chat is contextual, not a full-width column */
  background: var(--cream-hi);
  border: 1px solid var(--cream);
  border-radius: 18px;
  box-shadow: 0 24px 60px -28px rgba(46,42,40,.35);
  overflow: hidden;
}
.chat-head {
  display: flex; align-items: center; gap: 9px;
  padding: 14px 18px;
  background: var(--ink); color: var(--cream-hi);
}
.chat-head__t { font-weight: 700; font-size: 15px; }
.chat-head__s {
  margin-left: auto;
  font: 600 var(--fs-mono)/1 var(--f-mono);
  letter-spacing: .08em; color: rgba(255,244,230,.7);
}
.chat-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74,222,128,.7);
  animation: chat-pulse 2s infinite;
}
@keyframes chat-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,.6); }
  70%  { box-shadow: 0 0 0 7px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

/* shared form fields */
.chat-field { display: block; margin-bottom: 12px; }
.chat-field > span {
  display: block; margin-bottom: 5px;
  font: 600 var(--fs-mono)/1.2 var(--f-mono);
  letter-spacing: .04em; color: var(--ink-soft);
}
.chat-field input,
.chat-field textarea {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px;
  font: 500 var(--fs-body)/1.4 var(--f-body);
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--cream);
  border-radius: 10px;
}
.chat-field input:focus,
.chat-field textarea:focus { outline: none; border-color: var(--orange); }

/* gate */
.chat-gate { padding: 20px 18px 22px; }
.chat-gate__lead { font-size: var(--fs-body); color: var(--ink); margin-bottom: 16px; }
.chat-gate__go { width: 100%; margin-top: 4px; }
.chat-consent {
  margin-top: 12px;
  font: 500 var(--fs-mono)/1.5 var(--f-mono);
  letter-spacing: .02em; color: var(--ink-soft);
}
.chat-error { margin: 4px 0 10px; color: var(--orange-deep); font-size: 13.5px; font-weight: 600; }

/* conversation */
.chat-convo { display: flex; flex-direction: column; flex: 1; min-height: 360px; }
.chat-log {
  flex: 1; overflow-y: auto;
  padding: 18px; display: flex; flex-direction: column; gap: 10px;
  max-height: 320px;
}
.chat-bubble {
  max-width: 82%;
  padding: 10px 13px; border-radius: 14px;
  font-size: var(--fs-body); line-height: 1.45;
  white-space: pre-wrap; word-wrap: break-word;
}
.chat-bubble--bot { align-self: flex-start; background: var(--cream); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-bubble--customer { align-self: flex-end; background: var(--orange); color: #fff; border-bottom-right-radius: 4px; }

.chat-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 10px; }
.chat-chip {
  cursor: pointer;
  padding: 7px 12px; border-radius: 999px;
  font: 600 13px/1 var(--f-body); color: var(--orange);
  background: #fff; border: 1.5px solid var(--orange);
  transition: background .15s, color .15s;
}
.chat-chip:hover { background: var(--orange); color: #fff; }
.chat-report { width: calc(100% - 0px); margin-top: 4px; }

.chat-composer { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--cream); }
.chat-composer input {
  flex: 1; box-sizing: border-box;
  padding: 10px 12px; font: 500 var(--fs-body)/1.4 var(--f-body);
  color: var(--ink); background: #fff;
  border: 1.5px solid var(--cream); border-radius: 999px;
}
.chat-composer input:focus { outline: none; border-color: var(--orange); }
.chat-send {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: var(--orange); color: #fff; font-size: 20px; line-height: 1;
  transition: background .15s, transform .15s;
}
.chat-send:hover { background: var(--orange-deep); transform: translateY(-1px); }

/* ticket form + done */
.chat-ticket { padding: 18px; }
.chat-ticket__lead { font-size: var(--fs-body); color: var(--ink); margin-bottom: 14px; }
.chat-ticket .btn { width: 100%; margin-top: 4px; }
.chat-done { padding: 28px 20px; text-align: center; }
.chat-done__big { font-family: var(--f-display); font-weight: 800; font-size: 1.8rem; color: var(--orange); margin-bottom: 10px; }
.chat-ref {
  font: 700 1.25rem/1.2 var(--f-mono); letter-spacing: .04em;
  color: var(--ink); margin: 8px 0 14px;
  padding: 10px; background: var(--cream); border-radius: 10px;
}
.chat-done__sub { font-size: 13.5px; color: var(--ink-soft); }

/* ── responsive: single-column FAQ, stacked escalation copy ────── */
@media (max-width: 760px) {
  .help-faq .faq-grid--two { grid-template-columns: 1fr; gap: 18px; }
  .escalate { flex-direction: column; align-items: stretch; gap: 14px; }
  .escalate__cta { justify-content: center; }
  .chat-card { max-width: none; }
  .chat-log { max-height: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  .chat-dot { animation: none; }
  .chat-region { animation: none; }
  .escalate, .escalate__cta, .escalate__chevron { transition: none; }
}
