/* Language dropdown — globe icon + current language + dropdown of alternates.
   Used on the global (journalingapp.app) site. RU is intentionally excluded —
   makcards.online (RU brand) is a separate independent site (EP-907). */

.lang-dd {
  position: relative;
  display: inline-block;
}

.lang-dd-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--glass, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--stroke, rgba(255, 255, 255, 0.12));
  color: var(--text, #e6eef6);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
  transition: background-color 0.12s, border-color 0.12s;
}

.lang-dd-btn:hover,
.lang-dd-btn[aria-expanded="true"] {
  background: var(--glass-strong, rgba(255, 255, 255, 0.12));
  border-color: rgba(95, 209, 196, 0.35);
}

.lang-dd-btn .lang-dd-globe {
  width: 16px;
  height: 16px;
  opacity: 0.85;
}

.lang-dd-btn .lang-dd-chevron {
  width: 12px;
  height: 12px;
  opacity: 0.7;
  transition: transform 0.12s;
}

.lang-dd-btn[aria-expanded="true"] .lang-dd-chevron {
  transform: rotate(180deg);
}

.lang-dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--bg-soft, #13243d);
  border: 1px solid var(--stroke, rgba(255, 255, 255, 0.12));
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  z-index: 1000;
}

.lang-dd-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text, #e6eef6);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.3;
}

.lang-dd-menu a:hover,
.lang-dd-menu a:focus-visible {
  background: var(--glass, rgba(255, 255, 255, 0.06));
  color: var(--accent, #5FD1C4);
  outline: none;
}

@media (max-width: 600px) {
  .lang-dd-menu {
    right: -4px;
    min-width: 150px;
  }
}
