/* MSW UI repair: each rule requires a host-specific body class from the loader.
 * These classes are mapped in site-header-fixes.json. No global overflow hiding.
 */

/* Embedded maps use a 600px HTML width; let them fit the article column. */
body.msw-ui-fix-onepress .entry-content iframe {
  max-width: 100% !important;
}

/* A long native select must not set the minimum width of the whole form. */
body.msw-ui-fix-premium .mswpc38-form,
body.msw-ui-fix-premium .mswpc38-form label {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}
body.msw-ui-fix-premium .mswpc38-form :is(input:not([type="checkbox"]), select, textarea, .mswpc38-double) {
  min-width: 0;
}
body.msw-ui-fix-premium .mswpc38-form .mswpc38-double {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 768px) {
  body.msw-ui-fix-premium .mswpc38-form .mswpc38-double {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  /* OnePress: allow the title to wrap beside a stable 44px menu target. */
  body.msw-ui-fix-onepress #masthead > .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    column-gap: 12px;
    min-height: 76px;
    padding-top: 12px;
    padding-bottom: 12px;
    line-height: normal;
  }
  body.msw-ui-fix-onepress #masthead > .container::before,
  body.msw-ui-fix-onepress #masthead > .container::after {
    content: none;
  }
  body.msw-ui-fix-onepress #masthead .site-branding {
    float: none;
    min-width: 0;
    max-width: 100%;
  }
  body.msw-ui-fix-onepress #masthead .site-brand-inner.no-logo-img.has-desc {
    line-height: normal;
  }
  body.msw-ui-fix-onepress #masthead .site-branding .site-title {
    display: block;
    position: static;
    max-width: 100%;
    margin: 0;
    line-height: 1.2;
  }
  body.msw-ui-fix-onepress #masthead .site-title .site-text-logo {
    display: block;
    max-width: 100%;
    font-size: clamp(18px, 4.8vw, 23px);
    line-height: 1.2;
    letter-spacing: .02em;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body.msw-ui-fix-onepress #masthead .site-branding .site-description {
    position: static;
    top: auto;
    margin: 6px 0 0;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body.msw-ui-fix-onepress #masthead .header-right-wrapper {
    float: none;
    min-width: 0;
    line-height: 1;
  }
  body.msw-ui-fix-onepress #masthead #nav-toggle {
    display: block;
    float: none;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
    line-height: 44px;
  }
  body.msw-ui-fix-onepress #masthead #nav-toggle span {
    right: 10px;
  }
  body.msw-ui-fix-onepress #masthead #nav-toggle:focus-visible {
    outline: 3px solid #075f91;
    outline-offset: 2px;
  }
  body.msw-ui-fix-onepress #masthead .onepress-menu.onepress-menu-mobile {
    top: 100%;
    max-height: 65vh;
    max-height: 65dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (max-width: 900px) {
  /* Premium portal: its flex brand label was allowed to push Menu off screen. */
  body.msw-ui-fix-premium .mswp-header-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
  }
  body.msw-ui-fix-premium .mswp-header .mswp-brand {
    min-width: 0;
    max-width: 100%;
    gap: 9px;
  }
  body.msw-ui-fix-premium .mswp-header .mswp-monogram {
    flex: 0 0 48px;
    width: 48px;
  }
  body.msw-ui-fix-premium .mswp-header .mswp-brand-label {
    min-width: 0;
  }
  body.msw-ui-fix-premium .mswp-header .mswp-brand-label strong,
  body.msw-ui-fix-premium .mswp-header .mswp-brand-label small {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body.msw-ui-fix-premium .mswp-header .mswp-menu-toggle {
    min-width: 44px;
    min-height: 44px;
    white-space: nowrap;
    margin: 0;
  }
  body.msw-ui-fix-premium .mswp-header .mswp-nav {
    grid-column: 1 / -1;
    min-width: 0;
    max-height: 65vh;
    max-height: 65dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  body.msw-ui-fix-premium .mswp-hero .mswp-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  body.msw-ui-fix-premium .mswp-hero .mswp-hero-grid > div {
    min-width: 0;
  }
  body.msw-ui-fix-premium .mswp-hero :is(h1, .mswp-intro, .mswp-eyebrow) {
    overflow-wrap: anywhere;
  }
}

/* Flyxpress: preserve the light technical navigation surface with dark links. */
body.msw-ui-fix-flyxpress .msw58-portal > nav.msw59-nav {
  background: #f6fafc;
  color: #163751;
}
body.msw-ui-fix-flyxpress .msw58-portal > nav.msw59-nav > a {
  color: #163751 !important;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
body.msw-ui-fix-flyxpress .msw58-portal > nav.msw59-nav > a:hover {
  color: #073c61 !important;
  text-decoration: underline;
}
body.msw-ui-fix-flyxpress .msw58-portal > nav.msw59-nav > a:focus-visible {
  outline: 3px solid #075f91;
  outline-offset: 2px;
}

/* Sauna Luxury HD: keep the complete desktop navigation inside its column.
 * The theme has a 1500px header cap and ten menu entries; changing only the
 * mobile breakpoint cannot make a single desktop row fit at wider viewports.
 * Keep the theme's existing hamburger behavior at <=1100px unchanged.
 */
@media (min-width: 1101px) {
  body.wp-child-theme-msw-luxury-hd-portal-v3-1 .msw-header-inner {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  body.wp-child-theme-msw-luxury-hd-portal-v3-1 .msw-site-nav {
    flex: 1 1 0;
    min-width: 0;
  }

  body.wp-child-theme-msw-luxury-hd-portal-v3-1 .msw-nav-list {
    flex-wrap: wrap;
    gap: 4px 16px;
    justify-content: flex-end;
  }

  body.wp-child-theme-msw-luxury-hd-portal-v3-1 .msw-nav-list > li > a {
    min-height: 44px;
  }

  body.wp-child-theme-msw-luxury-hd-portal-v3-1 .msw-header-call {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }

  body.wp-child-theme-msw-luxury-hd-portal-v3-1 .msw-nav-list > li.current-menu-item > a::after {
    bottom: 0;
  }
}

/* The consent label contains anonymous text nodes around its privacy link.
 * Inline flow lets that complete sentence wrap; flex would keep three chunks in a row. */
body.msw-ui-fix-premium .mswpc38-form label.mswpc38-privacy {
  display: block;
  line-height: 1.5;
}
body.msw-ui-fix-premium .mswpc38-form label.mswpc38-privacy > input[type="checkbox"] {
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

/* Sauna Luxury HD: keep an open mobile menu above the measured contact stack.
 * The theme already supplies menu scrolling and Escape behavior. Give scrolling
 * a shorter viewport so its final entries cannot sit underneath fixed CTAs.
 */
@media (max-width: 1100px) {
  body.wp-child-theme-msw-luxury-hd-portal-v3-1 .msw-site-nav {
    max-height: calc(100vh - 84px - var(--msw-layout-reserve, 0px));
    max-height: calc(var(--msw-layout-vh, 100dvh) - 84px - var(--msw-layout-reserve, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-padding-top: 8px;
    scroll-padding-bottom: 8px;
  }

  body.wp-child-theme-msw-luxury-hd-portal-v3-1 .msw-nav-list > li > a,
  body.wp-child-theme-msw-luxury-hd-portal-v3-1 .msw-nav-list .sub-menu a {
    min-height: 44px;
  }
}

/* A 44px brand target with the tagline kept in normal flow. */
body.wp-theme-onepress #masthead .site-title .site-text-logo {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 44px;
}
@media (min-width: 768px) {
  body.wp-theme-onepress #masthead .site-brand-inner.no-logo-img.has-desc {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 75px;
    line-height: normal;
  }
  body.wp-theme-onepress #masthead .site-branding .site-title {
    display: block;
    margin: 0;
    line-height: 1.2;
  }
  body.wp-theme-onepress #masthead .site-branding .site-description {
    position: static;
    top: auto;
    margin: 0;
  }
}

body.wp-theme-onepress #nav-toggle{min-width:44px;min-height:44px}
@media(max-width:1140px){body.wp-theme-onepress .onepress-menu.onepress-menu-mobile a{white-space:normal;overflow-wrap:anywhere}}
/* Keep the rotated footer control inside the page while resizing. */
body.wp-theme-onepress .site-footer .back-to-top {
  right: 24px !important;
  transition-property: color, background-color, opacity;
}
