/* public/css/age.css — the age block (date of birth + country), the "not eligible" page, and Settings → Age.
   Uses the site's own colour variables, so it follows the theme and the accent colour on every device. */

.age-block { display: flex; flex-direction: column; gap: 12px; }
.age-block .field { margin: 0; }
.age-block .age-dob { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.age-hint { color: var(--muted); font-size: .8rem; line-height: 1.45; transition: color .15s; }
.age-hint.is-ok { color: var(--brand); font-weight: 600; }
.age-hint.is-bad { color: var(--danger); }
.age-why { color: var(--muted); font-size: .78rem; line-height: 1.5; text-align: center; margin: 2px 6px 0; }
.age-block .hidden { display: none !important; }

/* country / region pickers look like the other login inputs */
.auth-card .age-block .sx-btn { min-height: 54px; height: 54px; border-radius: 16px; padding: 0 18px; font-size: 1rem; font-weight: 400; }
.auth-card .age-block .sx-label { font-weight: 400; }
.auth-card .age-block .sx-btn.is-empty { color: var(--muted); }
.auth-card .age-block .sx-btn:hover { border-color: var(--muted); }
.auth-card .age-block .sx-btn:focus-visible, .auth-card .age-block .sx.is-open .sx-btn { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
@media (max-width: 640px) { .auth-card .age-block .sx-btn { min-height: 54px; font-size: 16px; } }

/* ---------- the "you can't join yet" page ---------- */
.age-stop { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.age-stop-badge { position: relative; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin: 2px 0 4px;
  color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 10px color-mix(in srgb, var(--brand) 7%, transparent), 0 0 0 22px color-mix(in srgb, var(--brand) 4%, transparent); }
.age-stop-badge svg { width: 38px; height: 38px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.age-stop h2 { margin: 6px 0 0; }
.age-stop-text { margin: 0; color: var(--muted); font-size: .97rem; line-height: 1.6; max-width: 34ch; }
.age-stop-text b { color: var(--text); font-weight: 600; }
.age-stop-card { width: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); text-align: left; }
.age-stop-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: .92rem; }
.age-stop-row span { color: var(--muted); }
.age-stop-row b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.age-stop-row.is-join b { color: var(--brand); }
.age-stop-law { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.5; text-align: center; }
.age-stop-actions { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.age-stop-actions .auth-switch { margin-top: 2px; }

/* ---------- Settings → Age ---------- */
.age-dialog-note { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.age-dialog .age-block .sx-btn { min-height: 46px; height: 46px; border-radius: 12px; }
.age-dialog .age-block .age-dob { width: 100%; box-sizing: border-box; min-height: 46px; padding: 0 14px; font-size: max(16px, 1rem); }
.age-dialog .age-block .age-why { text-align: left; margin: 0; }
.age-proof { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line); }
.age-proof label { font-size: .88rem; font-weight: 600; }
.age-proof-row { display: flex; gap: 8px; align-items: center; }
.age-proof-row input { flex: 1; min-width: 0; }
.age-proof-row button { flex: none; white-space: nowrap; }
.age-error { color: var(--danger); font-size: .88rem; line-height: 1.5; margin: 0; }
.age-error:empty { display: none; }
.age-error b { font-weight: 600; }
@media (max-width: 480px) { .age-proof-row { flex-direction: column; align-items: stretch; } }
@media (prefers-reduced-motion: reduce) { .age-hint { transition: none; } }

/* ---------- Settings → Age: two steps (age first, then the proof) ---------- */
.age-details .hidden { display: none !important; }
.age-btn-main { width: 100%; min-height: 46px; border-radius: 12px; }
.age-block.is-locked { opacity: .6; pointer-events: none; }
.age-details .age-proof { gap: 12px; padding-top: 14px; }
.age-details .age-proof .field { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.age-details .age-proof .otp-input { width: 100%; box-sizing: border-box; text-align: center; letter-spacing: .5em; font-variant-numeric: tabular-nums; font-size: 1.35rem; font-weight: 600; min-height: 54px; padding-left: .5em; }
.age-details .age-proof .otp-input::placeholder { letter-spacing: .5em; }
.age-resend-row { display: flex; justify-content: center; }
.age-resend { background: none !important; border: 0 !important; box-shadow: none !important; color: var(--text); font: inherit; font-weight: 600; font-size: .92rem; padding: 10px 14px; min-height: 40px; border-radius: 10px; cursor: pointer; }
.age-resend:not(:disabled):hover { color: var(--brand); background: var(--brand-soft) !important; }
.age-resend:disabled { color: var(--muted); cursor: default; font-weight: 500; }
.age-proof-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.age-btn-link { background: none !important; border: 0 !important; box-shadow: none !important; color: var(--muted); font: inherit; font-size: .88rem; padding: 8px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.age-btn-link:hover { color: var(--text); }
