/*
 * Alsie Express mobile 2027 polish
 * Mobile-only refinements. Desktop layout is intentionally left intact.
 */

:root {
  --aex-navy: #10194A;
  --aex-ink: #07132F;
  --aex-orange: #ff7a1a;
  --aex-bg: #F5F8FC;
  --aex-line: #E4EBF5;
  --aex-card-shadow: 0 18px 55px rgba(16, 25, 74, .12);
}

* {
  -webkit-tap-highlight-color: transparent;
}

html {
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  overscroll-behavior-y: contain;
}

input,
select,
textarea,
button {
  font-size: 16px;
}

button,
a,
label,
input[type="checkbox"],
input[type="radio"],
select {
  touch-action: manipulation;
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
    scroll-padding-top: 88px;
    background: radial-gradient(circle at 20% -10%, rgba(35, 76, 255, .12), transparent 34%),
      linear-gradient(180deg, #f8fbff 0%, #eef4fb 48%, #f8fbff 100%) !important;
  }

  body {
    padding: 0 !important;
    margin: 0 !important;
  }

  header {
    position: sticky !important;
    top: 0 !important;
    z-index: 60 !important;
    background: rgba(255,255,255,.82) !important;
    border-bottom: 1px solid rgba(226,232,240,.84) !important;
    box-shadow: 0 16px 50px rgba(16,25,74,.08) !important;
    backdrop-filter: blur(24px) saturate(1.18) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.18) !important;
  }

  header > div {
    padding: max(.65rem, env(safe-area-inset-top)) 1rem .65rem !important;
    min-height: 66px !important;
    gap: .65rem !important;
  }

  header img,
  header svg {
    max-height: 34px !important;
    width: auto !important;
  }

  header a,
  header button {
    min-height: 44px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
  }

  main {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1rem !important;
  }

  .max-w-7xl,
  .max-w-6xl,
  .max-w-5xl,
  .max-w-4xl,
  .max-w-3xl,
  .max-w-\[1280px\],
  .mx-auto {
    max-width: 100% !important;
  }

  .rounded-\[2\.4rem\],
  .rounded-\[2rem\],
  .rounded-\[1\.9rem\],
  .rounded-\[1\.8rem\],
  .rounded-\[1\.7rem\],
  .rounded-3xl {
    border-radius: 1.45rem !important;
  }

  .shadow-soft,
  .shadow-card,
  .shadow-xl,
  .shadow-2xl {
    box-shadow: var(--aex-card-shadow) !important;
  }

  .mobile-hero,
  section[class*="bg-gradient"],
  .ae-hero {
    border-radius: 0 0 1.75rem 1.75rem !important;
    margin-left: -1rem !important;
    margin-right: -1rem !important;
    padding: 1.15rem !important;
  }

  .mobile-card,
  .ae-card,
  form,
  section {
    max-width: 100% !important;
  }

  .mobile-stack,
  .review-layout,
  .receipt-layout,
  .results-layout,
  .grid[class*="grid-cols"],
  .lg\:grid-cols-\[320px_1fr\],
  .lg\:grid-cols-\[1fr_390px\],
  .lg\:grid-cols-\[minmax\(0\,1fr\)_380px\],
  .lg\:grid-cols-2,
  .md\:grid-cols-2,
  .md\:grid-cols-3,
  .md\:grid-cols-4 {
    grid-template-columns: 1fr !important;
  }

  /* Search widget */
  .airport-suggest {
    position: fixed !important;
    left: 1rem !important;
    right: 1rem !important;
    top: auto !important;
    bottom: max(1rem, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-height: min(70vh, 560px) !important;
    border-radius: 1.35rem !important;
    box-shadow: 0 28px 90px rgba(16,25,74,.22) !important;
    z-index: 90 !important;
  }

  .airport-option {
    grid-template-columns: 48px 1fr !important;
    min-height: 64px !important;
  }

  .flatpickr-calendar {
    width: calc(100vw - 2rem) !important;
    max-width: 420px !important;
    left: 1rem !important;
    right: 1rem !important;
    border-radius: 1.35rem !important;
    overflow: hidden !important;
    box-shadow: 0 28px 90px rgba(16,25,74,.22) !important;
  }

  /* Search/results */
  #filtersPanel,
  aside {
    width: 100% !important;
  }

  #filtersPanel {
    max-height: none !important;
  }

  .filter-panel-mobile-open {
    transform: translateX(0) !important;
  }

  #resultsList {
    margin-top: 1rem !important;
    gap: 1rem !important;
  }

  .result-card {
    border-radius: 1.35rem !important;
    overflow: hidden !important;
    box-shadow: 0 18px 55px rgba(16,25,74,.10) !important;
  }

  .result-card * {
    min-width: 0;
  }

  .result-card form,
  .result-card article {
    width: 100% !important;
  }

  .result-card .airline-logo,
  .airline-logo {
    width: 64px !important;
    height: 54px !important;
    min-width: 64px !important;
    border-radius: 1rem !important;
    object-fit: contain !important;
  }

  .sort-toolbar {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0,1fr)) !important;
    gap: .45rem !important;
    width: 100% !important;
  }

  .sort-toolbar button,
  .sortBtn {
    min-height: 44px !important;
    padding: .75rem .55rem !important;
    font-size: .82rem !important;
    border-radius: 999px !important;
  }

  #selectedOutboundWrap article {
    border-radius: 1.35rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  #returnStepIntro,
  #returnDebugPanel,
  #noClientResults {
    border-radius: 1.35rem !important;
  }

  .sticky-cta,
  .mobile-sticky-cta {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 45 !important;
    margin-left: -1rem !important;
    margin-right: -1rem !important;
    padding: .85rem 1rem max(.95rem, env(safe-area-inset-bottom)) !important;
    background: rgba(245,248,252,.86) !important;
    border-top: 1px solid rgba(226,232,240,.95) !important;
    backdrop-filter: blur(22px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(22px) saturate(1.2) !important;
  }

  /* Forms/review/documents */
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    min-height: 52px !important;
    border-radius: 1rem !important;
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: 20px !important;
    height: 20px !important;
  }

  label {
    line-height: 1.25 !important;
  }

  .passenger-card,
  .traveler-card {
    border-radius: 1.35rem !important;
  }

  .review-layout > aside,
  .receipt-layout > aside {
    position: static !important;
  }

  /* Admin/data-heavy pages */
  table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
  }

  thead,
  tbody,
  tr {
    width: 100% !important;
  }

  pre,
  code {
    white-space: pre-wrap !important;
    word-break: break-word !important;
  }

  /* Better mobile buttons */
  .btn,
  button[type="submit"],
  a[class*="bg-[#10194A]"],
  a[class*="bg-alsie-navy"],
  button[class*="bg-[#10194A]"],
  button[class*="bg-alsie-navy"] {
    min-height: 52px !important;
    border-radius: 1.05rem !important;
  }

  /* Keep primary CTAs feeling premium */
  button[type="submit"],
  .primary-cta,
  a.primary-cta {
    box-shadow: 0 18px 38px rgba(16,25,74,.22) !important;
  }

  /* Reduce visual crowding */
  .text-5xl { font-size: 2.55rem !important; line-height: .98 !important; }
  .text-4xl { font-size: 2.05rem !important; line-height: 1.02 !important; }
  .text-3xl { font-size: 1.65rem !important; line-height: 1.08 !important; }
  .text-2xl { font-size: 1.35rem !important; line-height: 1.14 !important; }

  .p-8 { padding: 1.15rem !important; }
  .p-7 { padding: 1.05rem !important; }
  .p-6 { padding: 1rem !important; }
  .px-8 { padding-left: 1.15rem !important; padding-right: 1.15rem !important; }
  .py-10 { padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }

  .gap-8 { gap: 1.15rem !important; }
  .gap-7 { gap: 1rem !important; }
  .gap-6 { gap: .95rem !important; }

  /* Prevent accidental hidden content under browser chrome */
  body::after {
    content: "";
    display: block;
    height: env(safe-area-inset-bottom);
  }
}

@media (max-width: 430px) {
  header > div {
    padding-left: .75rem !important;
    padding-right: .75rem !important;
  }

  header img {
    max-width: 132px !important;
  }

  header .hidden-mobile-430 {
    display: none !important;
  }

  main {
    padding: .75rem !important;
  }

  .sort-toolbar {
    grid-template-columns: 1fr !important;
  }

  .airport-suggest {
    left: .75rem !important;
    right: .75rem !important;
  }

  .text-5xl { font-size: 2.25rem !important; }
  .text-4xl { font-size: 1.9rem !important; }
}

/* Installable app / standalone feel */
@media (display-mode: standalone) and (max-width: 768px) {
  header > div {
    padding-top: max(1rem, env(safe-area-inset-top)) !important;
  }
}


/* v13.39 mobile filter + scroll fixes */
@media (max-width: 768px) {
  html.aex-filter-open,
  body.aex-filter-open {
    overflow: hidden !important;
    height: 100dvh !important;
  }

  body.aex-filter-open {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
  }

  .aex-floating-filter {
    position: fixed !important;
    left: 50% !important;
    bottom: max(1rem, env(safe-area-inset-bottom)) !important;
    transform: translateX(-50%) !important;
    z-index: 66 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .65rem !important;
    min-height: 58px !important;
    padding: 0 1.25rem !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255,255,255,.55) !important;
    background: linear-gradient(135deg, #10194A 0%, #263FA0 100%) !important;
    color: #fff !important;
    font-weight: 900 !important;
    font-size: 1rem !important;
    letter-spacing: -.01em !important;
    box-shadow: 0 20px 55px rgba(16,25,74,.32), inset 0 1px 0 rgba(255,255,255,.18) !important;
    backdrop-filter: blur(18px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.2) !important;
  }

  .aex-floating-filter:active {
    transform: translateX(-50%) scale(.97) !important;
  }

  .aex-filter-open .aex-floating-filter,
  .filters-sidebar.is-open ~ .aex-floating-filter {
    display: none !important;
  }

  .aex-floating-filter-icon {
    display: grid !important;
    place-items: center !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.14) !important;
  }

  .filters-sidebar.is-open {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 80 !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }

  .filters-sidebar .filters-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(7,19,47,.52) !important;
    backdrop-filter: blur(10px) saturate(1.1) !important;
    -webkit-backdrop-filter: blur(10px) saturate(1.1) !important;
  }

  .filters-sidebar .filters-panel {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: min(92vw, 430px) !important;
    max-width: 430px !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border-radius: 0 1.65rem 1.65rem 0 !important;
  }

  .filters-sidebar .filters-mobile-head {
    flex: 0 0 auto !important;
    padding-top: max(1rem, env(safe-area-inset-top)) !important;
  }

  .filters-sidebar .filters-panel-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom)) !important;
  }

  body.review-page,
  body.review-page.aex-filter-open {
    position: static !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100dvh !important;
    top: auto !important;
  }

  html:has(body.review-page) {
    overflow-y: auto !important;
    height: auto !important;
  }

  body.review-page main {
    padding-bottom: max(2rem, env(safe-area-inset-bottom)) !important;
  }
}

/* v13.39 fixed mobile filter button + version visibility */
@media (max-width: 768px) {
  .results-toolbar,
  .results-toolbar.toolbar-floating,
  .search-skeleton-toolbar,
  .skeleton-toolbar,
  [data-mobile-toolbar],
  [class*="toolbar-floating"] {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    max-width: 100% !important;
    transform: none !important;
    opacity: 1 !important;
    z-index: auto !important;
    pointer-events: auto !important;
  }

  #resultsToolbarSpacer,
  .results-toolbar-spacer,
  .toolbar-spacer {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
  }

  /* The inline toolbar button remains normal in the card */
  #openFiltersMobile.mobile-filter-btn {
    position: relative !important;
    inset: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .5rem !important;
    min-height: 46px !important;
    padding: .75rem .95rem !important;
    border-radius: 999px !important;
    background: #F4F7FB !important;
    color: #10194A !important;
    border: 1px solid #E4EBF5 !important;
    font-weight: 900 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  #openFiltersMobile.mobile-filter-btn.is-docked {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    min-height: 46px !important;
    padding: .75rem .95rem !important;
    background: #F4F7FB !important;
    color: #10194A !important;
    border: 1px solid #E4EBF5 !important;
    box-shadow: none !important;
  }

  /* Separate reliable bottom button, hidden until JS marks it visible */
  #fixedFiltersMobile.fixed-filter-mobile {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    bottom: max(.9rem, env(safe-area-inset-bottom)) !important;
    z-index: 75 !important;
    transform: translate(-50%, 18px) scale(.96) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .55rem !important;
    min-height: 54px !important;
    padding: .7rem 1.15rem .7rem .78rem !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #10194A 0%, #253f9f 100%) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.42) !important;
    box-shadow: 0 20px 55px rgba(16,25,74,.34), inset 0 1px 0 rgba(255,255,255,.18) !important;
    font-weight: 900 !important;
    font-size: 1rem !important;
    letter-spacing: -.01em !important;
    transition: opacity .22s ease, transform .34s cubic-bezier(.2,.9,.2,1) !important;
    backdrop-filter: blur(18px) saturate(1.18) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.18) !important;
  }

  #fixedFiltersMobile.fixed-filter-mobile.is-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translate(-50%, 0) scale(1) !important;
  }

  #fixedFiltersMobile.fixed-filter-mobile:active {
    transform: translate(-50%, 0) scale(.96) !important;
  }

  .fixed-filter-mobile-icon {
    display: grid !important;
    place-items: center !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.15) !important;
  }

  body.aex-filter-open #fixedFiltersMobile.fixed-filter-mobile {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translate(-50%, 18px) scale(.96) !important;
  }

  body.aex-filter-button-docked #resultsList {
    padding-bottom: 4.75rem !important;
  }

  .aex-page-version,
  #aexPageVersionSearchPhp,
  #aexPageVersionSearchResults {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    text-align: center !important;
    color: rgba(100,116,139,.75) !important;
    font-size: 11px !important;
    line-height: 1 !important;
    padding: 1.25rem 0 max(1.25rem, env(safe-area-inset-bottom)) !important;
  }
}

@media (min-width: 769px) {
  .aex-page-version,
  #aexPageVersionSearchPhp,
  #aexPageVersionSearchResults {
    display: block;
    text-align: center;
    color: rgba(100,116,139,.75);
    font-size: 11px;
    line-height: 1;
    padding: 1.25rem 0;
  }
}

/* v13.39 filter sidepanel scroll fix */
@media (max-width:768px){
  html.aex-filter-open,body.aex-filter-open{overflow:hidden!important;height:100dvh!important;max-height:100dvh!important;touch-action:none!important}
  body.aex-filter-open{position:fixed!important;left:0!important;right:0!important;width:100%!important}
  #filtersSidebar.is-open{display:block!important;position:fixed!important;inset:0!important;z-index:2147482500!important;height:100dvh!important;max-height:100dvh!important;overflow:hidden!important;touch-action:none!important}
  #filtersSidebar.is-open .filters-panel{position:fixed!important;left:0!important;top:0!important;bottom:0!important;width:min(92vw,430px)!important;max-width:430px!important;height:100dvh!important;max-height:100dvh!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;touch-action:auto!important;overscroll-behavior:contain!important}
  #filtersSidebar.is-open .filters-mobile-head{flex:0 0 auto!important;padding-top:max(1rem,env(safe-area-inset-top))!important}
  #filtersSidebar.is-open .filters-panel-body{flex:1 1 auto!important;min-height:0!important;height:auto!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior:contain!important;touch-action:pan-y!important;padding-bottom:max(2rem,env(safe-area-inset-bottom))!important}
}

/* v13.39 compact mobile above fold */
@media (max-width:768px){
  header > div,.site-header-inner{min-height:50px!important;padding-top:max(.42rem,env(safe-area-inset-top))!important;padding-bottom:.42rem!important;gap:.42rem!important}
  header img{max-height:26px!important;max-width:126px!important}
  main{padding:.5rem .75rem 0!important}
  .mobile-hero{margin-top:0!important;margin-left:-.75rem!important;margin-right:-.75rem!important;border-radius:0 0 1.2rem 1.2rem!important;padding:.68rem .85rem .75rem!important}
  .mobile-hero h1{font-size:1.58rem!important;line-height:1!important;margin-top:.15rem!important}
  .mobile-hero p{font-size:.76rem!important;line-height:1.22!important;margin-top:.18rem!important}
  .mobile-hero .grid.grid-cols-3{gap:.4rem!important;margin-top:.58rem!important}
  .mobile-hero .grid.grid-cols-3 > div{border-radius:.85rem!important;padding:.42rem .48rem!important}
  .results-shell{margin-top:.55rem!important}
  .results-toolbar{border-radius:1.1rem!important;padding:.62rem .7rem!important;gap:.48rem!important}
  .results-toolbar-count .text-xl{font-size:.96rem!important;line-height:1.04!important}
  #openFiltersMobile.mobile-filter-btn{min-height:36px!important;padding:.48rem .65rem!important;font-size:.8rem!important}
  .sort-toolbar .sortBtn{min-height:36px!important;padding:.5rem .22rem!important;border-radius:.82rem!important;font-size:.71rem!important}
  #resultsList{margin-top:.58rem!important;gap:.72rem!important}
  .result-card .result-body{padding:.72rem!important}
}

/* v13.39 compact cards/loader/review scroll */
@media(max-width:768px){body.review-page,body.review-page.aex-filter-open{position:static!important;overflow-y:auto!important;height:auto!important;max-height:none!important;touch-action:auto!important}.result-card .text-\[34px\]{font-size:28px!important}.result-card button[type="submit"]{min-height:44px!important}.selected-outbound-card{border-radius:1rem!important;margin-bottom:.55rem!important}}

/* v13.39 mobile polish */
@media(max-width:768px){
  #openSearchEditMobile{flex:0 0 auto!important;min-width:auto!important}
  body.review-page{overflow-y:auto!important;height:auto!important;position:static!important}
  body.review-page main{overflow:visible!important;height:auto!important;padding-bottom:max(7rem,env(safe-area-inset-bottom))!important}
}


/* v13.39 review mobile rework */
@media(max-width:768px){
  body.review-page{overflow-y:auto!important;height:auto!important;position:static!important;background:#F5F8FC!important}
  body.review-page main{overflow:visible!important;height:auto!important;padding-bottom:max(8.5rem,env(safe-area-inset-bottom))!important}
  body.review-page .mobile-hero{padding:.72rem .85rem .82rem!important;border-radius:0 0 1.2rem 1.2rem!important}
  body.review-page .mobile-hero .mobile-title{font-size:1.42rem!important;line-height:1.02!important}
  body.review-page .mobile-hero .mobile-title + p{display:none!important}
  body.review-page .mobile-card{border-radius:1.1rem!important;padding:.88rem!important}
  body.review-page form[action="book.php"] > button{min-height:52px!important;font-size:1rem!important;border-radius:1rem!important}
}


/* v13.39 search debug */
#searchDebugPanel pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}

/* v13.39 search edit modal polish */
#searchEditModal:not(.hidden){display:flex!important}
@media(max-width:768px){
  .search-edit-card{border-radius:1.45rem!important;padding:.95rem!important;max-height:calc(100dvh - 2rem)!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important}
  .search-edit-card input,.search-edit-card select{min-height:48px!important;border-radius:.9rem!important;font-size:16px!important}
  .search-edit-submit{width:100%!important;min-height:50px!important}
}


/* v13.39 review desktop scroll fix */
@media (min-width:769px){
  html,body.review-page{overflow-y:auto!important;height:auto!important;max-height:none!important;position:static!important}
  body.review-page main{overflow:visible!important;height:auto!important;max-height:none!important}
  body.review-page form[action="book.php"] > button{position:static!important;left:auto!important;right:auto!important;bottom:auto!important;margin-top:1.5rem!important}
}


/* v13.39 safe frontpage-like search modal */
#searchEditModal:not(.hidden){display:flex!important}
@media(max-width:768px){
  #searchEditModal .search-edit-card{border-radius:1.45rem!important;max-height:calc(100dvh - 1.5rem)!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important}
}


/* v13.39 exact searchbox modal backup */
#searchEditModal:not(.hidden){display:flex!important}
@media(max-width:760px){
  #searchEditModal .search-edit-card{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:10px!important;padding:10px!important}
}


/* v13.39 true frontpage modal backup */
#searchEditModal:not(.hidden){display:flex!important}
@media(max-width:760px){
  .aexm-bar{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
}


/* v14.04 universal page scrolling safeguard
 * Keep the document itself scrollable on normal pages. Modal/filter components
 * may still lock scrolling explicitly while they are open.
 */
html {
  min-height: 100%;
  height: auto;
}
body {
  min-height: 100vh;
  height: auto;
  max-height: none;
}

@media (min-width: 769px) {
  html {
    overflow-x: hidden !important;
    overflow-y: scroll !important;
    height: auto !important;
    max-height: none !important;
  }

  /* review.php had both html and body acting as scroll containers.
     Use the document as the single desktop scroll container instead. */
  body.review-page {
    overflow: visible !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    position: static !important;
  }

  body.review-page main {
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
}

@media (max-width: 768px) {
  html:not(.aex-filter-open) {
    min-height: 100%;
    height: auto;
    max-height: none;
  }
  body:not(.aex-filter-open) {
    min-height: 100vh;
    height: auto;
    max-height: none;
  }
}
