/* Hug the longest option. Do not stretch to the viewport or the admin iframe. */
html body .f-footer--currency-language .f-select-custom.isActive .f-select-custom--options,
html body .f-footer .f-currency-switcher .f-select-custom.isActive .f-select-custom--options,
html body .f-footer .f-language-switcher .f-select-custom.isActive .f-select-custom--options {
  position: absolute !important;
  left: 0 !important;
  right: auto !important;
  top: auto !important;
  bottom: calc(100% + 8px) !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: max-content !important;
  max-height: min(48vh, 320px) !important;
  margin: 0 !important;
  transform: none !important;
  box-sizing: border-box !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 80 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: #f6f0e6;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(40, 28, 16, 0.16);
}

html body .f-footer--currency-language .f-select-custom.isActive .f-select-custom--option,
html body .f-footer .f-currency-switcher .f-select-custom.isActive .f-select-custom--option,
html body .f-footer .f-language-switcher .f-select-custom.isActive .f-select-custom--option {
  width: auto !important;
  max-width: none !important;
  white-space: nowrap !important;
}

/* Mobile drawer menus were shifted off-screen and clipped. Keep them inside the phone frame. */
@media (max-width: 767px) {
  html body .casaluce-header .f-menu-drawer__content {
    padding-bottom: 20px !important;
  }

  html body #f-menu-drawer .f-currency-switcher .f-select-custom.isActive .f-select-custom--options,
  html body .f-menu-drawer .f-currency-switcher .f-select-custom.isActive .f-select-custom--options,
  html body #f-menu-drawer .f-language-switcher .f-select-custom.isActive .f-select-custom--options,
  html body .f-menu-drawer .f-language-switcher .f-select-custom.isActive .f-select-custom--options {
    position: fixed !important;
    top: auto !important;
    bottom: 64px !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: min(340px, calc(100vw - 36px)) !important;
    max-height: calc(100vh - 132px) !important;
    height: auto !important;
    margin: 0 !important;
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 2600 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: #fbf6ee !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 32px rgba(40, 28, 16, 0.16) !important;
  }

  html body #f-menu-drawer .f-currency-switcher .f-select-custom.isActive .f-select-custom--options,
  html body .f-menu-drawer .f-currency-switcher .f-select-custom.isActive .f-select-custom--options {
    left: 16px !important;
    right: auto !important;
  }

  html body #f-menu-drawer .f-language-switcher .f-select-custom.isActive .f-select-custom--options,
  html body .f-menu-drawer .f-language-switcher .f-select-custom.isActive .f-select-custom--options {
    left: auto !important;
    right: 16px !important;
  }

  html body #f-menu-drawer .f-currency-switcher .f-select-custom.isActive .f-select-custom--option,
  html body #f-menu-drawer .f-language-switcher .f-select-custom.isActive .f-select-custom--option,
  html body .f-menu-drawer .f-currency-switcher .f-select-custom.isActive .f-select-custom--option,
  html body .f-menu-drawer .f-language-switcher .f-select-custom.isActive .f-select-custom--option {
    width: auto !important;
    max-width: none !important;
    white-space: nowrap !important;
  }
}
