/* ============================================================
   GPA i18n Additions — gpa-blended-i18n
   Language switcher styled for Design System v4 (Light Stone
   Amber, dark topbar). Uses the CSS variables defined in each
   page's inline :root block.
   ============================================================ */

.lang-switcher-wrap {
  position: relative;
  flex-shrink: 0;
}

/* Trigger sits on the dark topbar */
.lang-switcher-trigger {
  font-family: var(--f-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: #c3c9d4;
  background: none;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 5px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .45em;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.lang-switcher-trigger:hover {
  color: #f6f4ee;
  border-color: rgba(255,255,255,.55);
}
.lang-switcher-trigger svg {
  width: 12px; height: 12px;
  opacity: .65;
  transition: transform .2s;
}
.lang-trigger-globe {
  width: 14px !important; height: 14px !important;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
}
.lang-switcher-wrap.open .lang-caret {
  transform: rotate(180deg);
}

/* Dropdown returns to the light canvas */
#lang-switcher {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  min-width: 190px;
  z-index: 100;
  box-shadow: 0 14px 34px -14px rgba(37,45,59,.35);
}
.lang-switcher-wrap.open #lang-switcher {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lang-option {
  font-family: var(--f-body);
  font-size: .84rem;
  font-weight: 500;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 5px;
  text-decoration: none;
  transition: background .15s, color .15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
a.lang-option:hover {
  background: var(--stone-soft);
  color: var(--ink-deep);
}
.lang-option.active {
  color: var(--amber-deep);
  background: var(--amber-lo);
  font-weight: 600;
}

/* Not-yet-rolled-out languages: visible but disabled */
.lang-option.soon {
  color: var(--ink-faint);
  cursor: default;
}
.lang-option.soon em {
  font-family: var(--f-mono);
  font-style: normal;
  font-size: .58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 2px 8px;
}

/* ---- Responsive ---- */
@media (max-width: 800px) {
  .lang-switcher-trigger { padding: 8px 10px; }
  #lang-switcher { right: -8px; }
}
