/* LifeSync AI — settings.css : Settings page + text size / compact mode */

/* ── Text size (affects the main content area only) ── */
html[data-fs="small"] #content { zoom: .92; }
html[data-fs="large"] #content { zoom: 1.1; }

/* ── Compact mode ── */
html[data-compact] .card { padding: 12px; }
html[data-compact] .stat-card { padding: 11px 12px; }
html[data-compact] .task-item { padding: 8px 10px; margin-bottom: 5px; gap: 9px; }
html[data-compact] .card-title { margin-bottom: 9px; }
html[data-compact] #content { padding-top: 12px; }

/* ── Settings page ── */
.set-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.set-wrap .card { min-width: 0; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.set-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.set-label { font-size: 13px; font-weight: 600; color: var(--text); }
.set-hint { font-size: 11px; color: var(--text3); margin-top: 2px; line-height: 1.5; }
.set-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.set-ctl .input { width: auto; min-width: 120px; padding: 8px 10px; font-size: 13px; }
.set-ctl input[type="number"] { min-width: 0; width: 72px; }
.set-ctl input[type="time"] { min-width: 0; width: 112px; }

.seg { display: inline-flex; background: var(--bg3); border: 1px solid var(--border2); border-radius: var(--radius2); padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--text2); font: inherit; font-size: 12px; font-weight: 600; padding: 7px 11px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.seg button.active { background: var(--accent); color: #fff; }
.seg button:not(.active):hover { background: var(--bg4); }

.set-swatches { display: flex; gap: 9px; flex-wrap: wrap; }
.set-swatch { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; padding: 0; transition: transform .15s; }
.set-swatch:hover { transform: scale(1.12); }
.set-swatch.active { border: 3px solid var(--text); }

.sw { position: relative; width: 44px; height: 25px; flex: none; }
.sw input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; z-index: 2; }
.sw i { position: absolute; inset: 0; background: var(--bg5); border-radius: 99px; transition: background .2s; }
.sw i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: transform .2s; }
.sw input:checked + i { background: var(--accent); }
.sw input:checked + i::after { transform: translateX(19px); }
.sw input:focus-visible + i { outline: 2px solid var(--accent3); outline-offset: 2px; }

.set-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding: 12px; background: var(--bg3); border-radius: var(--radius2); font-size: 12px; color: var(--text2); align-items: center; }
.set-link { color: var(--accent3); cursor: pointer; font-weight: 600; font-size: 12px; background: none; border: 0; padding: 0; font-family: inherit; }
.set-danger { border-color: rgba(248,113,113,.35); }
.set-danger .card-title { color: var(--red); }
.btn-danger-s { background: rgba(248,113,113,.14); color: var(--red); border: 1px solid rgba(248,113,113,.4); border-radius: var(--radius2); padding: 9px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-danger-s:hover { background: rgba(248,113,113,.25); }
.btn-danger-s.solid { background: var(--red); color: #fff; }
.set-saved { font-size: 11px; color: var(--green); opacity: 0; transition: opacity .3s; }
.set-saved.show { opacity: 1; }

@media (max-width: 480px) {
  .set-wrap { grid-template-columns: 1fr; }
  .set-row { align-items: flex-start; }
  .seg button { padding: 7px 9px; }
}
