/* css/settings-app.css — System Settings app (macOS Sequoia style).
   Styles the element built by js/settings-app.js for the 'settings' window:
   210px frosted sidebar (search, account card, section rows) + white pane
   with grouped card rows. All classes tb-set- prefixed, scoped under
   .tb-set-root. */

.tb-set-root,
.tb-set-root * { box-sizing: border-box; }

.tb-set-root {
  display: flex;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #1d1d1f;
  text-align: left;
  background: #fff;
  user-select: none;
}

/* ---------- sidebar ---------- */

.tb-set-sidebar {
  width: 210px;
  flex: 0 0 210px;
  padding: 10px 8px;
  overflow-y: auto;
  background: rgba(245, 245, 247, 0.82);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.tb-set-search {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 2px 2px 10px;
  padding: 4px 8px;
  font-size: 12px;
  color: #6e6e73;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 7px;
  cursor: default;
}

.tb-set-search-glyph { font-size: 11px; opacity: 0.7; }

.tb-set-account {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 2px 12px;
  padding: 8px 9px;
  color: #fff;
  background: #0a84ff;
  border-radius: 8px;
}

.tb-set-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  font-size: 19px;
  background: linear-gradient(135deg, #ffe082, #ffb300);
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
}

.tb-set-account-name { font-size: 13px; font-weight: 600; line-height: 1.15; }
.tb-set-account-sub { font-size: 11px; opacity: 0.85; margin-top: 1px; }

.tb-set-nav { display: flex; flex-direction: column; gap: 1px; }

.tb-set-siderow {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 6px;
  font: inherit;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.tb-set-siderow:hover { background: rgba(0, 0, 0, 0.05); }

.tb-set-siderow-on,
.tb-set-siderow-on:hover { color: #0a5cff; background: rgba(10, 132, 255, 0.16); }

.tb-set-sideglyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  font-size: 11px;
  line-height: 1;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.tb-set-sidelabel { font-size: 13px; }

/* ---------- content / panes ---------- */

.tb-set-content { flex: 1; min-width: 0; overflow-y: auto; background: #fff; }

.tb-set-panehost { min-height: 100%; }
.tb-set-pane { display: none; padding: 18px 24px 28px; }
.tb-set-pane-on { display: block; }
.tb-set-pane-title { margin: 2px 0 14px; font-size: 20px; font-weight: 700; }

.tb-set-group {
  margin-bottom: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 10px;
}

.tb-set-group-label { margin: 0 2px 6px; font-size: 12px; color: #6e6e73; }

.tb-set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 6px 12px;
}

.tb-set-row + .tb-set-row,
.tb-set-row + .tb-set-subrow,
.tb-set-subrow + .tb-set-row { border-top: 1px solid rgba(0, 0, 0, 0.07); }

.tb-set-label { font-size: 13px; }
.tb-set-hint { font-size: 12px; color: #86868b; }
.tb-set-static, .tb-set-battery-pct { font-size: 13px; color: #6e6e73; font-variant-numeric: tabular-nums; }

.tb-set-subrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  padding: 6px 12px;
  font: inherit;
  color: inherit;
  text-align: left;
  background: #fff;
  border: 0;
  cursor: pointer;
}

.tb-set-subrow:hover { background: rgba(0, 0, 0, 0.03); }
.tb-set-chevron { font-size: 15px; color: #aeaeb2; }

/* ---------- toggle switch ---------- */

.tb-set-toggle {
  position: relative;
  width: 38px;
  height: 23px;
  flex: 0 0 38px;
  padding: 0;
  background: #d8d8de;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.18s ease;
}

.tb-set-toggle.tb-set-on { background: #30d158; }

.tb-set-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 19px;
  height: 19px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease;
}

.tb-set-toggle.tb-set-on .tb-set-knob { transform: translateX(15px); }

/* ---------- sliders ---------- */

.tb-set-sliderwrap { display: flex; align-items: center; gap: 9px; }

.tb-set-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 150px;
  height: 4px;
  background: #d8d8de;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.tb-set-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.tb-set-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.tb-set-slider:disabled { opacity: 0.35; cursor: default; }

.tb-set-slider-val {
  min-width: 34px;
  font-size: 12px;
  color: #6e6e73;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- segmented control ---------- */

.tb-set-seg {
  display: inline-flex;
  gap: 1px;
  padding: 2px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 8px;
}

.tb-set-seg-btn {
  padding: 3px 12px;
  font: inherit;
  font-size: 12px;
  color: #1d1d1f;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.tb-set-seg-btn.tb-set-seg-on { font-weight: 600; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18); }

/* ---------- wallpaper picker ---------- */

.tb-set-wp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.tb-set-thumb {
  position: relative;
  height: 56px;
  padding: 0;
  overflow: hidden;
  background: #e8e8ed;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.tb-set-thumb-img { display: block; width: 100%; height: 100%; object-fit: cover; }

.tb-set-thumb.tb-set-thumb-on { box-shadow: 0 0 0 3px #0a84ff; }

.tb-set-wp-caption { min-height: 14px; margin: 2px 2px 0; font-size: 11px; color: #86868b; }

/* ---------- buttons / misc ---------- */

.tb-set-btn {
  display: inline-block;
  padding: 4px 14px;
  font: inherit;
  font-size: 13px;
  color: #1d1d1f;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  cursor: pointer;
}

.tb-set-btn:hover { background: rgba(0, 0, 0, 0.04); }

.tb-set-moreinfo { display: flex; justify-content: flex-end; }

/* narrow windows: keep the sidebar compact */
@media (max-width: 640px) {
  .tb-set-sidebar { width: 168px; flex-basis: 168px; }
  .tb-set-slider { width: 110px; }
}
