/*
 * settings.css — Settings gear button + slide-in drawer
 *
 * Button: fixed bottom-right, 44×44.
 * .chrome-lang in components.css sits 12px to its left.
 * Drawer: 320px, slides in from the right (0.25s).
 */

/* ── Gear button ──────────────────────────────────────────────────────── */

#settings-btn {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  right: calc(24px + env(safe-area-inset-right, 0px));
  z-index: 700;
  width: 44px;
  height: 44px;
  margin: 0;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

#settings-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

/* ── Overlay + drawer ─────────────────────────────────────────────────── */

#settings-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 800;
  background: var(--overlay-bg-light);
}

#settings-overlay.open {
  display: block;
}

#settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100%;
  max-width: 100%;
  background: var(--panel);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 801;
}

#settings-overlay.open #settings-panel {
  transform: translateX(0);
}

.settings-panel-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.settings-panel-close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 16px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.settings-panel-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.settings-sections {
  flex: 1;
}

.settings-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.settings-section .label-section {
  margin-bottom: 10px;
}

.settings-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.settings-toggle-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
}

.settings-version {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
  opacity: 0.4;
  text-align: center;
  padding: 16px 0 4px;
  margin-top: auto;
}
