/* i18n language switcher — compact inline pill button group (ZH / JP / EN).
 * Used by auto_eju/app/templates/macros/i18n.html.
 *
 * Design:
 * - Light: semi-transparent bg over page surface; active = white pill with subtle shadow
 * - Accessible: hover/focus states; uses role="group" + aria-current in markup
 * - Neutral palette: blends with any page; callers can override via css_class on container
 * - Dark variant (.i18n-switcher--dark): for dark headers (teacher sidebar/admin chrome)
 */

.i18n-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 2px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  -webkit-user-select: none;
  user-select: none;
}

.i18n-switcher__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 9px;
  text-decoration: none;
  color: rgba(0, 0, 0, 0.55);
  border-radius: 999px;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.i18n-switcher__btn:hover {
  color: rgba(0, 0, 0, 0.85);
  text-decoration: none;
}

.i18n-switcher__btn:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 1px;
}

.i18n-switcher__btn--active,
.i18n-switcher__btn--active:hover {
  background: #ffffff;
  color: #1a1a2e;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  cursor: default;
}

/* Dark variant — e.g. inside the teacher sidebar or admin chrome. */
.i18n-switcher--dark {
  background: rgba(255, 255, 255, 0.1);
}
.i18n-switcher--dark .i18n-switcher__btn {
  color: rgba(255, 255, 255, 0.7);
}
.i18n-switcher--dark .i18n-switcher__btn:hover {
  color: #ffffff;
}
.i18n-switcher--dark .i18n-switcher__btn--active,
.i18n-switcher--dark .i18n-switcher__btn--active:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a2e;
}
