/* =========================================================================
   BROW-01  Cross-browser compatibility fixes
   -------------------------------------------------------------------------
   Additive overrides, loaded AFTER the main stylesheet (see partials/head.php).
   The main stylesheet is minified/generated, so fixes live here rather than
   being hand-edited into it. Each block says what breaks and where.
   ========================================================================= */

/* 1. iOS Safari: landscape rotation inflates text size unless told not to. */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* 2. Safari <= 17 only supports the prefixed backdrop-filter. The main CSS
      ships the unprefixed form only, so the card-hover blur silently fails. */
.higher-standard .higher-standard-cards-wrapper .ctr:hover .overlay {
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

/* 3. Firefox ignores width:-webkit-fill-available (used on .breadcrumb), so the
      breadcrumb falls back to its content width. Firefox's equivalent is
      -moz-available. */
@supports (width: -moz-available) {
    .breadcrumb {
        width: -moz-available;
    }
}

/* 4. Mobile menu scroll lock. JS toggles html.menu-open, but no stylesheet
      acted on it, so the page scrolled behind the open drawer (worst on iOS).
      Scoped to the mobile breakpoint so a menu left "open" after resizing to
      desktop can never lock scrolling. */
@media (max-width: 880px) {
    html.menu-open,
    html.menu-open body {
        overflow: hidden;
    }

    .header-menu {
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
}

/* 5. iOS Safari zooms the page when a focused field has font-size < 16px.
      Many forms use 12-14px (footer newsletter, bootcamp form, popup form,
      form-row selects). On touch devices only, raise fields to 16px. Checkbox,
      radio, button-like and range inputs are excluded so they keep their look. */
@media (hover: none) and (pointer: coarse) {
    html body :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="range"]):not([type="file"]):not([type="hidden"]) {
        font-size: 16px;
    }
}

/* 6. Fixed overlays on iOS: keep tap highlight from flashing on the controls. */
.whatsapp-sticky,
#eximus-cookie-banner button,
.burger-menu {
    -webkit-tap-highlight-color: transparent;
}
