.locale-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.locale-switcher--floating {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 9999;
}

/* Desktop: plain inline text links — no capsule, no pills */
.locale-switcher__desktop {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.locale-switcher a,
.locale-switcher__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border-radius: 7px;
  text-decoration: none;
  font: 700 0.72rem/1 "Poppins", sans-serif;
  letter-spacing: 0.05em;
  color: #dbe6f2;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 20, 38, 0.72);
  box-shadow: none;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.locale-switcher a:hover,
.locale-switcher a:focus-visible,
.locale-switcher__trigger:hover,
.locale-switcher__trigger:focus-visible {
  color: #fff;
  background: rgba(17, 41, 68, 0.92);
  border-color: rgba(255, 255, 255, 0.24);
}

/* Active: highlighted standalone button */
.locale-switcher a.is-active {
  color: #081b35 !important;
  font-weight: 700;
  background: linear-gradient(135deg, #ffe9ad 0%, #ffc107 100%) !important;
  border-color: rgba(255, 193, 7, 0.7);
  box-shadow: 0 2px 10px rgba(255, 193, 7, 0.25);
  text-decoration: none;
}

.locale-switcher__mobile {
  position: relative;
  display: none;
}

.locale-switcher__trigger {
  padding: 0 8px;
  font-size: 0.68rem;
}

.locale-switcher__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  margin: 0;
  padding: 8px;
  list-style: none;
  min-width: 84px;
  border-radius: 12px;
  background: rgba(9, 27, 49, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.locale-switcher__menu li + li {
  margin-top: 4px;
}

.locale-switcher__menu a {
  width: 100%;
  display: block;
  padding: 6px 8px;
}

.locale-switcher__mobile.is-open .locale-switcher__trigger {
  color: #081b35;
  background: linear-gradient(135deg, #ffe9ad 0%, #ffc107 100%);
  border-color: rgba(255, 193, 7, 0.7);
}

@media (max-width: 920px) {
  .locale-switcher--floating {
    top: 10px;
    right: 12px;
  }

  .locale-switcher a,
  .locale-switcher__trigger {
    min-width: 38px;
    height: 38px;
    padding: 0 6px;
    font-size: 0.66rem;
  }

  .locale-switcher__desktop {
    display: none;
  }

  .locale-switcher__mobile {
    display: inline-flex;
  }
}


/* Mobile panel language state: clear active/inactive contrast */
@media (max-width: 920px) {
  .sticky-header #nav-links .nav-lang-item .locale-switcher__desktop a {
    color: rgba(235, 243, 252, 0.92);
    background: rgba(9, 27, 49, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .sticky-header #nav-links .nav-lang-item .locale-switcher__desktop a.is-active,
  .sticky-header #nav-links .nav-lang-item .locale-switcher__desktop a[aria-current="true"] {
    color: #ffd24d !important;
    background: rgba(255, 193, 7, 0.14) !important;
    border-color: rgba(255, 193, 7, 0.9) !important;
    box-shadow: 0 0 0 1px rgba(255, 193, 7, 0.3) inset;
  }
}
