/* Valendis: selector de idioma en header (dropdown estilo) */
.header-language {
  position: relative;
}

.lang-switcher {
  position: relative;
  display: inline-block;
}

.lang-switcher__summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.lang-switcher__summary::-webkit-details-marker {
  display: none;
}

.lang-switcher__summary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}

.lang-switcher__summary:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

.lang-switcher__flag-img {
  display: block;
  width: 36px;
  height: 24px;
  object-fit: cover;
  object-position: center;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.lang-switcher__flag-img--trigger {
  width: 32px;
  height: 21px;
}

.lang-switcher__caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(255, 255, 255, 0.95);
  transform-origin: 50% 45%;
  transition: transform 120ms ease;
}

.lang-switcher[open] .lang-switcher__caret {
  transform: rotate(180deg);
}

.lang-switcher__menu {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: calc(100% + 10px);
  min-width: auto;
  padding: 6px;
  border-radius: 14px;
  background: rgba(4, 64, 58, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  z-index: 1100;
}

.lang-switcher__item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.lang-switcher__item:hover,
.lang-switcher__item:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.lang-switcher__item.is-active {
  background: rgba(255, 255, 255, 0.18);
}

/* En sticky, el CTA se invierte (white bg). Mantenemos el selector legible. */
.sticky-bg-baseee.sticky .lang-switcher__summary {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
}

/* En pantallas pequeñas el botón de diagnóstico no está visible; igual cuidamos tamaños. */
@media (max-width: 1199px) {
  .lang-switcher__summary {
    padding: 10px 12px;
  }
}
