/* ==========================================================================
   Language switch (English / Italiano)
   Shared by the Nicepage pages, the policy pages and the questionnaire.
   ========================================================================== */

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--mediq-border, #e6dde0);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 2px 10px rgba(36, 31, 33, .10);
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  white-space: nowrap;
}

.lang-switch__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #4b4548 !important;
  text-decoration: none !important;
  transition: background-color .15s ease, color .15s ease;
}

.lang-switch__item:hover,
.lang-switch__item:focus-visible {
  background: #f6ecef;
  color: #a63b4e !important;
}

.lang-switch__item.is-current {
  background: #f3e5e8;
  color: #8f2f3f !important;
}

.lang-switch__item img {
  display: block;
  width: 20px;
  height: 14px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}

.lang-switch__item span {
  display: inline-block;
  min-width: 14px;
}

/* Nicepage header: place the switch in the top-right corner of the sheet. */
.u-header .u-sheet-1 {
  position: relative;
}

.lang-switch--header {
  position: absolute;
  top: 10px;
  right: 0;
  z-index: 30;
}

/* Simple policy/contact header bar. */
.site-bar .inner {
  flex-wrap: wrap;
}

.lang-switch--bar {
  margin-left: auto;
}

/* Questionnaire header. */
.top {
  position: relative;
}

.lang-switch--questionnaire {
  position: absolute;
  top: 16px;
  right: 22px;
  z-index: 30;
}

@media (max-width: 991px) {
  .lang-switch--header {
    top: 8px;
  }
}

@media (max-width: 767px) {
  .lang-switch--header {
    top: 8px;
    right: 58px;
  }
  .lang-switch {
    font-size: 10px;
  }
  .lang-switch__item {
    padding: 3px 6px;
  }
  .lang-switch__item img {
    width: 18px;
    height: 13px;
  }
  .lang-switch--questionnaire {
    position: static;
    margin: 10px 0 0;
  }
  /* Longer Italian button labels must be allowed to wrap on narrow screens. */
  html[lang="it"] .u-btn {
    white-space: normal !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 42px;
  }
}

@media (max-width: 420px) {
  .lang-switch__item span {
    display: none;
  }
  .lang-switch--header {
    right: 54px;
  }
}

@media print {
  .lang-switch {
    display: none !important;
  }
}
