/* ==================================================
   LANG SWITCH — HUD
================================================== */

.lang-switch {
  --lang-cyan: #00f7ff;
  --lang-chamfer: 8px;

  position: absolute;
  z-index: 260;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 12px 0 14px;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  color: var(--lang-cyan);
  font-family: "Rajdhani", sans-serif;
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - var(--lang-chamfer)),
    calc(100% - var(--lang-chamfer)) 100%,
    0 100%
  );
  box-shadow: none;
  opacity: 0.86;
  pointer-events: auto;
  user-select: none;
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease;
}

.lang-switch::before {
  content: none;
}

.lang-switch > * {
  position: relative;
  z-index: 1;
}

.lang-switch__mark {
  color: var(--lang-cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  line-height: 1;
  text-shadow: 0 0 6px rgba(0, 247, 255, 0.45);
  white-space: nowrap;
}

.lang-switch__track {
  display: flex;
  align-items: center;
  gap: 0;
}

.lang-switch__btn {
  position: relative;
  min-width: 32px;
  height: 22px;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: rgba(0, 247, 255, 0.62);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.1px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition:
    color 0.18s ease,
    text-shadow 0.18s ease;
}

.lang-switch__flag {
  width: 14px;
  height: 10px;
  flex: 0 0 14px;
  display: block;
  border: 0.5px solid rgba(0, 247, 255, 0.35);
  box-shadow: 0 0 4px rgba(0, 247, 255, 0.18);
  opacity: 0.55;
  pointer-events: none;
}

.lang-switch__btn + .lang-switch__btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: rgba(0, 247, 255, 0.35);
  box-shadow: 0 0 4px rgba(0, 247, 255, 0.25);
}

.lang-switch__btn:hover,
.lang-switch__btn:focus-visible {
  color: #ffffff;
  text-shadow: 0 0 6px rgba(0, 247, 255, 0.85);
  outline: none;
}

.lang-switch__btn:hover .lang-switch__flag,
.lang-switch__btn:focus-visible .lang-switch__flag {
  opacity: 0.9;
  border-color: rgba(0, 247, 255, 0.7);
}

.lang-switch__btn.is-active {
  color: #ffffff;
  text-shadow:
    0 0 5px rgba(0, 247, 255, 1),
    0 0 12px rgba(0, 247, 255, 0.45);
}

.lang-switch__btn.is-active .lang-switch__flag {
  opacity: 1;
  border-color: rgba(0, 247, 255, 0.85);
  box-shadow: 0 0 6px rgba(0, 247, 255, 0.4);
}

html:not(.has-mobile-menu-stack) .lang-switch {
  top: auto;
  left: calc(var(--crop-x, 0px) + 33px);
  right: auto;
  bottom: calc(var(--crop-bottom, 0px) + 200px);
  transform: none;
}

html.has-open-panel .lang-switch {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

html.has-mobile-menu-stack .lang-switch {
  position: absolute;
  left: calc(var(--crop-x, 0px) + 28px);
  right: auto;
  top: auto;
  bottom: calc(var(--crop-bottom, 0px) + 28px);
  height: 32px;
  padding: 0 10px 0 12px;
  transform: none;
}

html.has-mobile-menu-stack .lang-switch__mark {
  font-size: 10px;
}

html.has-mobile-menu-stack .lang-switch__btn {
  min-width: 28px;
  height: 20px;
  font-size: 12px;
}

html.has-mobile-menu-stack.has-open-panel .lang-switch {
  display: none !important;
}
