/* ================================================================
   SETTINGS CSS v4 — Dark + Green accent
================================================================ */

#screen-settings {
  background: #0d0d0d;
  font-family: 'Google Sans', -apple-system, sans-serif;
  overflow: hidden;
}

.settings-container { display: flex; flex-direction: column; height: 100%; }

/* ── Header ─────────────────────────────────────────────── */
.settings-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 14px;
  padding-top: calc(env(safe-area-inset-top) + 16px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.settings-back {
  background: rgba(52,199,89,0.12);
  border: none;
  color: #34c759;
  font-size: 30px;
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  padding-bottom: 2px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.settings-back:active { background: rgba(52,199,89,0.24); }
.settings-title { font-size: 22px; font-weight: 700; color: #fff; flex: 1; }
.settings-badge {
  background: linear-gradient(135deg, #34c759, #1a8a3a);
  color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 5px 11px; border-radius: 20px;
  letter-spacing: 0.05em;
}

/* ── Scroll area ────────────────────────────────────────── */
.settings-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: calc(env(safe-area-inset-bottom) + 40px);
  -webkit-overflow-scrolling: touch;
}
.settings-scroll::-webkit-scrollbar { display: none; }

/* ── Section ────────────────────────────────────────────── */
.settings-section { margin-bottom: 20px; }
.section-label {
  font-size: 11px; font-weight: 700;
  color: #34c759;
  letter-spacing: 0.12em;
  margin-bottom: 8px; padding-left: 4px;
}

/* ── Card ───────────────────────────────────────────────── */
.settings-card {
  background: #1a1a1a;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}
.card-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; gap: 12px;
}
.card-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 0 16px; }
.row-label { font-size: 15px; font-weight: 500; color: #fff; flex-shrink: 0; }
.row-sub { font-size: 12px; color: #666; display: block; margin-top: 2px; }

/* ── Style switcher — compact ───────────────────────────── */
.style-switcher { display: flex; gap: 10px; }
.style-btn {
  flex: 1;
  background: #1a1a1a;
  border: 2px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 10px 8px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: #555;
  font-size: 12px; font-weight: 500;
  font-family: 'Google Sans', sans-serif;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.style-btn.active { border-color: #34c759; background: rgba(52,199,89,0.07); color: #34c759; }

.style-preview { height: 36px; display: flex; align-items: center; gap: 3px; }
.prev-slot { width: 24px; height: 32px; background: rgba(255,255,255,0.07); border-radius: 5px; }
.prev-sep  { color: #444; font-size: 14px; font-weight: 300; }
.ios-preview .prev-slot { border-radius: 9px; }

/* ── Segmented control ──────────────────────────────────── */
.segmented-control { display: flex; background: #0d0d0d; border-radius: 10px; padding: 3px; gap: 2px; }
.seg-btn {
  background: none; border: none; color: #555;
  font-size: 11px; font-weight: 700; padding: 6px 10px; border-radius: 8px;
  cursor: pointer; white-space: nowrap; font-family: 'Google Sans', sans-serif;
  transition: background 0.15s, color 0.15s;
}
.seg-btn.active { background: #34c759; color: #000; }

/* ── Digit inputs ───────────────────────────────────────── */
.digits-row { flex-wrap: wrap; padding: 12px 16px; }
.digit-inputs { display: flex; gap: 8px; align-items: flex-end; justify-content: flex-end; flex-wrap: wrap; }
.digit-input-group { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.digit-input-group label { font-size: 10px; color: #34c759; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.digit-input-group input {
  width: 62px; height: 54px;
  background: #0d0d0d; border: 1.5px solid rgba(255,255,255,0.1); border-radius: 12px;
  color: #fff; font-size: 28px; font-weight: 700; text-align: center;
  font-variant-numeric: tabular-nums; outline: none; -webkit-appearance: none;
  font-family: 'Google Sans', sans-serif; transition: border-color 0.15s;
}
.digit-input-group input:focus { border-color: #34c759; }

/* ── Perform button ─────────────────────────────────────── */
.confirm-row { padding: 8px 16px 16px; }
.perform-btn {
  width: 100%; height: 52px;
  background: #2a2a2a; border: none; border-radius: 14px;
  color: #444; font-size: 16px; font-weight: 700;
  cursor: not-allowed; letter-spacing: 0.04em; font-family: 'Google Sans', sans-serif;
  transition: background 0.25s, color 0.25s, transform 0.1s, box-shadow 0.25s;
}
.perform-btn.ready {
  background: linear-gradient(135deg, #1a5c2e, #218a3e);
  color: #4cde80; cursor: pointer;
  box-shadow: 0 4px 20px rgba(52,199,89,0.18);
}
.perform-btn.ready:active { transform: scale(0.97); }

/* ── Method options ─────────────────────────────────────── */
.method-options { padding: 4px 0; }
.method-option { display: block; cursor: pointer; }
.method-option input[type="radio"] { display: none; }
.method-content {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px;
  border-left: 3px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}
.method-option.selected .method-content {
  border-left-color: #34c759;
  background: rgba(52,199,89,0.05);
}
.method-icon { font-size: 22px; line-height: 1; }
.method-title { font-size: 15px; font-weight: 500; color: #fff; }
.method-desc  { font-size: 12px; color: #666; }

.method-sub {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 13px 52px;
  font-size: 14px; color: #aaa;
  background: rgba(52,199,89,0.03);
  border-left: 3px solid rgba(52,199,89,0.35);
}
.method-sub.hidden { display: none; }

.num-stepper { display: flex; align-items: center; gap: 10px; background: #0d0d0d; border-radius: 12px; padding: 3px 8px; }
.stepper-btn {
  background: #2a2a2a; border: none; color: #34c759; font-size: 22px;
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; line-height: 1; transition: background 0.1s;
}
.stepper-btn:active { background: #34c759; color: #000; }
.stepper-val { font-size: 22px; font-weight: 700; color: #34c759; min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; }

/* ── Toggle ─────────────────────────────────────────────── */
.toggle-switch { position: relative; width: 52px; height: 30px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute; inset: 0;
  background: #2a2a2a; border-radius: 30px; cursor: pointer;
  transition: background 0.22s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 24px; height: 24px; left: 3px; top: 3px;
  background: #555; border-radius: 50%;
  transition: transform 0.22s, background 0.22s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.toggle-switch input:checked + .toggle-slider { background: rgba(52,199,89,0.25); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); background: #34c759; }

/* ── Add Up ─────────────────────────────────────────────── */
.addUp-detail { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.sum-input {
  width: 100%; height: 56px;
  background: #0d0d0d; border: 1.5px solid rgba(255,255,255,0.1); border-radius: 12px;
  color: #fff; font-size: 30px; font-weight: 700; text-align: center;
  outline: none; -webkit-appearance: none; font-family: 'Google Sans', sans-serif;
  transition: border-color 0.15s;
}
.sum-input:focus { border-color: #34c759; }
.addUp-hint { font-size: 12px; color: #555; text-align: center; }
