/* ── FILE: /css/settings/settings.css | Settings page styles ── */

.settings-layout {
  display: flex;
  padding-top: var(--nav-h);
  min-height: 100vh;
}

/* ── SIDEBAR NAV ─────────────────────────────────────────────── */
.settings-nav {
  width: 220px; flex-shrink: 0;
  padding: 2.5rem 1.25rem;
  border-right: 1px solid var(--border);
  position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}
.settings-nav__title {
  font-family: var(--font-disp); font-size: 0.65rem;
  font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.5rem; padding-left: 0.75rem;
}
.settings-nav__item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 0.75rem; border-radius: var(--radius-sm);
  font-size: 0.72rem; color: var(--muted); text-decoration: none;
  transition: background var(--transition), color var(--transition);
  margin-bottom: 0.2rem; cursor: pointer;
}
.settings-nav__item:hover { background: var(--surface2); color: var(--text); }
.settings-nav__item.active { background: var(--surface2); color: var(--accent); }
.settings-nav__item--danger { color: var(--danger) !important; margin-top: 1rem; }
.settings-nav__item--danger:hover { background: rgba(255,77,109,0.08); }

/* ── MAIN ────────────────────────────────────────────────────── */
.settings-main {
  flex: 1; padding: 2.5rem 3rem;
  max-width: 760px;
}

/* ── SECTIONS ────────────────────────────────────────────────── */
.settings-section { display: none; }
.settings-section.active { display: block; }

.settings-section__header { margin-bottom: 2rem; }
.settings-section__title {
  font-family: var(--font-serif); font-size: 2rem; font-weight: 300;
  margin-bottom: 0.3rem;
}
.settings-section__sub { font-size: 0.72rem; color: var(--muted); }

/* ── CARDS ───────────────────────────────────────────────────── */
.settings-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem;
  margin-bottom: 1.25rem;
}
.settings-card--danger { border-color: rgba(255,77,109,0.3); }
.settings-card__title {
  font-family: var(--font-serif); font-size: 1.1rem;
  font-weight: 400; margin-bottom: 1.25rem;
}
.settings-hint { font-size: 0.65rem; color: var(--muted); margin-top: 0.5rem; line-height: 1.7; }

/* ── AVATAR ROW ──────────────────────────────────────────────── */
.avatar-row { display: flex; gap: 1.5rem; align-items: center; }
.avatar-wrap { position: relative; }
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--border2);
}
.avatar-change-btn {
  position: absolute; bottom: 0; right: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); border: none; color: #fff;
  font-size: 0.65rem; display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.avatar-name { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 400; }
.avatar-email { font-size: 0.68rem; color: var(--muted); margin-top: 0.2rem; }

/* ── TOGGLE ROWS ─────────────────────────────────────────────── */
.settings-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 0; border-bottom: 1px solid var(--border);
}
.settings-toggle-row:last-of-type { border-bottom: none; }
.settings-toggle-label { font-size: 0.78rem; font-weight: 500; margin-bottom: 0.2rem; }
.settings-toggle-sub   { font-size: 0.63rem; color: var(--muted); }

/* ── TOGGLE SWITCH ───────────────────────────────────────────── */
.toggle-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--border2); border-radius: 24px;
  transition: background var(--transition);
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%;
  transition: transform var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── DANGER ROWS ─────────────────────────────────────────────── */
.danger-row {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.danger-row__title { font-size: 0.82rem; font-weight: 500; margin-bottom: 0.3rem; }
.danger-row__sub   { font-size: 0.65rem; color: var(--muted); line-height: 1.6; }

/* ── COLOR SWATCHES ──────────────────────────────────────────── */
.color-swatches { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.swatch {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid transparent; cursor: pointer;
  transition: transform var(--transition), border-color var(--transition);
}
.swatch:hover { transform: scale(1.15); }
.swatch.active { border-color: #fff; transform: scale(1.1); }

/* ── BUBBLE STYLE OPTIONS ────────────────────────────────────── */
.bubble-style-options { display: flex; gap: 0.75rem; }
.bubble-style-opt {
  padding: 0.6rem 1.4rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--muted); font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
  transition: all var(--transition);
}
.bubble-style-opt:hover { border-color: var(--accent); color: var(--accent); }
.bubble-style-opt.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent; color: #fff;
}

/* ── FONT SIZE SLIDER ────────────────────────────────────────── */
.font-size-row { display: flex; align-items: center; gap: 1rem; }
.font-size-label { font-size: 0.8rem; color: var(--muted); }
.settings-range {
  flex: 1; accent-color: var(--accent); height: 4px; cursor: pointer;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .settings-layout { flex-direction: column; }
  .settings-nav {
    width: 100%; height: auto; position: static;
    display: flex; flex-wrap: wrap; gap: 0.4rem;
    padding: 1rem; border-right: none; border-bottom: 1px solid var(--border);
  }
  .settings-nav__title { display: none; }
  .settings-main { padding: 1.5rem 1rem; }
  .danger-row { flex-direction: column; align-items: flex-start; }
}
