.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  z-index: 30;
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--ink-soft, #4f6178);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.lang-trigger:hover,
.lang-trigger:focus-visible {
  color: var(--ink, #10243e);
  background: rgba(255, 255, 255, 0.82);
  outline: none;
}

.lang-globe {
  font-size: 1.08rem;
  line-height: 1;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: max-content;
  min-width: 118px;
  padding: 6px;
  display: grid;
  gap: 2px;
  z-index: 35;
  background: rgba(255, 253, 248, 0.98);
  border: 1px solid var(--line, rgba(16, 36, 62, 0.1));
  border-radius: 12px;
  box-shadow: var(--shadow-soft, 0 16px 34px rgba(38, 63, 102, 0.08));
}

.lang-menu[hidden] {
  display: none;
}

.lang-option {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 0;
  padding: 7px 10px;
  color: var(--ink-soft, #4f6178);
  background: transparent;
  border: 0;
  border-radius: 8px;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.lang-option::after {
  content: "";
  width: 10px;
  justify-self: end;
}

.lang-option:hover,
.lang-option:focus-visible {
  color: var(--ink, #10243e);
  background: rgba(16, 36, 62, 0.06);
  outline: none;
}

.lang-option.active {
  color: var(--ink, #10243e);
  font-weight: 700;
}

.lang-option.active::after {
  content: "\2713";
  font-size: 0.78rem;
  line-height: 1;
}

@media (max-width: 820px) {
  .lang-menu {
    right: auto;
    left: 0;
  }
}
