/* LAB explore: list (left) + map (right) — tokens from home-lab / finder. */

/* Same content frame as search / excursion (override kit-short narrow .home-main). */
.home-page.home-page--kit-short.home-page--lab-explore .home-main.kit-lab-explore {
    box-sizing: border-box;
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding: calc(var(--kit-sticky-h, 88px) + 14px) 0 48px;
    background: transparent;
}

.home-page--lab-explore .lab-idx-finder-wrap--exc {
    margin: 0 0 14px;
    padding: 0 24px;
    box-sizing: border-box;
    min-height: 0 !important;
    z-index: 60;
    position: relative;
    order: 0;
}

.home-page--lab-explore .lab-idx-finder-wrap--exc .lab-idx-finder {
    min-height: 76px;
    height: auto;
    padding: 10px 12px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(23, 59, 66, 0.07);
    border: 1px solid rgba(23, 59, 66, 0.06);
    background: #fff;
    gap: 0;
}

.home-page--lab-explore .lab-idx-finder-wrap--exc .lab-idx-finder__field {
    height: 56px;
    padding: 0 12px;
    gap: 10px;
    max-width: none;
    flex: 1 1 0;
}

.home-page--lab-explore .lab-idx-finder-wrap--exc .lab-idx-finder__field--dest {
    max-width: none;
    flex: 1.15 1 0;
}

.home-page--lab-explore .lab-idx-finder-wrap--exc .lab-idx-finder__field--dates,
.home-page--lab-explore .lab-idx-finder-wrap--exc .lab-idx-finder__field--act {
    max-width: none;
    flex: 0.9 1 0;
}

.home-page--lab-explore .lab-idx-finder-wrap--exc .lab-idx-finder__go {
    height: 48px;
    width: 160px;
    margin-left: 8px;
    border-radius: 12px;
    font-size: 0.95rem;
    padding: 0 16px;
    background: var(--lab-lime, #ddedad);
    color: var(--lab-ink, #173b42);
}

.home-page--lab-explore .lab-idx-finder-wrap--exc .lab-idx-finder__label {
    font-size: 0.7rem;
}

.home-page--lab-explore .lab-idx-finder-wrap--exc .lab-idx-finder__input {
    font-size: 0.92rem;
}

.home-page--lab-explore .lab-idx-date-pop.kit-lab-filters-pop,
.home-page--lab-explore .lab-idx-act-pop.kit-lab-filters-pop {
    left: 0;
    right: auto;
    top: calc(100% + 8px);
    bottom: auto;
    transform: none;
    z-index: 21050;
}

.home-page--lab-explore .lab-crumbs {
    padding: 8px 24px 0;
    box-sizing: border-box;
}

.lab-explore {
    --lab-explore-ink: var(--lab-ink, #12203a);
    --lab-explore-soft: var(--lab-soft, #5b6b82);
    --lab-explore-line: var(--lab-line, #d7dee8);
    --lab-explore-bg: #f6f8fb;
    /* Same side inset as finder / crumbs (24px inside max-width 1280). */
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 8px 24px 0;
}

.lab-explore__status {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: var(--lab-explore-soft);
}

.lab-explore__status.is-err {
    color: #9b2c2c;
}

.lab-explore__status[hidden] {
    display: none !important;
}

.lab-explore__split {
    display: grid;
    grid-template-columns: 400px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
        'head layers'
        'list map';
    column-gap: 8px;
    row-gap: 10px;
    align-items: start;
    width: 100%;
    min-height: calc(100vh - var(--kit-sticky-h, 88px) - 120px);
}

.lab-explore__head {
    grid-area: head;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    margin: 0;
    min-width: 0;
}

.lab-explore__map-toolbar {
    grid-area: layers;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-self: end;
    justify-content: space-between;
    gap: 8px 16px;
    width: 100%;
    min-width: 0;
    min-height: 1.6em;
    margin: 0;
    padding-bottom: 0.12em;
    box-sizing: border-box;
}

.lab-explore__map-layers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    min-width: 0;
    margin: 0;
}

.lab-explore__layer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--lab-explore-ink);
    cursor: pointer;
    user-select: none;
}

.lab-explore__layer input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #173b42;
    cursor: pointer;
}

.lab-explore__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--lab-explore-ink);
    line-height: 1.2;
}

.lab-explore__count {
    margin: 0;
    font-size: 0.92rem;
    color: var(--lab-explore-soft);
}

.lab-explore__tools {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    flex: none;
    gap: 8px;
}

.lab-explore__tools .kit-lab-offers-filter {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid rgba(18, 32, 58, 0.14);
    border-radius: 999px;
    background: #fff;
    color: var(--lab-explore-ink, #12203a);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.lab-explore__tools .kit-lab-offers-filter:hover {
    border-color: rgba(18, 32, 58, 0.28);
}

.lab-explore__tools .kit-lab-offers-filter.is-on {
    background: #e8f0c8;
    border-color: rgba(23, 59, 66, 0.2);
}

.lab-explore__tools .kit-lab-offers-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(18, 32, 58, 0.1);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.lab-explore__tools .kit-lab-offers-filter-count[hidden] {
    display: none !important;
}

.lab-explore__list-pane {
    grid-area: list;
    min-width: 0;
    width: 100%;
    max-height: calc(100vh - 220px);
    overflow: auto;
    padding-right: 0;
    scrollbar-gutter: auto;
}

.lab-explore__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.lab-explore__empty {
    margin: 16px 0 0;
    font-size: 0.95rem;
    color: var(--lab-explore-soft);
}

.lab-explore-card {
    position: relative;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--lab-explore-line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
    overflow: hidden;
}

.lab-explore-card:hover,
.lab-explore-card:focus-within {
    border-color: #9eb0c8;
    box-shadow: 0 2px 10px rgba(18, 32, 58, 0.06);
}

.lab-explore-card.is-active {
    border-color: #5a8a94;
    background: #f3f8f9;
    box-shadow:
        0 0 0 3px rgba(23, 59, 66, 0.1),
        0 4px 14px rgba(23, 59, 66, 0.06);
}

.lab-explore-card.is-active:hover,
.lab-explore-card.is-active:focus-within {
    border-color: #4a7882;
    box-shadow:
        0 0 0 3px rgba(23, 59, 66, 0.14),
        0 4px 14px rgba(23, 59, 66, 0.07);
}

.lab-explore-card__media {
    position: relative;
    display: block;
    margin: 0;
    width: 112px;
    max-width: 112px;
    min-width: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #e8edf3;
    aspect-ratio: 1 / 1;
    text-decoration: none;
    justify-self: start;
    align-self: start;
}

.lab-explore-card__fav.kit-lab-offer__fav {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: #e11d48;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(18, 32, 58, 0.12);
}

.lab-explore-card__fav.kit-lab-offer__fav.is-on .kit-lab-offer__heart path {
    fill: #e11d48;
    stroke: #e11d48;
}

.lab-explore-card__media img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-width: 0;
    object-fit: cover;
}

.lab-explore-card__media--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa8bc;
    font-size: 0.75rem;
}

.lab-explore-card__body {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-right: 40px;
}

.lab-explore-card__topline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.lab-explore-card__kind {
    display: inline-block;
    width: fit-content;
    margin: 0;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    color: #fff;
    background: #1a2b45;
}

.lab-explore-card__kind--excursion {
    color: #fff;
    background: #1a2b45;
}

.lab-explore-card__kind--course {
    color: #fff;
    background: #0f766e;
}

.lab-explore-card__kind--child {
    color: #042f2e;
    background: #5eead4;
}

.lab-explore-card__rate {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    color: #d4a017;
    line-height: 1;
}

.lab-explore-card__score {
    font-size: 0.78rem;
    font-weight: 750;
    color: var(--lab-explore-ink, #12203a);
    letter-spacing: -0.01em;
}

.lab-explore-card__rate .kit-card__stars {
    position: relative;
    display: inline-block;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    line-height: 1;
    height: 1em;
}

.lab-explore-card__rate .kit-card__stars-base,
.lab-explore-card__rate .kit-card__stars-fill {
    display: block;
    white-space: nowrap;
}

.lab-explore-card__rate .kit-card__stars-base {
    color: #d7dee8;
}

.lab-explore-card__rate .kit-card__stars-fill {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    color: #e2b007;
}

.lab-explore-card__reviews {
    font-size: 0.72rem;
    font-weight: 600;
    color: #5b6b82;
}

.lab-explore-card__title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 650;
    line-height: 1.25;
    color: var(--lab-explore-ink);
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.lab-explore-card__meta {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 600;
    color: #3d4f66;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lab-explore-card__facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin: 0;
    font-size: 0.78rem;
    font-weight: 550;
    color: #5b6b82;
}

.lab-explore-card__fact {
    display: inline-flex;
    align-items: center;
}

.lab-explore-card__fact-sep {
    color: #9aa8bc;
}

.lab-explore-card__org {
    margin: 0;
    font-size: 0.76rem;
    font-weight: 500;
    color: #6b7c8f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lab-explore-card__price {
    margin: auto 0 0;
    padding-top: 2px;
    font-size: 0.98rem;
    font-weight: 750;
    color: var(--lab-explore-ink);
}

.lab-explore__map-pane {
    grid-area: map;
    position: sticky;
    top: calc(var(--kit-sticky-h, 88px) + 8px);
    align-self: start;
    min-width: 0;
    width: 100%;
    height: calc(100vh - var(--kit-sticky-h, 88px) - 130px);
    min-height: 420px;
    margin: 0;
    border: 1px solid var(--lab-explore-line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--lab-explore-bg);
    display: flex;
    flex-direction: column;
}

.lab-explore__map-label {
    display: none;
    margin: 0;
    padding: 10px 12px 0;
    font-size: 0.85rem;
    font-weight: 650;
    color: var(--lab-explore-ink);
}

.lab-explore__map {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 280px;
}

.lab-explore__map-stage {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 280px;
}

.lab-explore__map-stage .lab-explore__map {
    position: absolute;
    inset: 0;
    min-height: 0;
}

.lab-explore__map-fallback {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: none;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 24px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--lab-explore-soft);
    background: var(--lab-explore-bg);
}

.lab-explore__map-fallback:not([hidden]) {
    display: flex;
}

/* Stack tip: counts + click hint (no offer list) */
.lab-explore-stack-tip {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 5;
    box-sizing: border-box;
    width: max-content;
    max-width: min(260px, calc(100% - 12px));
    max-height: none;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--lab-explore-line, #d7e0e6);
    background: #fff;
    box-shadow: 0 6px 16px rgba(23, 59, 66, 0.12);
    transform: translate(-50%, calc(-100% - 10px));
    font-family: inherit;
    overflow: visible;
    pointer-events: none;
}

.lab-explore-stack-tip[hidden] {
    display: none !important;
}

.lab-explore-stack-tip__counts {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--lab-explore-ink, #173b42);
}

.lab-explore-stack-tip__hint {
    margin: 3px 0 0;
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1.2;
    color: rgba(23, 59, 66, 0.55);
}

.lab-explore-map-point-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    margin: 0 0 8px;
    padding: 6px 8px 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--lab-explore-line, #d7e0e6);
    background: rgba(23, 59, 66, 0.04);
    color: var(--lab-explore-ink, #173b42);
}

.lab-explore-map-point-chip[hidden] {
    display: none !important;
}

.lab-explore-map-point-chip__label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.2;
}

.lab-explore-map-point-chip__clear {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: rgba(23, 59, 66, 0.65);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.lab-explore-map-point-chip__clear:hover {
    background: rgba(23, 59, 66, 0.08);
    color: var(--lab-explore-ink, #173b42);
}

.lab-explore-near-chip {
    background: rgba(15, 118, 110, 0.06);
    border-color: rgba(15, 118, 110, 0.22);
}

.lab-explore-card__dist {
    margin: 2px 0 0;
    color: var(--lab-explore-muted, #6b7c82);
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.25;
}

@media (max-width: 900px) {
    .home-page.home-page--kit-short.home-page--lab-explore .home-main.kit-lab-explore {
        padding-left: 16px;
        padding-right: 16px;
    }

    .lab-explore {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .lab-explore__split {
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        grid-template-areas: none;
        min-height: 0;
        gap: 12px;
    }

    .lab-explore__head,
    .lab-explore__map-toolbar,
    .lab-explore__list-pane,
    .lab-explore__map-pane {
        grid-area: auto;
    }

    .lab-explore__list-pane {
        max-height: none;
        overflow: visible;
        padding-right: 0;
        order: 2;
    }

    .lab-explore__map-toolbar {
        order: 1;
    }

    .lab-explore__head {
        order: 0;
    }

    .lab-explore__map-pane {
        position: relative;
        top: auto;
        width: 100%;
        height: min(56vh, 440px);
        min-height: 300px;
        border-radius: 12px;
        align-self: stretch;
        order: 3;
    }

    .lab-explore__map-label {
        display: block;
    }

    .home-page--lab-explore .lab-idx-finder-wrap--exc,
    .home-page--lab-explore .lab-crumbs {
        padding-left: 0;
        padding-right: 0;
    }
}
