.site-language {
  position: relative;
  display: block;
  flex: 0 0 auto;
  color: #132033;
}

.site-language[open] {
  z-index: 60;
}

.site-language-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.48rem 0.8rem;
  border: 1px solid rgba(19, 32, 51, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #132033;
  box-shadow: 0 8px 22px rgba(19, 32, 51, 0.09);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1;
  list-style: none;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.site-language-trigger::-webkit-details-marker {
  display: none;
}

.site-language-trigger:hover {
  border-color: rgba(227, 53, 13, 0.4);
  box-shadow: 0 10px 26px rgba(19, 32, 51, 0.13);
  transform: translateY(-1px);
}

.site-language-trigger:focus-visible {
  outline: 3px solid rgba(227, 53, 13, 0.28);
  outline-offset: 3px;
}

.site-language-icon {
  font-size: 1rem;
  line-height: 1;
}

.site-language-label {
  white-space: nowrap;
}

.site-language-chevron {
  display: inline-block;
  margin-left: 0.05rem;
  font-size: 0.78rem;
  line-height: 1;
  transition: transform 0.18s ease;
}

.site-language[open] .site-language-chevron {
  transform: rotate(180deg);
}

.site-language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  padding: 0.45rem;
  border: 1px solid rgba(19, 32, 51, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 18px 48px rgba(19, 32, 51, 0.18);
  backdrop-filter: blur(16px);
}

.site-language-menu::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 24px;
  width: 12px;
  height: 12px;
  border-top: 1px solid rgba(19, 32, 51, 0.14);
  border-left: 1px solid rgba(19, 32, 51, 0.14);
  background: #fff;
  transform: rotate(45deg);
}

.site-language-option {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 42px;
  padding: 0.65rem 0.75rem;
  border-radius: 11px;
  color: #3b4657 !important;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none !important;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-language-option:hover,
.site-language-option:focus-visible {
  background: #fff1f5;
  color: #b42352 !important;
  outline: none;
}

.site-language-option.is-active {
  background: #fff1f5;
  color: #b42352 !important;
}

.site-language-check {
  color: #e3350d;
  font-weight: 900;
}

@media (max-width: 900px) {
  .header-inner > .logo,
  .header-inner > .brand {
    order: 1;
  }

  .header-inner > .site-language {
    order: 2;
    margin-left: auto;
  }

  .header-inner > .mobile-menu-toggle {
    order: 3;
  }

  .site-language-trigger {
    min-height: 39px;
    padding: 0.42rem 0.65rem;
    font-size: 0.78rem;
  }

  .site-language-menu {
    width: min(220px, calc(100vw - 32px));
  }
}

@media (max-width: 420px) {
  .site-language-label {
    max-width: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-language-trigger {
    gap: 0.3rem;
    padding-inline: 0.55rem;
  }
}
