/*
 * OUBOT language control
 *
 * One visual system, two touch points: the header is for immediate reading
 * changes; the mobile menu keeps the same control as a global preference.
 */
.oubot-language-switch {
  --oubot-language-ink: #253142;
  --oubot-language-muted: #687386;
  --oubot-language-border: rgba(232, 146, 124, .34);
  --oubot-language-surface: rgba(255, 255, 255, .88);
  --oubot-language-active: #253142;
  --oubot-language-active-ink: #fff;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 40px;
  padding: 3px;
  border: 1px solid var(--oubot-language-border);
  border-radius: 12px;
  background: var(--oubot-language-surface);
  box-shadow: 0 3px 10px rgba(37, 49, 66, .04);
  isolation: isolate;
}

.oubot-language-switch__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--oubot-language-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.oubot-language-switch__option:hover {
  color: var(--oubot-language-ink);
  background: rgba(232, 146, 124, .10);
}

.oubot-language-switch__option:focus-visible {
  outline: 2px solid #ed8d73;
  outline-offset: 2px;
}

.oubot-language-switch__option:active {
  transform: scale(.97);
}

.oubot-language-switch__option.is-active,
.oubot-language-switch__option[aria-current="true"],
.oubot-language-switch__option[aria-pressed="true"] {
  color: var(--oubot-language-active-ink);
  background: var(--oubot-language-active);
  box-shadow: 0 2px 7px rgba(37, 49, 66, .20);
}

@media (max-width: 680px) {
  .oubot-language-switch {
    min-height: 38px;
    padding: 3px;
    border-radius: 11px;
  }

  .oubot-language-switch__option {
    min-width: 36px;
    min-height: 30px;
    padding: 0 7px;
    font-size: 11px;
    border-radius: 8px;
  }
}
