/* ============================================================
   Support — FAQ, contact, live chat
   ============================================================ */

.support-hero {
  position: relative;
  padding: var(--space-12) var(--space-6);
  margin: var(--space-6) 0;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(800px 400px at 20% 30%, rgba(0,229,255,0.18), transparent 60%),
    radial-gradient(800px 400px at 80% 70%, rgba(139,92,255,0.15), transparent 60%),
    var(--bg-surface);
  border: 1px solid var(--border-subtle);
  text-align: center;
}
/* Hero heading demoted h1→h2 (the panel's h1 is the shared #cp-title).
   #content-panel prefix keeps this ahead of the generic .cp-body h2 rule
   in panels.css (specificity tie, later load order wins). */
#content-panel .support-hero h2 {
  font-size: var(--text-4xl);
  margin: 0 0 var(--space-3);
}
.support-hero p { color: var(--text-secondary); margin: 0 auto var(--space-5); max-width: 50ch; }
.support-search {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}
.support-search input {
  height: 56px; width: 100%;
  padding: 0 var(--space-5) 0 56px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: var(--text-base);
}
.support-search input:focus { outline: none; border-color: var(--neon-cyan); box-shadow: 0 0 0 3px rgba(0,229,255,0.18); }
.support-search svg {
  position: absolute; top: 50%; left: 20px;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  color: var(--text-muted);
}

/* Category tiles */
.sup-categories {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr 1fr;
}
/* 4 categories since the Account/Bonuses tiles were retired: 2×2 on
   mobile, one aligned row of 4 from 700px up (was 3/6 tracks for 6). */
@media (min-width: 700px)  { .sup-categories { grid-template-columns: repeat(4, 1fr); } }

.sup-cat {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.sup-cat:hover { border-color: var(--neon-cyan); transform: translateY(-2px); }
.sup-cat .icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  margin: 0 auto var(--space-2);
  background: rgba(0,229,255,0.06);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--neon-cyan);
}
.sup-cat .icon svg { width: 22px; height: 22px; }
.sup-cat h4 { margin: 0; font-size: var(--text-sm); }
.sup-cat .count { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }

/* FAQ grid */
.sup-layout {
  display: grid; gap: var(--space-6);
  grid-template-columns: 1fr;
  margin-top: var(--space-6);
}
@media (min-width: 1024px) { .sup-layout { grid-template-columns: 1fr 320px; gap: var(--space-8); } }

.sup-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
}
.sup-panel h2 { font-size: var(--text-xl); margin: 0 0 var(--space-3); }

.contact-list { display: grid; gap: var(--space-3); }
.contact-row {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.contact-row:hover { border-color: var(--neon-cyan); }
.contact-row .icon { width: 40px; height: 40px; border-radius: 50%; background: rgba(0,229,255,0.06); color: var(--neon-cyan); display: inline-flex; align-items: center; justify-content: center; }
.contact-row .icon svg { width: 20px; height: 20px; }
.contact-row .body { flex: 1; }
.contact-row .lbl { font-weight: 600; font-size: var(--text-sm); }
.contact-row .meta { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }

/* ============= Live chat widget ============= */
.chat-launcher {
  position: fixed;
  right: var(--space-5);
  bottom: calc(var(--bottombar-height) + var(--space-5));
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: var(--text-inverse);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-elevated), 0 0 30px rgba(255,46,147,0.40);
  z-index: var(--z-drawer);
  cursor: pointer;
  border: none;
  transition: transform var(--dur-fast) var(--ease-out);
}
@media (min-width: 1024px) { .chat-launcher { bottom: var(--space-5); } }
.chat-launcher svg { width: 24px; height: 24px; }
.chat-launcher:hover { transform: scale(1.05); }
.chat-launcher .dot {
  position: absolute; top: 4px; right: 4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--bg-base);
}

.chat-window {
  position: fixed;
  right: var(--space-5);
  bottom: calc(var(--bottombar-height) + var(--space-5));
  width: 360px; max-width: calc(100% - var(--space-10));
  height: 480px; max-height: calc(100dvh - var(--bottombar-height) - var(--space-10));
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated);
  z-index: var(--z-modal);
  display: none;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  animation: chat-in var(--dur-base) var(--ease-out);
}
@media (min-width: 1024px) { .chat-window { bottom: var(--space-5); } }
.chat-window.is-open { display: flex; }
@keyframes chat-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

.chat-head {
  padding: var(--space-4);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; gap: var(--space-3);
}
.chat-head .av {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad-primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; color: var(--text-inverse);
  font-size: var(--text-sm);
}
.chat-head .who { font-weight: 600; font-size: var(--text-sm); }
.chat-head .status { font-size: var(--text-xs); color: var(--success); display: flex; align-items: center; gap: 4px; }
.chat-head .status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.chat-head .close {
  margin-left: auto;
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-secondary); cursor: pointer; background: none; border: none;
}
.chat-head .close:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.chat-head .close svg { width: 16px; height: 16px; }

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex; flex-direction: column; gap: var(--space-3);
}

.msg {
  max-width: 80%;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: 1.4;
  white-space: pre-wrap;
}
.msg.bot, .msg.agent {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.msg.user {
  background: var(--grad-primary);
  color: var(--text-inverse);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.msg.meta {
  align-self: center;
  background: none;
  color: var(--text-muted);
  font-size: var(--text-xs);
}
.chat-typing {
  display: inline-flex; gap: 4px; padding: var(--space-3);
}
.chat-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.30s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; transform: translateY(-2px); } }

.chat-quick {
  padding: 0 var(--space-4) var(--space-2);
  display: flex; flex-wrap: wrap; gap: 6px;
}
.chat-quick .pill {
  font-size: 0.72rem;
  padding: 4px 10px;
  cursor: pointer;
}

.chat-input {
  padding: var(--space-3);
  border-top: 1px solid var(--border-subtle);
  display: flex; gap: var(--space-2);
}
.chat-input input {
  flex: 1; height: 40px;
  padding: 0 var(--space-3);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
}
.chat-input input:focus { outline: none; border-color: var(--neon-cyan); }
.chat-input .send {
  width: 40px; height: 40px;
  background: var(--grad-primary);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.chat-input .send svg { width: 18px; height: 18px; }

/* ============================================================
   SPA integration additions (not in the designer support.css)
   ============================================================ */

/* .pill — taken verbatim from the provided components.css (the live
   stylesheet has no .pill rule; only the quick-chips use it here). */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--dur-fast) var(--ease-out);
}
.pill svg { width: 14px; height: 14px; }
.pill:hover, .pill[aria-current="true"], .pill.is-active {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 0 1px var(--neon-cyan) inset;
}
.pill.is-active { background: rgba(0,229,255,0.08); }

/* FAQ accordion — neither the live CSS nor the designer package styles
   <details>/<summary>; minimal rules matching the .sup-panel aesthetic. */
.sup-panel details {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  padding: 0 var(--space-4);
}
.sup-panel details + details { margin-top: var(--space-2); }
.sup-panel summary {
  cursor: pointer;
  list-style: none;
  padding: var(--space-3) 0;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-primary);
  position: relative;
  padding-right: var(--space-6);
}
.sup-panel summary::-webkit-details-marker { display: none; }
.sup-panel summary::after {
  content: "+";
  position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-weight: 400;
}
.sup-panel details[open] summary::after { content: "–"; }
.sup-panel details[open] summary { color: var(--neon-cyan); }
.sup-panel details > p {
  margin: 0 0 var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Disabled contact row — "Live chat · Coming soon" placeholder until the
   real AI Support Agent ships. Non-interactive by design. */
.contact-row.is-disabled { opacity: 0.55; cursor: default; pointer-events: none; }
.contact-row.is-disabled .meta { color: var(--casino-gold); }
