/* ui-settings.css — owned by ui-map (styles for js/ui/settings.js). */

.st-root { display: flex; flex-direction: column; gap: 0; }
.st-tabs { margin-bottom: 10px; }
.st-tabs .tab { flex: 1 1 0; text-align: center; }

.st-pane { display: none; flex-direction: column; gap: 10px; }
.st-pane.active { display: flex; animation: st-in 0.14s ease-out; }
@keyframes st-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.st-card { display: flex; flex-direction: column; gap: 4px; padding: 6px 10px; }
.st-desc { display: block; font-size: 11.5px; line-height: 1.35; color: var(--c-muted, #a8977a); }

/* ---------------------------------------------------------------------------- volume sliders */
.st-vol { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; }
.st-vol + .st-vol { border-top: 1px solid rgba(232, 196, 106, 0.1); }
.st-vol-ico {
  flex: none;
  width: 30px;
  height: 30px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-gold, #e8c46a);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #4a2a18, #1c0f08);
  box-shadow: 0 0 0 1px #0b0503, 0 0 0 2px rgba(184, 137, 63, 0.6), inset 0 1px 0 rgba(255, 220, 160, 0.12);
}
.st-vol-ico svg { display: block; }
.st-vol-main { flex: 1 1 auto; min-width: 0; }
.st-vol-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.st-vol-label { font-size: 14px; font-weight: 500; color: var(--c-text, #f3e6c8); }
.st-vol-val {
  min-width: 42px;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-gold, #e8c46a);
  font-variant-numeric: tabular-nums;
}
.st-pane.is-muted .st-vol { opacity: 0.45; }

#ui-root input[type="range"].st-range,
input[type="range"].st-range {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 20px;
  margin: 3px 0 2px;
  padding: 0;
  background: transparent;
  cursor: pointer;
  --val: 50%;
}
input[type="range"].st-range:focus { outline: none; }
input[type="range"].st-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
  border: 1px solid #0b0503;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 55%) 0 0 / var(--val) 100% no-repeat,
    linear-gradient(90deg, #8e1d15, #d8402f 60%, #e8c46a) 0 0 / var(--val) 100% no-repeat,
    linear-gradient(180deg, #080504, #221710);
  box-shadow: 0 0 0 1px rgba(139, 90, 43, 0.55), inset 0 1px 3px rgba(0, 0, 0, 0.85);
}
input[type="range"].st-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border-radius: 50%;
  border: 1px solid #fff0b8;
  background: radial-gradient(circle at 40% 32%, #fff8d8, #e8c46a 45%, #8a6220 100%);
  box-shadow: 0 0 0 1px #140904, 0 2px 4px rgba(0, 0, 0, 0.6);
  transition: transform 0.1s, box-shadow 0.1s;
}
input[type="range"].st-range:hover::-webkit-slider-thumb,
input[type="range"].st-range:focus-visible::-webkit-slider-thumb {
  transform: scale(1.1);
  box-shadow: 0 0 0 1px #140904, 0 0 10px rgba(232, 196, 106, 0.7);
}
input[type="range"].st-range::-moz-range-track {
  height: 8px; border-radius: 4px; border: 1px solid #0b0503;
  background: linear-gradient(90deg, #8e1d15, #d8402f 60%, #e8c46a) 0 0 / var(--val) 100% no-repeat, #120b07;
}
input[type="range"].st-range::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; border: 1px solid #fff0b8;
  background: radial-gradient(circle at 40% 32%, #fff8d8, #e8c46a 45%, #8a6220 100%);
}

/* ---------------------------------------------------------------------------- toggle switches */
.st-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
  cursor: pointer;
  user-select: none;
}
.st-toggles .st-toggle + .st-toggle { border-top: 1px solid rgba(232, 196, 106, 0.1); }
.st-toggle-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.st-toggle-label { font-size: 14px; font-weight: 500; color: var(--c-text, #f3e6c8); }
.st-mute { padding: 8px 10px; background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(232, 196, 106, 0.14); border-radius: var(--radius, 3px); }
.st-switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.st-switch {
  position: relative;
  flex: none;
  width: 44px;
  height: 22px;
  border-radius: 11px;
  background: linear-gradient(180deg, #120a06, #2a1a10);
  border: 1px solid #0b0503;
  box-shadow: 0 0 0 1px rgba(139, 90, 43, 0.65), inset 0 2px 4px rgba(0, 0, 0, 0.8);
  transition: background 0.15s, box-shadow 0.15s;
}
.st-switch::before {
  content: 'ปิด';
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9.5px;
  font-weight: 600;
  color: rgba(232, 220, 190, 0.45);
}
.st-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 32%, #f3ead8, #b8a98e 55%, #6f6350);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  transition: transform 0.16s ease-out, background 0.16s;
}
.st-switch-input:checked + .st-switch {
  background: linear-gradient(180deg, #a52a1d, #6a130d);
  box-shadow: 0 0 0 1px #e8c46a, inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 8px rgba(232, 196, 106, 0.3);
}
.st-switch-input:checked + .st-switch::before { content: 'เปิด'; right: auto; left: 6px; color: #fff0b8; }
.st-switch-input:checked + .st-switch::after {
  transform: translateX(22px);
  background: radial-gradient(circle at 40% 32%, #fff8d8, #e8c46a 45%, #8a6220);
}
.st-switch-input:focus-visible + .st-switch { outline: 2px solid rgba(232, 196, 106, 0.6); outline-offset: 2px; }
.st-toggle:hover .st-switch { filter: brightness(1.15); }

.st-pane-foot { gap: 10px; }
.st-note {
  padding: 6px 10px;
  font-size: 12px;
  color: #ffd98a;
  background: rgba(232, 196, 106, 0.08);
  border: 1px dashed rgba(232, 196, 106, 0.35);
  border-radius: var(--radius, 3px);
}

/* ---------------------------------------------------------------------------- key reference */
.st-keys-wrap { padding: 4px 8px 8px; max-height: min(430px, calc(100vh - 290px)); overflow-y: auto; }
.st-keys { width: 100%; border-collapse: collapse; font-size: 13px; }
.st-keys th {
  padding: 9px 2px 5px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-gold, #e8c46a);
  border-bottom: 1px solid rgba(232, 196, 106, 0.3);
}
.st-keys td { padding: 5px 2px; vertical-align: middle; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.st-keys tr:last-child td { border-bottom: none; }
.st-keys-k { width: 108px; white-space: nowrap; }
.st-keys-k .kbd { margin-right: 3px; min-width: 22px; line-height: 19px; font-size: 11.5px; }
.st-keys-to { margin: 0 4px 0 1px; color: var(--c-muted, #a8977a); }
.st-keys-v { color: #e8dcc0; }

/* ---------------------------------------------------------------------------- footer */
.st-footer { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(232, 196, 106, 0.16); }
.st-logout { min-height: 36px; font-size: 14px; }
.st-brand { margin-top: 8px; text-align: center; font-size: 11px; letter-spacing: 0.5px; color: rgba(168, 151, 122, 0.7); }
