/* ═══════════════════════════════════════════════════════════
   settings-page.css  —  styles exclusive to /settings
═══════════════════════════════════════════════════════════ */

/* Session-only notice banner */
.settings-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(245, 197, 24, 0.07);
  border: 1px solid rgba(245, 197, 24, 0.22);
  border-radius: 10px;
  padding: 14px 22px;
  margin-bottom: 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 17px;
  color: var(--text-dim);
  line-height: 1.5;
}
.settings-notice-icon {
  font-size: 22px;
  color: var(--gold);
  flex-shrink: 0;
}
.settings-notice strong {
  color: var(--gold);
}

/* ── Group container ──────────────────────────────────────── */
.settings-group {
  background: var(--bg-1);
  border: 1px solid rgba(245, 197, 24, 0.10);
  border-radius: 14px;
  margin-bottom: 28px;
  overflow: hidden;
  flex-shrink: 0;
}

.settings-group-header {
  padding: 18px 28px 14px;
  border-bottom: 1px solid rgba(245, 197, 24, 0.10);
  background: rgba(245, 197, 24, 0.04);
}
.settings-group-label {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold);
  text-transform: uppercase;
}

/* ── Individual row ───────────────────────────────────────── */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s;
}
.settings-row:last-child { border-bottom: none; }
.settings-row:hover { background: rgba(255, 255, 255, 0.02); }

/* Functional rows (actually wired up) get a subtle left accent */
.settings-row.functional {
  border-left: 3px solid rgba(245, 197, 24, 0.45);
  padding-left: 25px;
}

.settings-row-info {
  flex: 1;
  min-width: 0;
}
.settings-row-name {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.settings-row-desc {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.55;
}

/* Page-scope badges */
.settings-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 4px;
  background: rgba(154, 165, 189, 0.12);
  color: var(--text-mute);
  letter-spacing: 0.02em;
}
.settings-badge.active-badge {
  background: rgba(245, 197, 24, 0.15);
  color: var(--gold);
}

/* ── Toggle switch ────────────────────────────────────────── */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-track {
  width: 56px;
  height: 30px;
  background: var(--bg-3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 15px;
  display: flex;
  align-items: center;
  padding: 3px;
  transition: background 0.2s, border-color 0.2s;
}
.toggle-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text-mute);
  transition: transform 0.2s, background 0.2s;
}
.toggle-switch input:checked + .toggle-track {
  background: rgba(245, 197, 24, 0.20);
  border-color: var(--gold);
}
.toggle-switch input:checked + .toggle-track .toggle-thumb {
  transform: translateX(26px);
  background: var(--gold);
}

/* ── Select ───────────────────────────────────────────────── */
.settings-select {
  appearance: none;
  background: var(--bg-2);
  border: 1px solid rgba(245, 197, 24, 0.20);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  padding: 10px 38px 10px 16px;
  cursor: pointer;
  min-width: 190px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23F5C518' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 0.15s;
  flex-shrink: 0;
}
.settings-select:hover,
.settings-select:focus {
  border-color: var(--gold);
  outline: none;
}
.settings-select option { background: var(--bg-2); }

/* ── Number input ─────────────────────────────────────────── */
.settings-number-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.settings-number {
  width: 90px;
  background: var(--bg-2);
  border: 1px solid rgba(245, 197, 24, 0.20);
  border-radius: 8px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  padding: 10px 14px;
  text-align: right;
  transition: border-color 0.15s;
}
.settings-number:hover,
.settings-number:focus {
  border-color: var(--gold);
  outline: none;
}
.settings-number-unit {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  color: var(--text-mute);
  min-width: 32px;
}

/* ── Text input ───────────────────────────────────────────── */
.settings-text {
  width: 260px;
  background: var(--bg-2);
  border: 1px solid rgba(245, 197, 24, 0.20);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  padding: 10px 16px;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.settings-text:hover,
.settings-text:focus {
  border-color: var(--gold);
  outline: none;
}
.settings-text::placeholder { color: var(--text-mute); }

/* ── Compound control (toggle + select side-by-side) ─────── */
.settings-compound {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

/* ── Reset row ────────────────────────────────────────────── */
.settings-reset-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 8px 0 36px;
  flex-shrink: 0;
}
.settings-reset-btn {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  border: 1px solid rgba(230, 57, 70, 0.40);
  background: rgba(230, 57, 70, 0.10);
  color: #F87171;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.settings-reset-btn:hover {
  background: rgba(230, 57, 70, 0.20);
  border-color: rgba(230, 57, 70, 0.70);
}
.settings-save-btn {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  padding: 12px 32px;
  border-radius: 8px;
  border: 1px solid rgba(245, 197, 24, 0.55);
  background: rgba(245, 197, 24, 0.12);
  color: var(--gold);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.settings-save-btn:hover:not(:disabled) {
  background: rgba(245, 197, 24, 0.22);
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(245, 197, 24, 0.20);
}
.settings-save-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.settings-reset-hint {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--text-mute);
}

/* -- Site-wide threshold tag + status (Visual Polish Pack) -------- */
.settings-global-tag {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(245, 197, 24, 0.14);
  color: #F5C518;
  border: 1px solid rgba(245, 197, 24, 0.30);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  vertical-align: middle;
}

.settings-threshold-status {
  margin-top: 10px;
  padding: 6px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--text-dim);
  min-height: 22px;
  border-radius: 6px;
  transition: background 0.2s ease;
}
.settings-threshold-status[data-kind="ok"]      { color: #4ADE80; background: rgba(74, 222, 128, 0.08); }
.settings-threshold-status[data-kind="err"]     { color: #F87171; background: rgba(248, 113, 113, 0.10); }
.settings-threshold-status[data-kind="pending"] { color: #F5C518; background: rgba(245, 197, 24, 0.08); }
