/* AnyRoom Build 097 — /lokaler robust result-first UX.
   This is the single mobile-specific source of truth for the result-page
   changes. Desktop remains on the stable Build 080 stylesheet. */

@media (max-width:820px){
  .ar070-page{overflow-x:hidden}
  /* Result mode is added from the URL in JS as well as from Blade, so it works even after direct links/back navigation. */
  .ar093-results-mode .ar070-hero__intro,
  .ar093-results-mode .ar070-quick-cats{display:none!important}
  .ar093-results-mode .ar070-search{display:none!important}
  .ar093-results-mode.is-search-open .ar070-search{display:grid!important}
  .ar093-results-mode .ar070-results-section{padding-top:10px!important}
  .ar093-results-mode .ar070-results-layout{display:flex!important;flex-direction:column!important}
  .ar093-results-mode .ar070-results{order:1!important}
  .ar093-results-mode .ar070-filters{order:2!important;display:none!important}
  .ar093-results-mode .ar070-filters.is-open{display:block!important}

  .ar070-page .ar070-shell{width:calc(100% - 24px);max-width:none}

  /* When a real search has already been made, don't force the user through
     the full marketing hero again. Show a compact query strip instead. */
  .ar093-results-mode .ar070-hero{
    padding:8px 0 10px!important;
    min-height:0;
    background:#f6f9fb!important;
    border-bottom:1px solid #e5edf3;
  }
  .ar093-results-mode .ar070-hero::before,
  .ar093-results-mode .ar070-hero::after{display:none!important}
  .ar093-results-mode .ar070-hero__intro,
  .ar093-results-mode .ar070-quick-cats{display:none!important}

  .ar092-mobile-query{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    min-height:58px;
    padding:10px 12px 10px 14px;
    border:1px solid #dce6ed;
    border-radius:15px;
    background:#fff;
    box-shadow:0 7px 18px rgba(15,45,70,.045);
  }
  .ar092-mobile-query__copy{min-width:0;display:flex;flex-direction:column;gap:3px}
  .ar092-mobile-query__copy>span{
    color:#e89008;
    font-size:10px;
    line-height:1;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
  }
  .ar092-mobile-query__copy strong{
    min-width:0;
    color:#0f2d46;
    font-size:13px;
    line-height:1.28;
    font-weight:800;
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
  }
  .ar092-edit-search{
    flex:0 0 auto;
    height:38px;
    padding:0 10px 0 12px;
    display:inline-flex;
    align-items:center;
    gap:5px;
    border:1px solid #d9e4eb;
    border-radius:10px;
    background:#f8fafc;
    color:#173a57;
    font:inherit;
    font-size:12px;
    font-weight:900;
  }
  .ar092-edit-search svg{
    width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;
    stroke-linecap:round;stroke-linejoin:round;transition:transform .18s ease
  }
  .ar092-edit-search[aria-expanded="true"] svg{transform:rotate(90deg)}

  .ar093-results-mode .ar070-search{
    display:none;
    grid-template-columns:1fr!important;
    gap:8px;
    margin:10px 0 0!important;
    padding:9px;
    border-radius:15px;
    box-shadow:0 9px 24px rgba(15,45,70,.07);
  }
  .ar093-results-mode.is-search-open .ar070-search{display:grid}
  .ar093-results-mode .ar070-search__field{height:58px}
  .ar093-results-mode .ar070-search__button{min-height:54px!important}
  .ar093-results-mode .ar070-category-menu,
  .ar093-results-mode .ar070-where-menu{z-index:300}

  /* Result section appears immediately after the compact search summary. */
  .ar070-results-section{padding:18px 0 56px!important}
  .ar070-results-layout{
    display:flex!important;
    flex-direction:column;
    gap:0!important;
  }
  .ar070-results{order:1;width:100%;min-width:0}
  .ar070-filters{order:2}

  .ar070-results__head{
    display:block!important;
    margin:0 0 14px;
    padding:0;
  }
  .ar070-results-label{
    display:block;
    margin-bottom:5px;
    color:#e38d08;
    font-size:10px;
    line-height:1;
    font-weight:900;
    letter-spacing:.09em;
    text-transform:uppercase;
  }
  .ar070-results__head h2{
    margin:0;
    color:#0f2d46;
    font-size:30px;
    line-height:1.03;
    letter-spacing:-.04em;
    font-weight:900;
  }
  .ar070-active-filters{
    display:flex!important;
    flex-wrap:nowrap!important;
    gap:6px!important;
    margin-top:11px;
    overflow-x:auto;
    padding:0 0 2px;
    scrollbar-width:none;
  }
  .ar070-active-filters::-webkit-scrollbar{display:none}
  .ar070-active-filters span{
    flex:0 0 auto;
    padding:7px 10px!important;
    border:1px solid #dfe7ed;
    border-radius:999px;
    background:#f6f9fb!important;
    color:#627a92!important;
    font-size:11px!important;
    font-weight:800;
  }

  .ar092-mobile-tools{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin-top:12px;
  }
  .ar092-mobile-tools button{
    min-height:44px;
    padding:0 12px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    border:1px solid #d8e3eb;
    border-radius:11px;
    background:#fff;
    color:#173a57;
    font:inherit;
    font-size:13px;
    font-weight:900;
  }
  .ar092-mobile-tools button:active{background:#f4f7f9}
  .ar092-mobile-tools svg{
    width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;
    stroke-linecap:round;stroke-linejoin:round
  }
  .ar092-mobile-tools b{
    min-width:19px;height:19px;padding:0 5px;display:grid;place-items:center;
    border-radius:999px;background:#fff0cb;color:#c97d06;font-size:10px
  }

  /* Results before filters on mobile. */
  .ar070-grid{grid-template-columns:1fr!important;gap:12px!important}
  .ar070-card{border-radius:16px!important}
  .ar070-card__photo{aspect-ratio:1.68/1!important}
  .ar070-card__body{padding:13px 14px 14px!important}
  .ar070-card__title{min-height:0!important;font-size:18px!important}
  .ar070-card__bottom{margin-top:11px!important;padding-top:11px!important}

  /* Filters are now a bottom sheet, not a giant block before results. */
  .ar070-filters{
    display:none;
    position:fixed!important;
    z-index:520;
    left:0;
    right:0;
    bottom:0;
    top:auto!important;
    width:100%;
    max-height:min(86dvh,760px);
    overflow:hidden;
    margin:0;
    padding:0;
    border:0;
    border-top:1px solid #dce6ed;
    border-radius:24px 24px 0 0;
    background:#fff;
    box-shadow:0 -18px 48px rgba(15,45,70,.20);
  }
  .ar070-filters.is-open{display:flex;flex-direction:column}
  .ar070-filters__head{
    position:relative;
    flex:0 0 auto;
    z-index:2;
    margin:0!important;
    padding:18px 18px 14px!important;
    background:#fff;
    border-bottom:1px solid #edf1f4;
  }
  .ar070-filters #filter-form{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overscroll-behavior:contain;
    padding:16px 18px 18px;
  }
  .ar070-filters__head h2{font-size:25px!important}
  .ar070-filters__head p{font-size:12px!important}
  .ar092-filter-head-actions{display:flex;align-items:center;gap:8px}
  .ar092-filter-close{
    width:38px;height:38px;display:grid;place-items:center;border:1px solid #dce6ed;
    border-radius:50%;background:#f7fafc;color:#173a57
  }
  .ar092-filter-close svg{
    width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;
    stroke-linecap:round
  }
  .ar096-filter-location{margin-bottom:15px}
  .ar096-filter-location>label{font-size:13px}
  .ar096-filter-location input{height:50px;font-size:13px}
  .ar096-filter-location__menu{position:relative;top:5px;box-shadow:none;max-height:220px}
    .ar070-filter-field>span,.ar070-checks legend{font-size:13px!important}
  .ar070-filter-field select{height:50px!important;font-size:13px!important}
  .ar070-checks label{font-size:13px!important}
  .ar097-filter-footer{
    flex:0 0 auto;
    padding:12px 18px calc(14px + env(safe-area-inset-bottom));
    border-top:1px solid #e7edf2;
    background:#fff;
    box-shadow:0 -8px 18px rgba(15,45,70,.055);
  }
  .ar097-filter-footer .ar070-filter-submit{
    position:static!important;
    width:100%;
    min-height:52px!important;
    margin:0!important;
    box-shadow:0 8px 18px rgba(15,45,70,.08);
  }
  #ar092-sort-field{margin-bottom:0!important}

  .ar092-filter-backdrop{
    position:fixed;
    z-index:510;
    inset:0;
    width:100%;
    height:100%;
    border:0;
    background:rgba(8,28,44,.42);
    backdrop-filter:blur(2px);
    -webkit-backdrop-filter:blur(2px);
  }
  .ar092-filter-backdrop[hidden]{display:none!important}
  body.ar092-filter-lock{overflow:hidden!important}

  #ar092-sort-field{scroll-margin-top:82px}

  /* Initial /lokaler page (no search yet) keeps the normal hero. */
  .ar070-page:not(.ar093-results-mode) .ar092-mobile-query{display:none}
  .ar070-page:not(.ar093-results-mode) .ar092-mobile-tools{display:grid}
}

@media (min-width:821px){
  .ar092-mobile-query,
  .ar092-mobile-tools,
  .ar092-filter-close,
  .ar092-filter-backdrop{display:none!important}
}
