/*
 * Scatto language switcher
 *
 * The links and translated destinations are generated by Weglot. This layer
 * only gives the official switcher a compact, Bomma-inspired header treatment.
 */

.scatto-language-switcher {
  --scatto-language-ink: #fff;
  --scatto-language-panel: #fff;
  --scatto-language-panel-ink: #111;
  --scatto-language-line: rgba(17, 17, 17, 0.14);
  position: relative;
  z-index: 98;
  flex: 0 0 auto;
  color: var(--scatto-language-ink);
  font-family: Barlow, Arial, sans-serif;
}

.scatto-language-switcher:empty {
  display: none !important;
  margin: 0 !important;
}

.scatto-language-switcher--desktop {
  display: none;
}

.scatto-language-switcher--mobile {
  --scatto-language-ink: #111;
  display: block;
  align-self: flex-end;
  margin: 14px 0 24px;
}

.Header.internal .scatto-language-switcher,
.Header.fixed .scatto-language-switcher,
.Header.invert .scatto-language-switcher,
.Header__content.internal .scatto-language-switcher,
.Header__content--language.fixed {
  --scatto-language-ink: #111;
}

/* Keep language choice available while the site's consent notice is open. */
body.scatto-consent-pending .scatto-language-switcher .country-selector {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.scatto-language-switcher .country-selector {
  position: relative !important;
  right: auto !important;
  bottom: auto !important;
  display: block;
  width: 48px;
  min-width: 48px;
  border: 0;
  background: transparent !important;
  color: inherit;
  text-align: left;
  isolation: isolate;
}

.scatto-language-switcher .country-selector .wgcurrent {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 48px;
  min-width: 48px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 10px 0 6px;
  border: 0 !important;
  background: transparent;
  color: inherit;
  cursor: pointer;
  list-style: none;
  box-sizing: border-box;
}

.scatto-language-switcher .country-selector .wgcurrent::after {
  content: "/";
  position: absolute;
  top: 50%;
  right: 3px;
  width: auto;
  height: auto;
  margin: 0;
  background: none;
  color: currentColor;
  font-size: 11px;
  font-weight: 300;
  line-height: 1;
  opacity: 0.48;
  transform: translateY(-50%);
  transition: opacity 150ms ease, transform 150ms ease;
}

.scatto-language-switcher .country-selector input:checked ~ .wgcurrent::after {
  opacity: 0.9;
  transform: translateY(-50%) rotate(12deg);
}

.scatto-language-switcher .country-selector .wgcurrent span,
.scatto-language-switcher .country-selector .wgcurrent .wglanguage-name {
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
}

.scatto-language-switcher .country-selector > ul {
  position: absolute;
  z-index: 1010;
  top: calc(100% + 8px) !important;
  right: 0;
  bottom: auto !important;
  left: auto !important;
  display: flex !important;
  flex-direction: row;
  align-items: stretch;
  width: auto;
  min-width: 132px;
  margin: 0;
  padding: 4px;
  overflow: hidden;
  border: 1px solid var(--scatto-language-line);
  border-radius: 2px;
  background: var(--scatto-language-panel);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, -4px, 0);
  transform-origin: top right;
  transition: opacity 150ms ease, transform 150ms ease, visibility 0s linear 150ms;
}

.scatto-language-switcher .country-selector input:checked ~ ul {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateZ(0);
  transition: opacity 150ms ease, transform 150ms ease, visibility 0s linear;
}

.scatto-language-switcher .country-selector > ul > li {
  display: block;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.scatto-language-switcher .country-selector > ul > li.wg-pt {
  order: 0;
}

.scatto-language-switcher .country-selector > ul > li.wg-en {
  order: 1;
}

.scatto-language-switcher .country-selector > ul > li.wg-es {
  order: 2;
}

.scatto-language-switcher .country-selector > ul > li.wg-it {
  order: 3;
}

.scatto-language-switcher .country-selector > ul > li:not(.wg-pt):not(.wg-en):not(.wg-es):not(.wg-it) {
  display: none;
}

.scatto-language-switcher .country-selector > ul > li > a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 !important;
  border: 0;
  border-radius: 1px;
  background: transparent;
  color: var(--scatto-language-panel-ink);
  font-family: Barlow, Arial, sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  transition: background-color 150ms ease, color 150ms ease;
}

.scatto-language-switcher .country-selector > ul > li > a:hover {
  background: #111;
  color: #fff;
}

.scatto-language-switcher .country-selector .wgcurrent:focus-visible,
.scatto-language-switcher .country-selector > ul > li > a:focus-visible {
  outline: 2px solid var(--scatto-focus, #2367d1) !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.92);
}

@media (min-width: 1024px) {
  .scatto-language-switcher--desktop {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .scatto-language-switcher--mobile {
    display: none !important;
  }

  body .Header__content {
    gap: clamp(14px, 2.2vw, 42px);
  }
}

@media (min-width: 1024px) and (max-width: 1200px) {
  .scatto-language-switcher .country-selector,
  .scatto-language-switcher .country-selector .wgcurrent {
    width: 44px;
    min-width: 44px;
  }

  .scatto-language-switcher .country-selector .wgcurrent span,
  .scatto-language-switcher .country-selector .wgcurrent .wglanguage-name,
  .scatto-language-switcher .country-selector > ul > li > a {
    font-size: 10px;
  }

  body .Header__content {
    gap: clamp(7px, 1.25vw, 15px);
  }
}

@media (min-width: 1200.1px) and (max-width: 1355px) {
  .scatto-language-switcher--desktop .country-selector .wgcurrent span,
  .scatto-language-switcher--desktop .country-selector .wgcurrent .wglanguage-name,
  .scatto-language-switcher--desktop .country-selector > ul > li > a {
    font-size: 11.8px;
  }
}

@media (min-width: 1355.1px) {
  .scatto-language-switcher--desktop .country-selector .wgcurrent span,
  .scatto-language-switcher--desktop .country-selector .wgcurrent .wglanguage-name,
  .scatto-language-switcher--desktop .country-selector > ul > li > a {
    font-size: 15px;
  }
}

@media (max-width: 1023px) {
  .scatto-language-switcher--desktop {
    display: none !important;
  }

  .scatto-language-switcher--mobile {
    display: block !important;
  }

  .scatto-language-switcher--mobile .country-selector {
    margin-left: auto;
  }

  .scatto-language-switcher--mobile .country-selector > ul {
    top: 50% !important;
    right: calc(100% + 8px);
    transform: translate3d(4px, -50%, 0);
    transform-origin: center right;
  }

  .scatto-language-switcher--mobile .country-selector input:checked ~ ul {
    transform: translate3d(0, -50%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scatto-language-switcher .country-selector .wgcurrent::after,
  .scatto-language-switcher .country-selector > ul,
  .scatto-language-switcher .country-selector > ul > li > a {
    transition: none;
  }
}
