.lang-switcher {
  position: relative;
  margin: 0.35rem 0.65rem 0.75rem;
}
.lang-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line, #d9d4cb);
  background: var(--panel, #fffcf7);
  color: var(--ink, #1c1b19);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  min-height: 36px;
  width: 100%;
  justify-content: space-between;
}
.lang-switcher-btn:hover {
  border-color: var(--accent, #0f5c4c);
  color: var(--accent, #0f5c4c);
}
.lang-switcher-btn:focus-visible {
  outline: 2px solid rgba(15, 92, 76, 0.45);
  outline-offset: 2px;
}
.lang-code {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  opacity: 0.75;
}
.lang-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
}
.lang-switcher-menu {
  position: static;
  min-width: 0;
  margin: 0.35rem 0 0;
  padding: 0.35rem;
  list-style: none;
  background: transparent;
  border: 0;
  border-radius: 12px;
  box-shadow: none;
  z-index: 1200;
}
.lang-switcher-menu[hidden] { display: none !important; }
.lang-switcher-menu a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  min-height: 40px;
}
.lang-switcher-menu a:hover,
.lang-switcher-menu a.is-active {
  background: var(--accent-soft, #e4f2ee);
  color: var(--accent, #0f5c4c);
}

html[dir="rtl"] .lang-switcher-menu {
  right: auto;
  left: 0;
}
html[dir="rtl"] .mm-bar,
html[dir="rtl"] .site-footer-grid {
  direction: rtl;
}

@media (min-width: 1081px) {
  .lang-switcher {
    margin: 0 0 0 0.5rem;
  }
  .lang-switcher-btn {
    width: auto;
    justify-content: flex-start;
  }
  .lang-switcher-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.35rem);
    min-width: 180px;
    margin: 0;
    background: var(--panel, #fff);
    border: 1px solid var(--line, #d9d4cb);
    box-shadow: 0 12px 28px rgba(28, 27, 25, 0.12);
  }
}
