.sands-language-switcher {
  position: relative;
  z-index: 1100;
  flex: 0 0 auto;
  margin-inline-start: 12px;
}

.sands-language-switcher__button {
  min-inline-size: 66px;
  block-size: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-inline: 11px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 20px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.sands-language-switcher__button:hover,
.sands-language-switcher.is-open .sands-language-switcher__button {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .4);
}

.sands-language-switcher__button:hover { transform: translateY(-1px); }

.sands-language-switcher__button:focus-visible,
.sands-language-switcher__item:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
}

.sands-language-switcher__globe {
  inline-size: 17px;
  block-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 17px;
}

.sands-language-switcher__globe svg {
  inline-size: 100%;
  block-size: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sands-language-switcher__code {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1;
  text-transform: uppercase;
}

.sands-language-switcher__chevron {
  inline-size: 6px;
  block-size: 6px;
  border-inline-end: 1.5px solid currentColor;
  border-block-end: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transform-origin: center;
  transition: transform .2s ease;
}

.sands-language-switcher.is-open .sands-language-switcher__chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.sands-language-switcher__menu {
  position: absolute;
  inset-block-start: calc(100% + 10px);
  inset-inline-end: 0;
  min-inline-size: 190px;
  max-inline-size: min(280px, calc(100vw - 28px));
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  background: rgba(16, 16, 16, .98);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-5px);
  transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
}

.sands-language-switcher.is-open .sands-language-switcher__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.sands-language-switcher__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-block-size: 40px;
  padding: 8px 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, .82);
  text-decoration: none;
  white-space: nowrap;
}

.sands-language-switcher__item:hover,
.sands-language-switcher__item.is-active {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.sands-language-switcher__item.is-active {
  box-shadow: inset 2px 0 0 var(--primary-color);
}

html[dir="rtl"] .sands-language-switcher__item.is-active {
  box-shadow: inset -2px 0 0 var(--primary-color);
}

.sands-language-switcher__item-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sands-language-switcher__item-code {
  opacity: .58;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

body.sands-theme-light .sands-language-switcher__button {
  background: rgba(255, 255, 255, .9);
  border-color: rgba(27, 22, 99, .16);
  color: var(--bg-dark-1);
}

body.sands-theme-light .sands-language-switcher__button:hover,
body.sands-theme-light .sands-language-switcher.is-open .sands-language-switcher__button {
  background: #fff;
  border-color: rgba(27, 22, 99, .3);
}

body.sands-theme-light .sands-language-switcher__menu {
  border-color: rgba(20, 20, 20, .1);
  background: rgba(255, 255, 255, .99);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .14);
}

body.sands-theme-light .sands-language-switcher__item {
  color: #2b2b2b;
}

body.sands-theme-light .sands-language-switcher__item:hover,
body.sands-theme-light .sands-language-switcher__item.is-active {
  background: rgba(0, 0, 0, .055);
  color: #111;
}

@media only screen and (max-width: 992px) {
  .sands-language-switcher {
    margin-inline-start: 9px;
  }

  .sands-language-switcher__button {
    min-inline-size: 58px;
    block-size: 34px;
    padding-inline: 9px;
    gap: 6px;
  }

  .sands-language-switcher__globe {
    inline-size: 15px;
    block-size: 15px;
    flex-basis: 15px;
  }

  .sands-language-switcher__menu {
    inset-inline-end: 0;
  }
}

@media only screen and (max-width: 430px) {
  .sands-language-switcher__button {
    min-inline-size: 52px;
    padding-inline: 8px;
  }

  .sands-language-switcher__globe { display: none; }
}
