/* public/css/support.css — the Support pages (support.html, settings-support.html) and the custom dropdown (js/select.js). */
.sup-main { max-width: 600px; gap: 16px; }

/* ---- intro ---- */
.sup-hero { display: flex; align-items: center; gap: 14px; padding: 2px 2px 0; }
.sup-hero-ico { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.sup-hero-ico svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sup-title { font-size: 1.55rem; line-height: 1.15; margin: 0; }
.sup-sub { margin: 3px 0 0; color: var(--muted); font-size: .92rem; line-height: 1.45; }

/* ---- the form: one card, two sections ---- */
.sup-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-l, 18px); padding: 6px 18px 20px; display: flex; flex-direction: column; gap: 0; }
.sup-sec { display: flex; flex-direction: column; gap: 14px; padding: 16px 0; }
.sup-sec + .sup-sec { border-top: 1px solid var(--line); }
.sup-sec-head { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.02rem; }
.sup-step { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font-size: .78rem; font-weight: 700; }
.sup-card .field { gap: 6px; }
.sup-card label { color: var(--text); font-weight: 600; font-size: .9rem; }
.sup-card label small { color: var(--muted); font-weight: 400; }
.sup-card input[type="text"], .sup-card input[type="email"] { min-height: 46px; height: 46px; padding: 0 14px; border-radius: 12px; background: var(--surface); }
.sup-card input[type="text"]:hover, .sup-card input[type="email"]:hover { background: var(--surface); }

/* The describe box: only as tall as its own hint text (js/support.js fits it), grows while you type. */
.sup-card textarea { min-height: 0; height: auto; padding: 11px 14px; border-radius: 12px; background: var(--surface); resize: none; line-height: 1.45; font-size: .95rem; overflow-y: auto; max-height: 280px; display: block; }
.sup-card textarea::placeholder { font-size: .92rem; }

.sup-msg { color: var(--danger); font-size: .86rem; margin: 0; }
.sup-msg:empty { display: none; }
.sup-checking { color: var(--muted); font-size: .85rem; margin: 0; }
.sup-hint { color: var(--muted); font-size: .85rem; margin: 0; line-height: 1.5; }
.sup-hint:empty { display: none; }
.sup-fixed { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-height: 46px; padding: 0 14px; display: flex; align-items: center; font-weight: 600; word-break: break-all; }

/* Continue: faded and not clickable until everything required is filled, then solid and colourful. */
#sup-continue { min-height: 48px; font-size: 1rem; font-weight: 700; border-radius: 12px; width: 100%; margin-top: 6px;
  background: var(--surface-3); color: var(--muted); border-color: transparent; opacity: .75; cursor: not-allowed; }
#sup-continue.ready { background: var(--brand); color: var(--on-brand); border-color: var(--brand); opacity: 1; cursor: pointer; }
:where(html[data-input="mouse"]) #sup-continue:not(.ready):hover { background: var(--surface-3); }
  :where(html[data-input="mouse"]) #sup-continue.ready:hover { background: var(--brand-strong); border-color: var(--brand-strong); }

/* ---- code step ---- */
.sup-code { border: 1px dashed var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); margin-top: 4px; }
.sup-code input { font-family: var(--font-mono); font-size: 1.3rem; letter-spacing: .3em; text-align: center; }
.sup-code .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sup-code button.link { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 4px 0; font-size: .88rem; min-height: 0; }
.sup-code button.link:hover { background: none; }
.sup-code button.link:disabled { color: var(--muted); cursor: default; }

/* ---- sent ---- */
.sup-done { text-align: center; align-items: center; padding: 32px 22px; }
.sup-done .tick { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.sup-done .tick svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sup-ticket { font-family: var(--font-mono); font-size: 1.5rem; letter-spacing: .08em; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 18px; }
.sup-done p { margin: 0; color: var(--muted); line-height: 1.6; max-width: 46ch; }
.sup-done p b { color: var(--text); }


/* the Support pages use slightly taller controls */
.sup-card .sx-btn { min-height: 46px; height: 46px; padding: 0 14px; }

/* =====================================================================================================
   v137 — category first, "solution" categories, and the phone layout
   ===================================================================================================== */
/* A hint is written as short lines (one sentence per line) — keep the line breaks. */
.sup-hint { white-space: pre-line; }
/* A category with a ready-made solution page needs nothing else filled in. */
.sup-help-mode #sup-ticket-part { display: none; }
.sup-actions { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
.sup-actions .sup-msg { text-align: left; }
.sup-actions #sup-continue { margin-top: 0; }

/* ---------- phone: looks and behaves like the phone's own Settings app ---------- */
@media (max-width: 640px) {
  .sup-main { gap: 12px; padding: 12px 14px calc(24px + env(safe-area-inset-bottom)); }
  .page-bar-inner { padding: 8px 12px; }
  .sup-hero { gap: 12px; padding: 4px 2px 2px; }
  .sup-hero-ico { width: 44px; height: 44px; border-radius: 13px; }
  .sup-title { font-size: 1.35rem; }
  .sup-sub { font-size: .88rem; }

  /* no big outer card: every step is its own rounded card, like the rows in Settings */
  .sup-card { background: transparent; border: 0; padding: 0; gap: 12px; }
  #sup-ticket-part { display: flex; flex-direction: column; gap: 12px; }
  .sup-sec { background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px; padding: 16px 14px 18px; gap: 14px; }
  .sup-sec + .sup-sec { border-top: 1px solid var(--line); }
  .sup-sec-head { font-size: 1rem; }

  /* 16px text stops the phone from zooming in when a box is tapped; tall, easy-to-hit controls */
  .sup-card input[type="text"], .sup-card input[type="email"] { min-height: 50px; height: 50px; font-size: 16px; border-radius: 14px; }
  .sup-card textarea { font-size: 16px; border-radius: 14px; padding: 13px 14px; }
  .sup-card textarea::placeholder { font-size: 15px; }
  .sup-card .sx-btn { min-height: 50px; height: auto; padding: 10px 14px; border-radius: 14px; font-size: 16px; }
  .sup-card .sx-label { white-space: normal; line-height: 1.3; }
  .sup-fixed { min-height: 50px; border-radius: 14px; font-size: 16px; }
  .sup-code input { font-size: 1.5rem; min-height: 54px; height: 54px; }
  .sup-code .row button.link { min-height: 40px; padding: 8px 0; }
  .sup-msg, .sup-hint, .sup-checking { font-size: .88rem; }

  /* Continue stays at the bottom of the screen while you scroll, above the home bar */
  .sup-actions { position: sticky; bottom: 0; z-index: 5; margin: 0 -14px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 78%, transparent); }
  #sup-continue { min-height: 52px; font-size: 1.02rem; border-radius: 14px; }
}

/* ---------- the solution page (support-help.html) ---------- */
.sup-sub { white-space: pre-line; }
.help-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-l, 18px); padding: 6px 16px 8px; margin-bottom: 14px; }
.help-group { margin: 14px 0 4px; font-size: 1rem; color: var(--brand); }
.help-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.help-step { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.help-group + .help-steps .help-step:first-child, .help-card > .help-steps > .help-step:first-child { border-top: 0; }
.help-num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font-size: .8rem; font-weight: 700; margin-top: 1px; }
.help-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.help-t { font-size: 1rem; line-height: 1.35; }
.help-d { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.help-link { align-self: flex-start; margin-top: 4px; color: var(--brand); font-weight: 600; text-decoration: none; }
.help-note { margin: 0 2px 14px; color: var(--muted); font-size: .92rem; line-height: 1.55; }
.help-foot { display: flex; gap: 10px; flex-wrap: wrap; }
.help-foot .btn { flex: 1 1 200px; min-height: 48px; font-weight: 700; }
.help-foot .help-done { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
@media (max-width: 640px) {
  .help-card { padding: 4px 14px 6px; border-radius: 18px; }
  .help-d { font-size: .95rem; }
  .help-foot { flex-direction: column-reverse; gap: 10px; }
  .help-foot .btn { flex: none; width: 100%; min-height: 50px; border-radius: 14px; font-size: 1rem; }
}
