/* ──────────────────────────────────────────────
   LANGUAGE TOGGLE — globe button + dropdown w/ sliding indicator
─────────────────────────────────────────────── */
.lang { position: relative; flex-shrink: 0; }

/* Dark / light theme toggle (matches the language button) */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.9);
  flex-shrink: 0;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-base);
}
.theme-toggle:hover { background: rgba(255,255,255,0.2); color: #fff; transform: rotate(-12deg); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle__sun { display: none; }
html[data-theme="dark"] .theme-toggle__moon { display: none; }
html[data-theme="dark"] .theme-toggle__sun { display: block; }

.lang__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.9);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-base);
}
.lang__btn:hover { background: rgba(255,255,255,0.2); color: #fff; }
.lang__btn svg { width: 20px; height: 20px; }
.lang__btn[aria-expanded="true"] {
  background: var(--c-coral);
  border-color: var(--c-coral);
  color: #fff;
  transform: rotate(20deg);
}

.lang__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--c-navy);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-lg);
  padding: var(--sp-2);
  z-index: calc(var(--z-nav) + 10);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  opacity: 0;
  transform: scale(0.92) translateY(-6px);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity var(--t-base), transform var(--t-base);
}
.lang__panel.is-open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.lang__track {
  position: relative;
  display: flex;
  gap: 2px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-full);
  padding: 3px;
}
.lang__indicator {
  position: absolute;
  top: 3px; left: 0;
  height: calc(100% - 6px);
  background: var(--grad-teal);
  border-radius: var(--r-full);
  z-index: 0;
}
.lang__indicator.is-animated { transition: transform var(--t-base), width var(--t-base); }

.lang__opt {
  position: relative;
  z-index: 1;
  padding: 6px 12px;
  border-radius: var(--r-full);
  font-weight: 700;
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.7);
  transition: color var(--t-fast);
}
.lang__opt:hover { color: #fff; }
.lang__opt.active { color: #fff; }
