/* ---------- Theme picker ----------
   Token-driven (not theme-scoped) so it automatically reads correctly in
   whichever theme is currently active — used on the login screen (compact)
   and Profile -> Settings -> Appearance (full). See js/components/themeSwitch.js. */

.theme-option {
  display: flex;
  align-items: center;
  text-align: start;
  width: 100%;
  transition: background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard);
}

.theme-option-swatch {
  flex-shrink: 0;
  display: block;
  border-radius: var(--radius-full);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.theme-option-check {
  flex-shrink: 0;
  display: flex;
  color: var(--color-accent-strong);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.theme-option.is-active .theme-option-check {
  opacity: 1;
  transform: scale(1);
}

/* ---------- Compact: login screen ---------- */
.theme-switch-compact {
  display: flex;
  gap: var(--space-2);
  width: 100%;
}

.theme-switch-compact .theme-option {
  flex: 1;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.theme-switch-compact .theme-option:hover,
.theme-switch-compact .theme-option:focus-visible {
  border-color: var(--color-border-strong);
}

.theme-switch-compact .theme-option.is-active {
  background: var(--color-surface-hover);
  border-color: var(--color-accent);
}

.theme-switch-compact .theme-option-swatch {
  width: 1.1rem;
  height: 1.1rem;
}

.theme-switch-compact .theme-option-text {
  flex: 1;
  min-width: 0;
}

.theme-switch-compact .theme-option-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-text);
}

.theme-switch-compact .theme-option-check svg {
  width: 15px;
  height: 15px;
}

/* ---------- Full: Settings -> Appearance ---------- */
.theme-switch-full {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.theme-switch-full .theme-option {
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.theme-switch-full .theme-option:hover,
.theme-switch-full .theme-option:focus-visible {
  background: var(--color-surface-hover);
  border-color: var(--color-border-strong);
}

.theme-switch-full .theme-option.is-active {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent);
}

.theme-switch-full .theme-option-swatch {
  width: 2.5rem;
  height: 2.5rem;
}

.theme-switch-full .theme-option-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.theme-switch-full .theme-option-label {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--color-text);
}

.theme-switch-full .theme-option-desc {
  font-size: var(--fs-xs);
  color: var(--color-text-secondary);
}

.theme-switch-full .theme-option-check svg {
  width: 22px;
  height: 22px;
}

/* ---------- Language picker ----------
   Same visual grammar as the theme picker above (compact pill row on login,
   full labelled cards in Settings) — see js/components/languageSwitch.js. */
.lang-switch {
  display: flex;
  gap: var(--space-2);
  width: 100%;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-weight: 700;
  color: var(--color-text);
  transition: background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard);
}

.lang-switch-compact .lang-option {
  flex: 1;
  min-height: 2.75rem;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: var(--fs-xs);
}

.lang-switch-compact .lang-option:hover,
.lang-switch-compact .lang-option:focus-visible {
  border-color: var(--color-border-strong);
}

.lang-switch-compact .lang-option.is-active {
  background: var(--color-surface-hover);
  border-color: var(--color-accent);
  color: var(--color-accent-strong);
}

.lang-switch-full .lang-option {
  min-height: var(--tap-min);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: var(--fs-base);
}

.lang-switch-full .lang-option:hover,
.lang-switch-full .lang-option:focus-visible {
  background: var(--color-surface-hover);
  border-color: var(--color-border-strong);
}

.lang-switch-full .lang-option.is-active {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent);
  color: var(--color-accent-strong);
}
