html.i18n-pending body {
  opacity: 0;
}

body {
  transition: opacity 0.18s ease;
}

.language-switcher {
  position: relative;
  flex: 0 0 auto;
  font-family: var(--font-body, 'DM Sans', system-ui, sans-serif);
}

.language-switcher__trigger {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.language-switcher__trigger:hover,
.language-switcher__trigger:focus-visible,
.language-switcher.is-open .language-switcher__trigger {
  outline: none;
  border-color: rgba(0, 182, 62, 0.7);
  background: rgba(0, 182, 62, 0.12);
  transform: translateY(-1px);
}

.language-switcher__flag,
.language-switcher__option-flag {
  line-height: 1;
  filter: saturate(0.95);
}

.language-switcher__flag {
  font-size: 20px;
}

.language-switcher__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 174px;
  padding: 7px;
  margin: 0;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(12, 12, 12, 0.98);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 1100;
}

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

.language-switcher__option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.language-switcher__option:hover,
.language-switcher__option:focus-visible {
  outline: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.language-switcher__option[aria-current="true"] {
  color: #00d448;
  background: rgba(0, 182, 62, 0.1);
}

.language-switcher__option-flag {
  width: 22px;
  font-size: 17px;
  text-align: center;
}

@media (max-width: 768px) {
  .language-switcher__trigger {
    width: 36px;
    height: 36px;
  }

  .language-switcher__menu {
    right: -42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .language-switcher__trigger,
  .language-switcher__menu {
    transition: none;
  }
}
