/* Purpose:
Styles the image-led location explorer and its compact discovery controls.

Responsibilities:
- Apply the layout, responsive behavior, and visual states required by explore.

Boundaries:
CSS controls presentation only; trust meaning, workflow state, privacy, and persistence remain in maintained source logic.

Key decisions and invariants:
explore rules stay scoped to their owning surface so visual changes do not leak into unrelated workflows.
*/
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.main-content-explore {
    width: min(980px, 100%);
}

.explore-page {
    max-width: 820px;
    display: grid;
    gap: 22px;
    margin: 0 auto;
}

.explore-header {
    display: grid;
    gap: 18px;
}

.explore-heading-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.explore-heading-row h1 {
    margin: 6px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 500;
    letter-spacing: -0.035em;
}

.explore-scope {
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid rgba(240, 213, 138, 0.25);
    border-radius: 999px;
    color: var(--rbo-gold);
    background: rgba(240, 213, 138, 0.08);
    font-size: 0.76rem;
    font-weight: 800;
}

.explore-search {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border: 1px solid var(--rbo-border);
    border-radius: 18px;
    background: var(--rbo-surface-elevated);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.explore-search:focus-within {
    border-color: var(--rbo-gold);
    box-shadow: 0 0 0 3px rgba(240, 213, 138, 0.18);
}

.explore-search-icon {
    flex: 0 0 auto;
    color: var(--rbo-gold);
    font-size: 1.8rem;
    line-height: 1;
    transform: rotate(-18deg);
}

.explore-search input {
    width: 100%;
    min-width: 0;
    min-height: 54px;
    padding: 0;
    border: 0;
    outline: 0;
    color: var(--rbo-ink);
    background: transparent;
    font: inherit;
    font-size: 1rem;
}

.explore-search input::-webkit-search-cancel-button {
    filter: invert(1);
}

.explore-filters {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 2px 1px 5px;
    scrollbar-width: none;
}

.explore-filters::-webkit-scrollbar {
    display: none;
}

.explore-filter {
    min-height: 46px;
    flex: 0 0 auto;
    padding: 10px 15px;
    border: 1px solid var(--rbo-border);
    border-radius: 13px;
    color: var(--rbo-muted);
    background: var(--rbo-paper);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 780;
    cursor: pointer;
}

.explore-filter:hover,
.explore-filter:focus-visible,
.explore-filter-selected {
    color: var(--rbo-ink);
    border-color: rgba(240, 213, 138, 0.48);
    background: rgba(240, 213, 138, 0.12);
}

.explore-results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--rbo-muted);
    font-size: 0.86rem;
}

.explore-results-heading strong {
    color: var(--rbo-ink);
    font-size: 1rem;
}

.explore-location-card {
    display: block;
    border: 1px solid var(--rbo-border);
    border-radius: 22px;
    color: var(--rbo-ink);
    background: linear-gradient(145deg, var(--rbo-surface-elevated), var(--rbo-paper));
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
    text-decoration: none;
    overflow: hidden;
    transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.explore-location-card:hover,
.explore-location-card:focus-visible {
    border-color: rgba(240, 213, 138, 0.56);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.38);
    transform: translateY(-2px);
}

.explore-location-image {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--rbo-surface);
    overflow: hidden;
}

.explore-location-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 7, 40, 0.04) 30%, rgba(5, 7, 40, 0.74) 100%);
    pointer-events: none;
}

.explore-location-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.explore-location-status,
.explore-open-indicator {
    position: absolute;
    z-index: 1;
    top: 16px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    background: rgba(5, 7, 40, 0.78);
    backdrop-filter: blur(10px);
}

.explore-location-status {
    left: 16px;
    padding: 8px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.explore-open-indicator {
    right: 16px;
    width: 46px;
    height: 46px;
    display: grid;
    place-content: center;
    border-radius: 50%;
    color: var(--rbo-gold);
    font-size: 1.45rem;
    font-weight: 700;
}

.explore-location-content {
    display: grid;
    gap: 14px;
    padding: 20px 22px 22px;
}

.explore-location-content h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 500;
    letter-spacing: -0.025em;
}

.explore-location-content > div:first-child p,
.explore-location-summary {
    color: var(--rbo-muted);
}

.explore-location-content > div:first-child p {
    margin: 4px 0 0;
    font-size: 0.9rem;
}

.explore-location-summary {
    margin: 0;
    line-height: 1.55;
}

.explore-location-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.explore-location-facts span {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
    border: 1px solid var(--rbo-border);
    border-radius: 999px;
    color: var(--rbo-muted);
    background: var(--rbo-surface);
    font-size: 0.76rem;
}

.explore-location-facts strong {
    color: var(--rbo-gold);
}

.explore-empty {
    min-height: 260px;
    display: grid;
    place-content: center;
    justify-items: start;
    gap: 12px;
    padding: 28px;
    border: 1px dashed var(--rbo-border);
    border-radius: 20px;
    background: var(--rbo-paper);
}

.explore-empty h2,
.explore-empty p {
    margin: 0;
}

.explore-empty p,
.explore-footnote {
    color: var(--rbo-muted);
}

.explore-footnote {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 720px) {
    .main-content-explore {
        padding-top: 18px !important;
        padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .explore-page {
        gap: 18px;
    }

    .explore-heading-row {
        align-items: center;
    }

    .explore-heading-row h1 {
        font-size: 2rem;
    }

    .explore-search {
        min-height: 56px;
        border-radius: 17px;
    }

    .explore-location-card {
        border-radius: 18px;
    }

    .explore-location-status {
        top: 12px;
        left: 12px;
        max-width: calc(100% - 78px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .explore-open-indicator {
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
    }

    .explore-location-content {
        padding: 17px 18px 19px;
    }

    .explore-location-summary {
        font-size: 0.9rem;
    }
}
