/* lang-switcher.css — single source of truth for the nav language menu.
   Loaded by every page (Vite landing + static subpages) so the menu behaves
   identically everywhere instead of each page carrying its own variant.

   Opening is pure CSS (:hover for pointers, :focus-within for keyboards), so it
   works before any script runs and cannot fall out of sync with JS state.
   lang-switcher.js only adds tap-to-open for touch devices. */

.lang-trigger {
  position: relative;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  min-width: 120px;
}

/* The menu hangs 8px below the trigger. Crossing that gap the pointer is over
   neither element, which drops :hover and closes the menu before it can be
   reached — this invisible bridge spans the gap so the hover chain holds. */
.lang-dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

.lang-trigger:hover .lang-dropdown,
.lang-trigger:focus-within .lang-dropdown,
.lang-dropdown.open {
  display: block;
}
