/* =========================================================================
   Scaffold / shell components — used by placeholder screens and the new
   Settings shells (Customize, Integrations, Accessibility, Data & privacy)
   and the new module placeholders (Pets, Spirituality, Hobbies) + the 404.

   These screens have NO backend yet: controls are inert. State and meaning are
   always carried by icon + text + shape/border, never by hue alone — the app
   is used by a colour-blind person, and swatch colours here are decorative
   only (the theme NAME + a check mark carry the actual meaning).
   ========================================================================= */

/* ---- Wider settings variant (for grids/rows) ---- */
.settings-page { display: flex; flex-direction: column; gap: var(--sp-5); }
.settings-page--wide { max-width: none; }

/* ---- "Preview only" banner ---- */
.scaffold-banner {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--r-md);
  background: var(--c-surface-2);
  color: var(--c-ink-soft);
  font-size: var(--fs-sm);
}
.scaffold-banner strong { color: var(--c-ink); }
.scaffold-banner__icon { flex: 0 0 auto; }
.scaffold-banner__icon svg { width: 1.25rem; height: 1.25rem; }

/* Inert controls: readable but clearly not active. */
.settings-page [disabled],
.scaffold-page [disabled] { cursor: not-allowed; }
.settings-page .field input:disabled,
.settings-page input:disabled,
.settings-page textarea:disabled { background: var(--c-surface-2); color: var(--c-ink-soft); opacity: 1; }
.settings-page .switch:disabled { opacity: 0.75; }

.card-icon { display: inline-grid; place-items: center; vertical-align: -3px; margin-right: var(--sp-1); }
.card-icon svg { width: 1.15rem; height: 1.15rem; }

/* ---- Profile ---- */
.profile-row { display: flex; gap: var(--sp-4); align-items: flex-start; }
.profile-avatar {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 4rem; height: 4rem; border-radius: var(--r-full);
  background: var(--c-surface-2); border: 1px solid var(--c-border); color: var(--c-ink-faint);
}
.profile-avatar svg { width: 2rem; height: 2rem; }
.profile-fields { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.settings-card .settings-actions { margin-top: var(--sp-4); }

/* ---- Theme picker ---- */
.thm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-3); }
.thm-card {
  position: relative; display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--sp-3); border: 1px solid var(--c-border); border-radius: var(--r-md);
  background: var(--c-surface); cursor: not-allowed;
}
/* Selected: a strong ring + the "Current" flag carry the state, not colour. */
.thm-card.is-current { border-color: var(--c-accent-ink); box-shadow: inset 0 0 0 1px var(--c-accent-ink); }
.thm-card__preview { height: 64px; border-radius: var(--r-sm); padding: var(--sp-2); display: flex; flex-direction: column; justify-content: center; gap: 5px; overflow: hidden; border: 1px solid var(--c-border); }
.thm-preview__bar { height: 7px; border-radius: var(--r-full); width: 80%; }
.thm-preview__bar--lg { width: 55%; height: 9px; }
.thm-preview__bar--sm { width: 40%; }
/* Decorative theme swatches (not state-bearing). */
.thm-preview--light { background: #fafaf7; }
.thm-preview--light .thm-preview__bar { background: #cfcfc8; }
.thm-preview--light .thm-preview__bar--lg { background: #14151a; }
.thm-preview--dark { background: #14151a; border-color: #2a2c33; }
.thm-preview--dark .thm-preview__bar { background: #3a3d46; }
.thm-preview--dark .thm-preview__bar--lg { background: #e7e7e1; }
.thm-preview--futuristic { background: linear-gradient(135deg, #0b1020, #1b2b5a); border-color: #2f6bff; }
.thm-preview--futuristic .thm-preview__bar { background: rgba(120,160,255,0.4); }
.thm-preview--futuristic .thm-preview__bar--lg { background: #7aa2ff; }
.thm-card__row { display: flex; align-items: center; gap: var(--sp-2); }
.thm-card__icon { display: inline-grid; place-items: center; color: var(--c-ink-soft); }
.thm-card__icon svg { width: 1.1rem; height: 1.1rem; }
.thm-card__name { font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.thm-card__flag { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--c-accent-ink); }
.thm-card__flag svg { width: 0.85rem; height: 0.85rem; }
.thm-card__desc { font-size: var(--fs-xs); color: var(--c-ink-faint); }
.thm-card input { position: absolute; opacity: 0; pointer-events: none; }

/* ---- Segmented radio (language, sizes, density) ---- */
.seg-group { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: var(--r-full); }
.seg { display: inline-flex; align-items: center; padding: var(--sp-2) var(--sp-4); border-radius: var(--r-full); font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--c-ink-soft); cursor: not-allowed; white-space: nowrap; }
.seg.is-on { background: var(--c-surface); color: var(--c-accent-ink); font-weight: var(--fw-semibold); box-shadow: var(--shadow-sm); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }

/* ---- Option rows (toggles) ---- */
.opt-list { display: flex; flex-direction: column; }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-3) 0; border-bottom: 1px solid var(--c-border); }
.opt-row:last-child { border-bottom: 0; }
.opt-row--framed { padding: var(--sp-4); border: 1px solid var(--c-border); border-radius: var(--r-lg); background: var(--c-surface); }
.opt-row__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.opt-row__label { font-weight: var(--fw-medium); color: var(--c-ink); display: inline-flex; align-items: center; gap: var(--sp-2); }
.opt-row__hint { font-size: var(--fs-sm); color: var(--c-ink-soft); }

/* ---- Integrations ---- */
.intg-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.intg-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); border: 1px solid var(--c-border); border-radius: var(--r-md); background: var(--c-surface); }
.intg-row__icon { flex: 0 0 auto; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--r-md); background: var(--c-surface-2); color: var(--c-ink); }
.intg-row__icon svg { width: 1.25rem; height: 1.25rem; }
.intg-row__icon--inline { display: inline-grid; width: 1.4rem; height: 1.4rem; background: none; vertical-align: -4px; }
.intg-row__icon--inline svg { width: 1.1rem; height: 1.1rem; }
.intg-row__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.intg-row__name { font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.intg-row__desc { font-size: var(--fs-xs); color: var(--c-ink-faint); }
.intg-row__status { flex: 0 0 auto; padding: 2px var(--sp-2); border: 1px solid var(--c-border-strong); border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--c-ink-soft); }

/* ---- Danger zone (destructive) ---- */
.danger-card { border-color: var(--c-border-strong); border-width: 1px; }
.danger-card__flag { display: inline-flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--c-border-strong); border-left: 4px solid var(--c-ink); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--c-surface-2); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--c-ink); }
.danger-card__flag svg { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; }
.del-block { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--c-border); }
.del-block__label { font-weight: var(--fw-semibold); font-size: var(--fs-sm); margin-bottom: var(--sp-2); }
.del-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.del-chip { display: inline-flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--c-border); border-radius: var(--r-full); font-size: var(--fs-sm); background: var(--c-surface); cursor: not-allowed; }
.del-chip input { accent-color: var(--c-accent-ink); }

/* ---- New-module placeholder pages (Pets, Spirituality, Hobbies) ---- */
.scaffold-page { display: flex; flex-direction: column; gap: var(--sp-6); }
.scaffold-hero { display: flex; flex-direction: column; }
.scaffold-hero .page-desc { margin-top: var(--sp-3); }
.scaffold-hero__flag { margin-top: var(--sp-5); align-self: flex-start; display: inline-flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border: 1px dashed var(--c-border-strong); border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--c-ink-faint); }
.scaffold-hero__flag svg { width: 1rem; height: 1rem; }
.plan-intro { display: flex; align-items: flex-start; gap: var(--sp-4); }
.plan-intro__icon { flex: 0 0 auto; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: var(--r-md); background: var(--c-surface-2); color: var(--c-ink); }
.plan-intro__icon svg { width: 1.6rem; height: 1.6rem; }
.plan-intro .page-desc { margin-top: 0; }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-4); }
.plan-card { position: relative; display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-5); border: 1px solid var(--c-border); border-radius: var(--r-lg); background: var(--c-surface); }
.plan-card__icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--r-md); background: var(--c-accent-wash); color: var(--c-accent-ink); margin-bottom: var(--sp-1); }
.plan-card__icon svg { width: 1.4rem; height: 1.4rem; }
.plan-card__title { font-size: var(--fs-lg); letter-spacing: -0.01em; }
.plan-card__desc { font-size: var(--fs-sm); color: var(--c-ink-soft); line-height: var(--lh-snug); }
.plan-card__tag { align-self: flex-start; margin-top: var(--sp-1); padding: 2px var(--sp-2); border: 1px solid var(--c-border-strong); border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--c-ink-faint); }

/* ---- 404 ---- */
.notfound { max-width: 34rem; margin: clamp(var(--sp-6), 8vh, var(--sp-8)) auto 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.notfound__icon { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: var(--r-lg); background: var(--c-surface-2); color: var(--c-ink-faint); margin-bottom: var(--sp-4); }
.notfound__icon svg { width: 2rem; height: 2rem; }
.notfound__code { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: var(--fw-bold); color: var(--c-ink-faint); letter-spacing: 0.1em; }
.notfound__title { font-family: var(--font-display); font-size: var(--fs-3xl); letter-spacing: -0.02em; margin-top: var(--sp-1); }
.notfound__desc { margin-top: var(--sp-3); margin-bottom: var(--sp-5); color: var(--c-ink-soft); font-size: var(--fs-lg); }
.notfound__desc code { padding: 1px 6px; background: var(--c-surface-2); border-radius: var(--r-sm); font-size: 0.9em; }
.notfound .btn-primary { display: inline-flex; }

/* Customize: the theme cards are now interactive (light/dark); futuristic is a
   disabled "coming soon" card. */
.thm-card { cursor: pointer; }
.thm-card.is-soon { cursor: not-allowed; opacity: 0.55; }
.thm-card__flag--soon { color: var(--c-ink-faint); font-weight: var(--fw-semibold); }
