/* eResonate — settings.css · settings & privacy.
   Sits on styles.css. Prefixed .st- so it cannot collide with the app. */

.st-main {
  max-width: 780px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 34px) 24px 80px;
}

/* ---------- signed-out gate ---------- */
.st-gate { text-align: center; padding: 60px 0; }
.st-gate[hidden] { display: none; }
.st-gate h1 {
  font-family: 'Outfit', sans-serif; font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -.03em;
  margin: 0 0 10px; color: var(--text);
}
.st-gate p { color: var(--text-muted); margin: 0 auto 24px; max-width: 44ch; }
.st-gate-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- head ---------- */
.st-shell[hidden] { display: none; }
.st-head { margin-bottom: 22px; }
.st-head h1 {
  font-family: 'Outfit', sans-serif; font-weight: 800;
  font-size: var(--title-page); letter-spacing: var(--title-track);
  margin: 0 0 5px; color: var(--text);
}
.st-who { margin: 0; color: var(--text-muted); font-size: .98rem; }

/* ---------- tabs ---------- */
.st-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 26px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.st-tab {
  appearance: none; border: 1px solid transparent; background: transparent;
  color: var(--text-muted); font-family: 'Outfit', sans-serif; font-weight: 600;
  font-size: .92rem; padding: 9px 15px; border-radius: 9px; cursor: pointer;
  transition: color .15s, background .15s;
}
.st-tab:hover { color: var(--text); background: var(--surface-hover); }
.st-tab.on { color: var(--text); background: rgba(46, 92, 255, .18); border-color: var(--border-accent); }
.st-tab .dot {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px;
  background: var(--accent); color: var(--on-accent); border-radius: 999px;
  font-size: .7rem; font-weight: 800; line-height: 18px; text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---------- panels & cards ---------- */
.st-panel[hidden] { display: none; }
.st-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 16px;
}
.st-card h2 {
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.12rem;
  letter-spacing: -.01em; margin: 0 0 5px; color: var(--text);
}
.st-lead { margin: 0 0 18px; color: var(--text-muted); font-size: .93rem; line-height: 1.55; max-width: 62ch; }

/* ---------- a setting row ---------- */
.st-row {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  cursor: pointer;
}
.st-row:first-of-type { border-top: 0; padding-top: 0; }
.st-row-col { flex-direction: column; gap: 12px; cursor: default; }
.st-row-txt { flex: 1; min-width: 0; }
.st-row-txt b {
  display: block; font-family: 'Outfit', sans-serif; font-weight: 600;
  font-size: 1rem; color: var(--text); margin-bottom: 3px;
}
.st-row-txt small { display: block; color: var(--text-muted); font-size: .87rem; line-height: 1.55; }

/* ---------- switch ---------- */
.st-switch { position: relative; flex: none; width: 46px; height: 26px; margin-top: 2px; }
.st-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.st-slider {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--bg-dark); border: 1px solid var(--border);
  transition: background .18s, border-color .18s;
  pointer-events: none;
}
.st-slider::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--text-muted);
  transition: transform .18s, background .18s;
}
.st-switch input:checked + .st-slider { background: var(--accent); border-color: var(--accent); }
.st-switch input:checked + .st-slider::after { transform: translateX(20px); background: #fff; }
.st-switch input:focus-visible + .st-slider { outline: 2px solid var(--accent-text); outline-offset: 2px; }

/* ---------- segmented control ---------- */
.st-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.st-seg button {
  appearance: none; border: 1px solid var(--border); background: var(--bg-dark);
  color: var(--text-muted); font-family: 'Outfit', sans-serif; font-weight: 600;
  font-size: .87rem; padding: 9px 15px; border-radius: 9px; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.st-seg button:hover { color: var(--text); }
.st-seg button.on { border-color: var(--accent); color: var(--text); background: rgba(46, 92, 255, .18); }

/* ---------- people rows ---------- */
.st-person {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--border);
}
.st-person:first-child { border-top: 0; }
.st-av {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center; object-fit: cover;
  font-family: 'Outfit', sans-serif; font-weight: 800; font-size: .8rem; color: var(--on-accent);
}
.st-person-body { flex: 1; min-width: 0; }
.st-person-name {
  font-family: 'Outfit', sans-serif; font-weight: 600; font-size: .98rem; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-person-sub { font-size: .83rem; color: var(--text-muted); }
.st-person-acts { display: flex; gap: 7px; flex: none; }
.st-mini {
  appearance: none; border: 1px solid var(--border); background: transparent;
  color: var(--text); font-family: 'Outfit', sans-serif; font-weight: 600;
  font-size: .83rem; padding: 7px 13px; border-radius: 8px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.st-mini:hover { border-color: var(--accent); }
.st-mini.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.st-mini.primary:hover { background: var(--accent-hover); }
.st-mini[disabled] { opacity: .5; cursor: default; }

.st-none { color: var(--text-dim); font-size: .9rem; margin: 0; }

/* ---------- account ---------- */
.st-code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: .86rem; line-height: 1.6;
  background: var(--bg-dark); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; color: var(--text-muted);
  word-break: break-word;
}
.st-danger { border-color: rgba(255, 68, 56, .3); }
.st-danger h2 { color: color-mix(in srgb, #FF7A70, black var(--ink-shift)); }
.btn-danger {
  background: rgba(255, 68, 56, .14); color: color-mix(in srgb, #FF7A70, black var(--ink-shift));
  border: 1px solid rgba(255, 68, 56, .4);
}
.btn-danger:hover { background: rgba(255, 68, 56, .22); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); background: var(--surface-hover); }

/* A toast, not part of the flow — sticky inside the panel landed it on top of
   the first card's text. */
.st-saved {
  position: fixed; z-index: 200;
  left: 50%; bottom: 26px; transform: translateX(-50%);
  background: #0F2A1E; color: var(--money);
  border: 1px solid rgba(62, 224, 140, .45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: .88rem;
  padding: 11px 20px; border-radius: 999px;
  animation: stToast .22s ease-out;
}
@keyframes stToast { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .st-saved { animation: none; } }
.st-saved[hidden] { display: none; }

@media (max-width: 560px) {
  .st-main { padding: calc(var(--nav-h) + 20px) 16px 60px; }
  .st-card { padding: 18px; }
  .st-row { gap: 14px; }
  .st-person-acts { flex-direction: column; }
}

.st-gate-fine { color: var(--text-dim); font-size: .85rem; margin: 16px auto 0; max-width: 44ch; line-height: 1.5; }
.st-gate p b { color: var(--text); font-weight: 600; }

/* ---------- your address on eResonate ----------
   The prefix is part of the control, not a label beside it: a person needs to
   see the whole URL they are choosing, not a bare word in a box. */
.st-handle { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.st-handle-field {
  display: flex; align-items: center; flex: 1 1 260px; min-width: 0;
  background: var(--surface-hover);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 0 12px; min-height: 46px;
  cursor: text;
}
.st-handle-field:focus-within { border-color: var(--accent); }
.st-handle-pre { color: var(--text-dim); font-size: .86rem; white-space: nowrap; flex: none; }
.st-handle-field input {
  flex: 1 1 auto; min-width: 0;
  background: none; border: 0; outline: none;
  color: var(--text); font-family: inherit; font-size: .92rem;
  padding: 10px 0 10px 2px;
}
.st-handle .btn { flex: 0 0 auto; min-height: 46px; }
.st-handle-note { margin: 8px 0 0; font-size: .82rem; color: var(--text-muted); min-height: 1.1em; }
.st-handle-note.ok { color: var(--money); }
.st-handle-note.bad { color: var(--live); }

/* ---------- your phone ----------
   Reuses the address control's shape so the two fields on this tab read as
   one family. The code box is centred and spaced like the digits it takes. */
#stPhoneForm .st-handle-pre { margin-right: 6px; }
.st-code-field input { text-align: center; letter-spacing: .3em; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.st-phone-alt { margin: 10px 0 0; font-size: .84rem; color: var(--text-dim); }
.st-phone-alt span { margin: 0 .45rem; }
.st-linkbtn {
  background: none; border: 0; padding: 0; font: inherit; font-weight: 700;
  color: var(--accent-text, var(--accent)); text-decoration: underline; cursor: pointer;
}
.st-linkbtn:hover { color: var(--text); }
.st-linkbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.st-linkbtn:disabled { opacity: .5; cursor: default; }
.st-phone-on {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--surface-hover); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px 10px 14px; min-height: 46px;
  font-variant-numeric: tabular-nums;
}
.st-phone-ok {
  margin-left: 8px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--money);
}

/* ---------- your email ----------
   The verified phone's box and label, so the two ways in on this tab read
   alike. Not confirmed is grey, not --live red or --flame orange: styles.css
   gives each of those one meaning, and this is a thing to do, not an alarm. */
.st-email-addr { overflow-wrap: anywhere; }
.st-phone-ok.st-email-off { color: var(--text-muted); }
.st-email-help { margin: 12px 0 0; color: var(--text-muted); font-size: .87rem; line-height: 1.55; max-width: 62ch; }
.st-email-acts { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin-top: 14px; }
.st-email-acts .st-linkbtn { font-size: .86rem; }
/* Changing the address (2 Oct 2026): the new-address and code steps sit under
   the box, in the phone card's controls. */
.st-email-new { margin-top: 12px; }

/* A plain text field inside a settings row. */
.st-input {
  width: 100%;
  background: var(--field-bg);
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-family: inherit; font-size: .92rem;
  padding: 12px; min-height: 46px;
}
.st-input:focus { outline: none; border-color: var(--accent); }
.st-input::placeholder { color: var(--text-dim); }

@media (max-width: 480px) {
  .st-handle .btn { flex: 1 1 auto; }
}

/* ---------- email & notifications ----------
   The locked rows are deliberately the same shape as the switchable ones. A
   person scanning the list should be able to see that payouts and moderation
   notices exist and are handled, rather than wonder why they are missing. */
.st-sub { font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 700; margin: 0 0 4px; }
.st-row--locked { cursor: default; }
.st-row--locked .st-row-txt b { opacity: 0.9; }
.st-lock { flex: none; margin-top: 2px; font-size: 1rem; opacity: 0.55; line-height: 26px; }
.st-switch input:disabled + .st-slider { opacity: 0.45; cursor: default; }

/* The theme row carries a control rather than a switch, so it centres on it
   and is not itself clickable — the radios inside are the targets. */
.st-row--control { align-items: center; cursor: default; }
@media (max-width: 560px) {
  .st-row--control { flex-direction: column; align-items: flex-start; gap: 12px; }
}
