/* Support page (/support/): hero search, chat card, contact form. Builds on marketing.css. */

/* chat on/off: live-chat.js sets <html data-chat="on|off"> */
html:not([data-chat="on"]) [data-chat-only] { display: none !important; }
html:not([data-chat="off"]) [data-chat-off-only] { display: none !important; }
html[data-chat] [data-chat-pending] { display: none !important; }

.sp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Hero ── */
.support-hero .wrap { text-align: center; }
.support-hero h1 { font-size: clamp(40px, 6vw, 68px); margin-top: 18px; }
.support-hero .hero-sub { margin: 16px auto 0; max-width: 560px; }
.sp-search { position: relative; display: flex; align-items: center; gap: 8px; max-width: 620px; margin: 32px auto 0; padding: 7px 7px 7px 50px; background: #fff; border-radius: 16px; box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .08); }
.sp-search > svg { position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; margin-top: -10px; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; }
.sp-search input { flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: none; font: 500 16px var(--font); color: var(--ink); }
.sp-search input::placeholder { color: var(--ink-3); }
.sp-search input::-webkit-search-cancel-button { display: none; }
.sp-search:focus-within { box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .45), 0 0 0 4px rgba(127, 217, 157, .45); }
.sp-search button { height: 46px; padding: 0 20px; border: 0; border-radius: 11px; background: var(--brand-deep); color: #fff; font: 600 15px var(--font); cursor: pointer; transition: background .15s; }
.sp-search button:hover { background: #1b3d2b; }
.sp-popular { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; margin: 18px auto 0; max-width: 680px; font-size: 13.5px; color: #8aa596; }
.sp-popular span { padding: 5px 0; }
.sp-popular a { color: #d7e7dd; text-decoration: none; padding: 5px 12px; border-radius: 99px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); transition: background .15s; }
.sp-popular a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.sp-hero-ctas { justify-content: center; margin-top: 30px; }
.sp-btn-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sp-btn-icon.sp-fill { fill: currentColor; stroke: none; }

/* ── Contact ── */
.sp-contact { display: grid; grid-template-columns: 1fr 1.08fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.sp-contact .section-head { margin-bottom: 18px; }
.sp-lead { color: var(--ink-2); font-size: 16.5px; max-width: 480px; }

.sp-chat { display: flex; gap: 16px; margin-top: 28px; padding: 22px; border-radius: var(--r); background: linear-gradient(160deg, #f1faf4, #e5f4ea); border: 1px solid rgba(62, 172, 97, .2); }
.sp-chat-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(140deg, #4cc272, #2e9450); color: #fff; box-shadow: 0 8px 18px -6px rgba(46, 148, 80, .6); }
.sp-chat-icon svg { width: 24px; height: 24px; fill: currentColor; }
.sp-chat-body { flex: 1; min-width: 0; }
.sp-chat h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 6px; }
.sp-chat p { font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.sp-chat .btn { margin-top: 14px; }
.sp-chat-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--brand-ink); background: #fff; padding: 3px 10px; border-radius: 99px; }
.sp-chat-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px rgba(62, 172, 97, .2); }
.sp-chat-state.off { color: var(--ink-3); }
.sp-chat-state.off i { background: #c3cad5; box-shadow: none; }
html[data-chat="off"] .sp-chat { background: var(--surface-2); border-color: var(--border); }
html[data-chat="off"] .sp-chat-icon { background: #c3cad5; box-shadow: none; }

.sp-tips { margin-top: 28px; }
.sp-tips h3 { font-size: 16px; }
.sp-tips .ticks { margin-top: 12px; }
.sp-tips .ticks li { font-size: 14.5px; color: var(--ink-2); }

.sp-form-card { background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: clamp(22px, 3.4vw, 36px); box-shadow: var(--sh-lg); }
.sp-form h3, .sp-done h3 { font-size: 24px; }
.sp-form-sub { margin-top: 6px; color: var(--ink-2); font-size: 15px; }
.sp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.sp-field { display: block; margin-top: 18px; }
.sp-field > span { display: block; margin-bottom: 7px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.sp-field em { font-style: normal; font-weight: 500; color: var(--ink-3); }
.sp-field input, .sp-field select, .sp-field textarea { display: block; width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; font: 500 15.5px/1.4 var(--font); color: var(--ink); transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
.sp-field textarea { resize: vertical; min-height: 140px; }
.sp-field select { padding-right: 40px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a94a6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center / 18px no-repeat; cursor: pointer; }
.sp-field select:invalid { color: var(--ink-3); }
.sp-field select option { color: var(--ink); }
.sp-field input:hover, .sp-field select:hover, .sp-field textarea:hover { border-color: #b9c2ce; }
.sp-field input:focus, .sp-field select:focus, .sp-field textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(62, 172, 97, .16); }
.sp-field .is-invalid, .sp-field .is-invalid:focus { border-color: #dc4a4a; box-shadow: 0 0 0 4px rgba(220, 74, 74, .12); }
.sp-field textarea::placeholder { color: var(--ink-3); }
.sp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sp-error { margin-top: 16px; padding: 11px 14px; border-radius: 12px; background: #fdf0f0; color: #b42323; font-size: 14px; font-weight: 500; }
.sp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 22px; }
.sp-actions .btn { min-height: 50px; padding: 0 26px; }
.sp-actions .btn:disabled { opacity: .7; cursor: progress; transform: none; }
.sp-fine { font-size: 13px; color: var(--ink-3); }
.sp-fine a { color: var(--ink-2); }

.sp-done { text-align: center; padding: clamp(20px, 5vw, 48px) 8px; outline: 0; }
.sp-done-icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); box-shadow: 0 0 0 8px rgba(62, 172, 97, .08); animation: sp-pop .4s cubic-bezier(.2, 1.4, .4, 1); }
.sp-done-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.sp-done p { margin: 10px auto 0; max-width: 360px; color: var(--ink-2); }
.sp-done p b { color: var(--ink); overflow-wrap: anywhere; }
.sp-done .btn { margin-top: 24px; }
@keyframes sp-pop { from { transform: scale(.6); opacity: 0; } }

/* ── Self-serve links ── */
.sp-links .pillar .hub-more { display: inline-block; margin-top: 14px; font-size: 13.5px; font-weight: 600; color: var(--brand-ink); }

@media (max-width: 860px) {
  .sp-contact { grid-template-columns: 1fr; }
  .sp-contact-text .section-head { margin-bottom: 14px; }
}
@media (max-width: 1024px) and (min-width: 561px) {
  .sp-links { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .sp-grid { grid-template-columns: 1fr; }
  .sp-search { padding-left: 44px; }
  .sp-search > svg { left: 15px; }
  .sp-search button { padding: 0 14px; }
  .sp-popular span { width: 100%; padding: 0; }
  .sp-hero-ctas .btn { flex: 1 1 100%; }
  .sp-chat { flex-direction: column; gap: 12px; }
  .sp-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .sp-done-icon { animation: none; } }
