/**
 * Topbar language / country switcher.
 */

.fmp-lang-switcher {
  position: relative;
}

.fmp-lang-switcher__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.22rem 0.55rem 0.22rem 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.fmp-lang-switcher__toggle:hover,
.fmp-lang-switcher__toggle:focus-visible,
.fmp-lang-switcher.is-open .fmp-lang-switcher__toggle {
  color: #fff;
  background: rgba(127, 212, 216, 0.22);
  border-color: rgba(127, 212, 216, 0.55);
  outline: none;
}

.fmp-lang-switcher__flag {
  display: block;
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

.fmp-lang-switcher__code {
  line-height: 1;
}

.fmp-lang-switcher__chevron {
  opacity: 0.85;
  transition: transform 0.15s ease;
}

.fmp-lang-switcher.is-open .fmp-lang-switcher__chevron {
  transform: rotate(180deg);
}

.fmp-lang-switcher__menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 40;
  min-width: 11.5rem;
  max-height: min(70vh, 22rem);
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.fmp-lang-switcher__menu[hidden] {
  display: none;
}

.fmp-lang-switcher__option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  color: #18212f;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
}

.fmp-lang-switcher__option:hover,
.fmp-lang-switcher__option:focus-visible {
  background: rgba(4, 84, 130, 0.08);
  color: #045482;
  outline: none;
}

.fmp-lang-switcher__option.is-current {
  background: rgba(4, 84, 130, 0.1);
  color: #045482;
}

.fmp-lang-switcher__label {
  line-height: 1.2;
}

/* Hide GTranslate / Google Translate chrome so it never shoves the topbar. */
.gtranslate_wrapper,
.fmp-gtranslate-host,
#google_translate_element2,
.goog-te-banner-frame,
.goog-te-balloon-frame,
.skiptranslate,
.skiptranslate iframe,
iframe.skiptranslate,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-l4eHX-hSRGPd,
body > .skiptranslate {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

html,
body {
  top: 0 !important;
  position: static !important;
}

/* Centered translation loader + dark overlay */
.fmp-gt-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(8, 18, 32, 0.62);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.fmp-gt-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.fmp-gt-overlay__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  min-width: 10.5rem;
  max-width: 16rem;
  padding: 1.35rem 1.5rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.fmp-gt-overlay__spinner {
  width: 2.25rem;
  height: 2.25rem;
  border: 3px solid rgba(4, 84, 130, 0.18);
  border-top-color: #045482;
  border-radius: 50%;
  animation: fmp-gt-spin 0.7s linear infinite;
}

.fmp-gt-overlay__label {
  margin: 0;
  color: #18212f;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

@keyframes fmp-gt-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fmp-gt-overlay__spinner {
    animation: none;
    border-top-color: rgba(4, 84, 130, 0.45);
  }

  .fmp-gt-overlay {
    transition: none;
  }
}
