/*
 * Result pages (/hotel/search, /hotel/all). One idea carries the page: a hotel is a ticket, and the price sits on its
 * stub. Everything else stays quiet: flat white cards on a neutral paper, one family of type (Plus Jakarta Sans,
 * drawn in Jakarta), the Walanja orange (production brand colour) for the actions that move you forward and the price.
 * Markup: resources/views/results/*.blade.php. Behaviour: public/js/results.js.
 */
.rs-page, .rs-backdrop, .rs-ribbon, .hm {
    --rs-paper: var(--wj-paper);
    --rs-card: var(--wj-card);
    --rs-ink: var(--wj-ink);
    --rs-ink-2: var(--wj-ink-2);
    --rs-line: var(--wj-line);
    --rs-line-strong: var(--wj-line-strong);
    --rs-leaf: var(--wj-orange);
    --rs-leaf-ink: var(--wj-orange-ink);
    --rs-leaf-tint: var(--wj-orange-tint);
    --rs-orange: var(--wj-orange-ink);
    --rs-orange-dark: var(--wj-orange-dark);
    --rs-teal: var(--wj-teal-ink);
    --rs-star: var(--wj-star);
    --rs-ribbon-h: 88px;
    font-family: var(--wj-font);
}
.rs-page { background: var(--rs-paper); color: var(--rs-ink); font-size: 14px; line-height: 1.5; min-height: 60vh; padding-bottom: 56px; }
.rs-page *, .rs-ribbon *, .rs-backdrop { box-sizing: border-box; }
.rs-page a:focus-visible, .rs-page button:focus-visible, .rs-page select:focus-visible, .rs-page input:focus-visible,
/* .rs-ribbon button:focus-visible, .rs-ribbon input:focus-visible { outline: 3px solid var(--wj-focus); outline-offset: 2px; } */
html.rs-lock { overflow: hidden; }

/* ribbon: the search, sticky and in the flow, so the list scrolls under it and is never covered by it */
.rs-sentinel { height: 1px; margin-bottom: -1px; }
.rs-ribbon { position: sticky; top: 8px; z-index: 1040; background: transparent; pointer-events: none; }
.rs-ribbon > * { pointer-events: auto; }
/* below the Bootstrap modal (1055) and its backdrop (1050), so the promo popup is never cut by the search; a dropdown or calendar lifts it (.sc-lift) */
.rs-ribbon .sc-bar { box-shadow: 0 8px 24px -12px rgba(37, 37, 37, .35); transition: box-shadow .2s; }
.rs-ribbon.is-stuck .sc-bar { box-shadow: 0 12px 28px -10px rgba(37, 37, 37, .5); }
.rs-ribbon-row { display: flex; align-items: center; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.rs-ribbon .sc-form { flex: 1 1 auto; min-width: 0; }
.rs-ribbon .sc-bar { min-height: 52px; border: 1px solid var(--rs-line-strong); border-radius: 14px; background: var(--rs-card); }
.rs-ribbon .sc-field { padding: 6px 16px; border-radius: 14px; }
.rs-ribbon .sc-field + .sc-field::before { background: var(--rs-line); }
.rs-ribbon .sc-label { margin: 0; font-size: 12px; font-weight: 600; color: var(--rs-ink-2); margin-bottom: .5em; }
.rs-ribbon .sc-input { padding: 0; font-size: 14px; font-weight: 700; color: var(--rs-ink); }
.rs-ribbon .sc-input::placeholder { color: var(--wj-ink-3); font-weight: 500; }
.rs-ribbon .sc-icon { color: var(--rs-leaf-ink); }
.rs-ribbon .sc-badge { background: var(--rs-leaf-tint); color: var(--rs-leaf-ink); }
.rs-ribbon .sc-submit { margin: 5px; padding: 0 22px; border-radius: 10px; font-size: 14px; }
.rs-filter-btn { display: none; }

/* title, count and sort */
.rs-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; padding-top: 22px; }
.rs-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.rs-head h1 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 800; letter-spacing: -.015em; color: var(--rs-ink); }
.rs-head p { margin: 4px 0 0; color: var(--rs-ink-2); font-size: 14px; }
.rs-sort { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--rs-ink-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.rs-sort select {
    padding: 9px 34px 9px 12px; border: 1px solid var(--rs-line-strong); border-radius: 10px; background: var(--rs-card) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%231B2A1E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m1 1.5 5 5 5-5'/></svg>") no-repeat right 12px center;
    color: var(--rs-ink); font: inherit; font-weight: 700; appearance: none; -webkit-appearance: none; cursor: pointer;
}
.rs-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.rs-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border: 1px solid var(--rs-line-strong); border-radius: 999px; background: var(--wj-card); color: var(--rs-ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.rs-chip span[aria-hidden] { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--rs-line); font-size: 14px; line-height: 1; }
.rs-chip:hover span[aria-hidden] { background: var(--rs-ink); color: var(--wj-on-ink); }
.rs-link { padding: 4px 6px; border: 0; background: none; color: var(--rs-leaf-ink); font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rs-note { margin: 0 0 14px; padding: 9px 12px; border-radius: 10px; background: var(--wj-teal-tint); color: var(--wj-teal-ink); font-size: 12.5px; }
.rs-note[hidden] { display: none; }

/* filters: sticky next to the list; a bottom sheet on a phone */
.rs-filters {
    position: sticky; top: calc(var(--rs-ribbon-h) + 16px); display: flex; flex-direction: column; max-height: calc(100vh - var(--rs-ribbon-h) - 32px);
    border: 1px solid var(--rs-line); border-radius: 18px; background: var(--rs-card);
}
.rs-filters-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 20px 12px; border-bottom: 1px solid var(--rs-line); }
.rs-filters-head h2 { margin: 0; margin-right: auto; font-size: 17px; font-weight: 800; }
.rs-filters-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; }
.rs-facet { margin: 0; padding: 18px 20px; border: 0; border-bottom: 1px solid var(--rs-line); min-width: 0; }
.rs-facet:last-child { border-bottom: 0; }
.rs-facet legend { display: block; float: none; width: 100%; margin: 0 0 10px; padding: 0; font-size: 14px; line-height: 1.3; font-weight: 700; color: var(--rs-ink); }
.rs-facet legend + * { margin-top: 0; }
.rs-hint { margin: 10px 0 0; color: var(--rs-ink-2); font-size: 12px; }
.rs-note-panel { margin: 0 20px 12px; }
.rs-filters-foot { padding: 14px 20px 18px; border-top: 1px solid var(--rs-line); }
.rs-apply { width: 100%; padding: 12px 16px; border: 0; border-radius: 12px; background: var(--wj-orange, #F24C00); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: background .15s; }
.rs-apply:hover { background: var(--rs-orange-dark); }
.rs-sheet-close { display: none; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--rs-ink-2); cursor: pointer; }

.rs-slider { margin: 6px 12px 20px; }
.rs-slider.noUi-target { height: 4px; border: 0; border-radius: 4px; background: var(--rs-line); box-shadow: none; }
.rs-slider .noUi-connect { background: var(--wj-orange) !important; }
.rs-slider .noUi-handle { top: -10px; right: -12px; width: 24px; height: 24px; border: 3px solid var(--wj-orange); border-radius: 50%; background: var(--wj-card); box-shadow: 0 1px 4px rgba(37, 37, 37, .25); cursor: grab; }
.rs-slider .noUi-handle::before, .rs-slider .noUi-handle::after { display: none; }
.rs-price-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rs-price-inputs label { display: block; margin: 0; }
.rs-price-inputs label > span:first-child { display: block; margin-bottom: 4px; color: var(--rs-ink-2); font-size: 12px; font-weight: 600; }
.rs-money { display: flex; align-items: center; gap: 4px; padding: 0 8px; border: 1px solid var(--rs-line-strong); border-radius: 10px; background: var(--wj-card); }
.rs-money:focus-within { border-color: var(--rs-ink); box-shadow: 0 0 0 3px rgba(242, 76, 0, .2); }
.rs-money i { color: var(--rs-ink-2); font-size: 12px; font-style: normal; font-weight: 700; }
.rs-money input { width: 100%; min-width: 0; padding: 9px 0; border: 0; outline: 0; background: transparent; color: var(--rs-ink); font: inherit; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rs-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rs-choice { position: relative; margin: 0; }
.rs-choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.rs-choice span { display: flex; align-items: center; justify-content: center; gap: 4px; height: 40px; padding: 0 8px; border: 1px solid var(--rs-line-strong); border-radius: 10px; background: var(--wj-card); color: var(--rs-ink); font-size: 14px; font-weight: 700; transition: background .12s, color .12s, border-color .12s; }
.rs-choice span svg { width: 13px; height: 13px; fill: var(--rs-star); }
.rs-choice input:checked + span { border-color: var(--rs-ink); background: var(--rs-ink); color: var(--wj-on-ink); }
.rs-choice input:checked + span svg { fill: var(--wj-on-ink); }
.rs-choice input:focus-visible + span { outline: 3px solid var(--wj-focus); outline-offset: 2px; }

/* the ticket */
.rs-card {
    display: grid; grid-template-columns: 264px minmax(0, 1fr) 200px; margin: 0 0 14px; overflow: hidden;
    border: 1px solid var(--rs-line); border-radius: 18px; background: var(--rs-card); color: inherit; text-decoration: none; transition: border-color .15s;
}
.rs-card:hover { border-color: var(--rs-leaf); color: inherit; text-decoration: none; }
.rs-card-photo { position: relative; margin: 10px; min-height: 188px; overflow: hidden; border-radius: 12px; background: var(--wj-line-soft); }
.rs-card-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rs-tag { position: absolute; left: 10px; top: 10px; padding: 3px 10px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 700; }
.rs-tag-pick { background: var(--wj-teal-ink); }
.rs-tag-sold { background: var(--rs-ink); color: var(--wj-on-ink); }
.rs-card-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px 12px 16px 6px; }
.rs-card-name { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; color: var(--rs-ink); }
.rs-card-line { display: flex; align-items: center; gap: 10px; min-height: 22px; }
.rs-stars { display: inline-flex; gap: 2px; }
.rs-stars svg { width: 15px; height: 15px; fill: var(--rs-star); }
.rs-rating { padding: 1px 8px; border-radius: 8px; background: var(--wj-teal-tint); color: var(--wj-teal-ink); font-size: 13px; font-weight: 800; }
.rs-card-place { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--rs-ink-2); font-size: 14px; }
.rs-card-place svg { flex: 0 0 15px; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rs-facilities { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: auto 0 0; padding: 8px 0 0; list-style: none; }
.rs-facilities li { display: inline-flex; align-items: center; gap: 6px; color: var(--rs-ink-2); font-size: 13px; }
.rs-facilities img { width: 16px; height: 16px; object-fit: contain; }

.rs-stub {
    position: relative; display: grid; align-content: center; gap: 2px; padding: 18px 18px 18px 22px;
    border-left: 2px dashed var(--rs-line-strong); background: var(--rs-leaf-tint);
}
.rs-stub::before, .rs-stub::after { content: ""; position: absolute; left: -15px; width: 28px; height: 28px; border-radius: 50%; background: var(--rs-paper); box-shadow: inset 0 0 0 1px var(--rs-line); }
.rs-stub::before { top: -15px; }
.rs-stub::after { bottom: -15px; }
.rs-card:hover .rs-stub::before, .rs-card:hover .rs-stub::after { box-shadow: inset 0 0 0 1px var(--rs-leaf); }
.rs-stub-note { color: var(--rs-ink-2); font-size: 12.5px; }
.rs-price { color: var(--rs-ink); font-size: 21px; white-space: nowrap; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rs-price .text-secondary { color: var(--rs-ink-2) !important; font-size: 15px; font-weight: 600; letter-spacing: 0; }
.rs-stub-go { margin-top: 12px; color: var(--wj-orange-ink); font-size: 14px; font-weight: 800; }
.rs-stub-go::after { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 0 1px 8px; border: solid currentColor; border-width: 2px 2px 0 0; transform: rotate(45deg); transition: transform .15s; }
.rs-card:hover .rs-stub-go::after { transform: translateX(3px) rotate(45deg); }
.rs-card.is-sold .rs-card-photo img { filter: grayscale(1); opacity: .55; }
.rs-card.is-sold .rs-stub { background: var(--wj-fill); }
.rs-card.is-sold .rs-price { color: var(--rs-ink-2); }
.rs-card.is-sold .rs-stub-go { color: var(--rs-ink-2); }

.rs-more { margin: 18px 0 0; text-align: center; }
.rs-more a { color: var(--rs-leaf-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.rs-subhead { margin: 28px 0 12px; font-size: 18px; font-weight: 800; }
.rs-empty { display: grid; justify-items: center; gap: 4px; padding: 44px 20px 36px; text-align: center; border: 1px dashed var(--rs-line-strong); border-radius: 18px; background: var(--rs-card); }
.rs-empty h2 { margin: 12px 0 0; font-size: 20px; font-weight: 800; }
.rs-empty p { margin: 0; max-width: 36ch; color: var(--rs-ink-2); }
.rs-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.rs-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border: 1px solid var(--rs-line-strong); border-radius: 12px; background: var(--wj-card); color: var(--rs-ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.rs-btn:hover { color: var(--rs-ink); border-color: var(--rs-leaf-ink); }
.rs-btn-main { border-color: var(--wj-orange, #F24C00); background: var(--wj-orange, #F24C00); color: #fff; }
.rs-btn-main:hover { background: var(--rs-orange-dark); border-color: var(--rs-orange-dark); color: #fff; }

.rs-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 22px; }
.rs-page-link, .rs-pager .rs-page { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 14px; border: 1px solid var(--rs-line-strong); border-radius: 10px; background: var(--wj-card); color: var(--rs-ink); font-weight: 700; text-decoration: none; }
.rs-pager .rs-page:hover { border-color: var(--rs-leaf-ink); color: var(--rs-ink); }
.rs-pager .rs-page.is-current { border-color: var(--rs-ink); background: var(--rs-ink); color: var(--wj-on-ink); }
.rs-page-gap { color: var(--rs-ink-2); }

.rs-backdrop { position: fixed; inset: 0; z-index: 1900; background: rgba(37, 37, 37, .55); }
.rs-backdrop[hidden] { display: none; }

@media (max-width: 991.98px) {
    .rs-layout { grid-template-columns: 1fr; padding-top: 16px; }
    .rs-card { grid-template-columns: 220px minmax(0, 1fr) 180px; }
}

@media (max-width: 767.98px) {
    /* the whole card on a phone (home page): separate fields, no frame around them */
    .rs-ribbon .sc-form:not(.sc-compact) .sc-bar { border: 0; border-radius: 0; background: transparent; }
    .rs-ribbon .sc-form:not(.sc-compact) .sc-field { padding: 10px 14px; }
    .rs-ribbon-row { gap: 8px; padding-top: 8px; padding-bottom: 8px; }
    .rs-ribbon--full { position: static; }
    .rs-filter-btn {
        position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border: 1px solid var(--rs-line-strong); border-radius: 14px;
        background: var(--wj-card); color: var(--rs-ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
    }
    .rs-filter-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
    .rs-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--wj-orange, #F24C00); color: #fff; font-size: 12px; font-weight: 800; }
    .rs-head { align-items: flex-start; flex-direction: column; gap: 10px; }
    .rs-head h1 { font-size: 22px; }
    .rs-sort { width: 100%; }
    .rs-sort select { flex: 1 1 auto; }

    .rs-filters {
        position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 2000; max-height: 88vh; border: 0; border-radius: 20px 20px 0 0;
        visibility: hidden; transform: translateY(100%); transition: transform .25s ease, visibility 0s linear .25s;
    }
    .rs-filters.is-open { visibility: visible; transform: none; transition: transform .25s ease; }
    .rs-sheet-close { display: block; }
    .rs-filters-head { padding: 18px 20px 12px; }
    .rs-filters-foot { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }

    .rs-card { grid-template-columns: 1fr; }
    .rs-card-photo { margin: 0; min-height: 0; aspect-ratio: 16 / 10; border-radius: 0; }
    .rs-card-body { padding: 14px 16px 12px; }
    .rs-facilities { margin-top: 4px; }
    .rs-stub {
        grid-template-columns: 1fr auto; grid-template-areas: "note go" "price go" "per go"; align-items: center; padding: 14px 16px;
        border-left: 0; border-top: 2px dashed var(--rs-line-strong);
    }
    .rs-stub::before, .rs-stub::after { top: -15px; bottom: auto; }
    .rs-stub::before { left: -15px; }
    .rs-stub::after { left: auto; right: -15px; }
    .rs-stub > :nth-child(1) { grid-area: note; }
    .rs-stub > :nth-child(2) { grid-area: price; }
    .rs-stub > :nth-child(3) { grid-area: per; }
    .rs-stub > .rs-stub-go { grid-area: go; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .rs-filters, .rs-filters.is-open, .rs-ribbon, .rs-stub-go::after { transition: none; }
}

@media (max-width: 767.98px) {
    .rs-ribbon .sc-compact.sc-js .sc-summary { height: 48px; padding: 0 14px; border-color: var(--rs-line-strong); color: var(--rs-ink); font-family: inherit; font-size: 14px; }
    .rs-ribbon .sc-summary .sc-icon { color: var(--rs-leaf-ink); }
    .rs-ribbon .sc-summary-edit { color: var(--rs-orange); }
}

/* the layout forces Inter on every element with !important; the result pages (and the suggestion list that belongs to their search) use Plus Jakarta Sans */
.rs-page, .rs-page *, .rs-ribbon, .rs-ribbon *, .rs-backdrop, .ui-autocomplete.walanja-suggest-menu, .ui-autocomplete.walanja-suggest-menu *, .flatpickr-calendar, .flatpickr-calendar * {
    font-family: var(--wj-font) !important;
}
