/* EN/IT language dropdown ??? docked just above the scroll-to-top button */

.omf-lang {
  position: fixed;
  right: 22px;
  bottom: 80px;
  z-index: 9998;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.omf-lang__trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--e-global-color-accent, #1f6feb);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  transition: background 0.2s ease, transform 0.2s ease;
}
.omf-lang__trigger:hover {
  background: var(--e-global-color-primary, #144f9e);
  transform: translateY(-1px);
}
.omf-lang--busy .omf-lang__trigger {
  animation: omfLangPulse 1.1s ease-in-out infinite;
  cursor: progress;
}
@keyframes omfLangPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.92); }
}
.omf-lang__trigger:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}
.omf-lang__trigger svg {
  flex: 0 0 auto;
}
.omf-lang__label {
  flex: 1 1 auto;
  text-align: left;
  display: none;
}
.omf-lang__caret {
  display: none;
}

.omf-lang__menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  display: none;
  min-width: 180px;
  padding: 6px;
  margin: 0;
  list-style: none;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.omf-lang--open .omf-lang__menu {
  display: block;
}
.omf-lang__menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 11px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #1a2230;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}
.omf-lang__menu button:hover {
  background: rgba(31, 111, 235, 0.09);
}
.omf-lang__menu button:focus-visible {
  outline: 2px solid rgba(31, 111, 235, 0.7);
  outline-offset: 1px;
}
.omf-lang__menu button.omf-lang--sel {
  background: rgba(31, 111, 235, 0.12);
}
.omf-lang__menu button svg {
  flex: 0 0 auto;
}
.omf-lang__code {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(26, 34, 48, 0.55);
}

/* Hide Google's native widget entirely (we use our own flag dropdown).
   This keeps Google's "Select Language" box from rendering anywhere,
   including under the footer. */
#google_translate_element,
#google_translate_element .goog-te-gadget,
#google_translate_element .goog-te-combo,
#google_translate_element select.goog-te-combo {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}
body > .skiptranslate,
iframe.goog-te-banner-frame,
body.goog-te-banner-frame {
  display: none !important;
  height: 0 !important;
  visibility: hidden;
}
body {
  top: 0 !important;
}

@media only screen and (max-width: 767px) {
  .omf-lang {
    right: 16px;
    bottom: 72px;
  }
  /* Small screens: show just the flag to avoid clutter */
  .omf-lang__trigger {
    min-width: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .omf-lang__trigger .omf-lang__label,
  .omf-lang__trigger .omf-lang__caret {
    display: none;
  }
  .omf-lang__menu {
    right: 0;
    min-width: 150px;
  }
}

/* ---- language toggle inside the mobile menu panel header row ------
   The custom right-side mobile menu (.omf-mobile-menu) builds a header row
   with the brand on the left and the close control on the right. The same
   .omf-lang component is reused there, sat right next to the close and
   matched to the panel's dark theme and circular close-button weight
   (no new colors/fonts). */
.omf-mobile-menu .omf-lang--panel {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 60;
  margin-left: auto;
  display: inline-flex;
}
.omf-mobile-menu .omf-lang--panel .omf-lang__trigger {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--e-global-color-white, #ffffff);
  box-shadow: none;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.omf-mobile-menu .omf-lang--panel .omf-lang__trigger:hover {
  background: var(--e-global-color-accent, #1f6feb);
  transform: none;
}
.omf-mobile-menu .omf-lang--panel .omf-lang__trigger:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}
.omf-mobile-menu .omf-lang--panel .omf-lang__menu {
  top: calc(100% + 8px);
  bottom: auto;
  z-index: 70;
}
