/* Language picker.
   Ported from ../ONBOARDING (css/style.css "Top bar" block). The visual
   component is unchanged: same pill button, same rounded menu, same
   selected state. Two things differ on purpose:
     - ONBOARDING's fixed `.top-bar` wrapper is dropped; here the picker
       sits inside the existing .navbar.
     - The items are links, not buttons, because switching language means
       navigating to /de/ or / rather than swapping strings in place. */

.dropdown {
  position: relative;
}

.dropdown-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg);
  border: none;
  border-radius: 20px;
  padding: 8px 14px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  display: none;
  flex-direction: column;
  gap: 2px;
  background-color: var(--bg);
  border-radius: 16px;
  padding: 6px;
  min-width: 100%;
  box-shadow: 0 6px 24px oklch(0.20 0.02 255 / 0.14);
  z-index: 20;
}

.dropdown.open .dropdown-menu {
  display: flex;
}

.dropdown-menu.align-right {
  left: auto;
  right: 0;
}

.dropdown-item {
  background: none;
  border: none;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-mid);
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  text-decoration: none;
  display: block;
}

.dropdown-item:hover {
  background-color: var(--bg-subtle);
}

.dropdown-item.selected {
  color: var(--primary);
}

/* Over the hero photo the navbar is absolute on a dark image, so the
   default grey-on-white pill would disappear. The menu itself stays
   light, because it opens onto the page. */
.navbar--over-photo .dropdown-btn {
  background-color: oklch(1 0 0 / 0.18);
  color: #fff;
  backdrop-filter: blur(6px);
}

.navbar--over-photo .dropdown-btn:hover {
  background-color: oklch(1 0 0 / 0.28);
}
