/* A real mobile sheet: the catalog stays put while filter content scrolls. */
@media (max-width: 620px) {
  .storefront .smart-filter-dialog[open] {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #f4f7fb;
    animation: none;
    transform: none;
    clip-path: none;
  }
  .storefront .smart-filter-dialog::backdrop {
    background: #0c1b32a6;
  }
  .storefront .smart-dialog-head {
    flex: none;
    min-height: 78px;
    padding-top: max(12px, env(safe-area-inset-top));
  }
  .storefront .smart-filter-dialog[open] .smart-dialog-body,
  .storefront .smart-filter-dialog.is-supplier .smart-dialog-body {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    margin: 0;
    padding: 12px 11px 20px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    align-content: start;
    grid-auto-rows: max-content;
  }
  .storefront .smart-dialog-foot {
    position: relative;
    inset: auto;
    flex: none;
    width: 100%;
    margin: 0;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    box-shadow: 0 -7px 23px #162b4212;
  }
}

@media (hover: none), (pointer: coarse) {
  .storefront .smart-filter-dialog[open],
  .storefront .smart-filter-dialog[open]:not(.is-closing) {
    animation: none;
  }
  .storefront .smart-dialog-body > .smart-filter-section:hover,
  .storefront .smart-dialog-body > .smart-filter-section:focus-within,
  .storefront .smart-source-trigger:hover,
  .storefront .smart-filter-section > #smartSortSelect:hover {
    transform: none;
  }
  .storefront #smartFilterApply {
    background: #c61136;
    box-shadow: 0 4px 11px #b1123630;
    transition: transform .08s ease, background-color .08s ease, box-shadow .08s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .storefront #smartFilterApply::before { display: none; }
  .storefront #smartFilterApply:hover {
    transform: none;
    background: #c61136;
    box-shadow: 0 4px 11px #b1123630;
    filter: none;
  }
  .storefront #smartFilterApply:active {
    transform: scale(.97);
    background: #9e092b;
    box-shadow: 0 2px 5px #b1123633;
  }
  .storefront .smart-filter-open {
    transition: background-color .08s ease, transform .08s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .storefront .smart-filter-open:hover { transform: none; }
  .storefront .smart-filter-open:hover { background: #172d49; box-shadow: none; }
  .storefront .smart-filter-open:active { transform: scale(.98); background: #243e5f; }
  .storefront .smart-source-trigger:hover:not([aria-expanded="true"]) {
    border-color: #cfdeec;
    background: #fff;
    box-shadow: 0 3px 10px #132b440c;
  }
  .storefront .smart-filter-section > #smartSortSelect:hover:not(:focus) {
    border-color: #cfdeec;
    box-shadow: 0 3px 10px #132b440c;
  }
  .storefront #smartFilterReset:hover {
    transform: none;
    border-color: #cfdce9;
    color: #435f7d;
    box-shadow: none;
  }
  .storefront #smartFilterClose:hover {
    transform: none;
    border-color: #ffffff50;
    background: #ffffff14;
    box-shadow: none;
  }
  .storefront #smartStockSection .smart-switch-row:hover input { transform: none; }
  .storefront #smartStockSection .smart-switch-row input {
    transition-duration: .1s;
  }
}
