/* The OX — 8-language dropdown switcher. Kept separate from style.css
   (which is 1-year immutable-cached) so shipping this needs no ?v bump
   on every page that already references style.css. */

.lang-switch { position: relative; font-family: var(--font-body); }

.lang-switch > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gold);
  transition: border-color var(--transition-fast);
}
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary::marker { content: ""; }
.lang-switch > summary:hover,
.lang-switch[open] > summary { border-color: var(--gold); }

.lang-switch__code { line-height: 1; }

.lang-switch__caret {
  width: 9px;
  height: 6px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  transition: transform var(--transition-fast);
}
.lang-switch[open] .lang-switch__caret { transform: rotate(180deg); }

.lang-switch__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1000;
  min-width: 168px;
  max-height: 60vh;
  overflow-y: auto;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: var(--charcoal, #0a0a0b);
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.lang-switch__menu a {
  display: block;
  padding: 9px 16px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--gray);
  white-space: nowrap;
}
.lang-switch__menu a:hover,
.lang-switch__menu a:focus-visible { color: var(--gold); background: rgba(198, 162, 106, 0.08); }
.lang-switch__menu a.is-current { color: var(--gold); font-weight: 600; }

/* Footer variant for pages with no nav (privacy-policy.html) */
.lang-links { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; margin: 0 0 1rem; font-size: 0.8rem; }
.lang-links a { color: #888; }
.lang-links a:hover, .lang-links a[aria-current] { color: #c9a96e; }

.lang-switch--mobile { display: none; }
@media (max-width: 900px) {
  .lang-switch--mobile { display: block; }
  .nav__links .lang-switch:not(.lang-switch--mobile) { display: none; } /* avoid a duplicate inside the mobile overlay */
}
