/* sqvad.club — the language switcher, shared by every page.
 *
 * Only the switcher lives here. Each page keeps its own fonts, tokens and
 * layout; this file assumes --ink / --paper / --line / --dim / --accent are
 * already defined by the page, which is true of all of them.
 */

.lang-switcher { position: relative; }

.lang-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--paper);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  padding: 9px 14px;
  border-radius: 999px;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.lang-button:hover { border-color: var(--accent); background: rgba(244,236,223,0.04); }
.lang-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-button .chev { margin-left: 6px; opacity: 0.6; }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px); right: 0;
  background: rgba(0,0,0,0.96);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  min-width: 200px;
  display: none;
  z-index: 200;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.lang-menu.open { display: block; }
.lang-menu button {
  display: flex; width: 100%; align-items: center; gap: 10px;
  background: transparent; border: none; color: var(--paper);
  font-family: inherit; font-size: 13px; text-align: left;
  padding: 10px 12px; border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.lang-menu button:hover { background: rgba(244,236,223,0.06); }
.lang-menu button.active { color: var(--accent); }
.lang-menu .code {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--dim);
  min-width: 28px;
}
.lang-menu button.active .code { color: var(--accent); }

/* Right-hand nav cluster: switcher plus whatever the page puts beside it
   (the back link on legal pages, the CTA on the landing page). */
.nav-right { display: flex; align-items: center; gap: 14px; }

/* Shown only when the reader picks a language this page does not have. */
.lang-notice {
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 40px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--dim);
}

@media (max-width: 520px) {
  .lang-menu { min-width: 170px; }
  .nav-right { gap: 10px; }
}

/* Deep-linked headings (#verhaltensregeln, #melden, …) must clear the fixed
   nav, otherwise the anchor jump parks the heading behind the header bar. */
[id] { scroll-margin-top: 96px; }
