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

/* Same 1280 rail as kit-topbar--idx-chrome / search (no extra 24px inset). */
.home-page.home-page--kit-short.home-page--lab-explore .home-main.kit-lab-explore {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: var(--lab-max, 1280px);
    margin-left: auto;
    margin-right: auto;
    padding: calc(var(--kit-sticky-h, 88px) + 14px) 0 48px;
    background: transparent;
    overflow-x: clip;
}

.home-page--lab-explore .lab-idx-finder-wrap--exc {
    margin: 0 0 18px;
    padding: 0;
    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 0 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;
    /* Flush with 1280 rail / logo (pad0 like PLAS/PROD V4). */
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 8px 0 0;
    overflow-x: clip;
}

.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: center;
    /* One tight band with map-toolbar (explore etalon gap above map). */
    align-self: center;
    gap: 6px 12px;
    margin: 0;
    min-width: 0;
    min-height: 40px;
}

.lab-explore__head-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    min-width: 0;
    flex: 1 1 auto;
}

.lab-explore__head-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    min-width: 0;
    max-width: 100%;
}

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

/* Place hub: eyebrow + title — keep layers optically on the title line. */
.lab-explore__head:has(.lab-explore__eyebrow),
.lab-explore__head:has(.lab-place__eyebrow) {
    align-self: end;
}

.lab-explore__split:has(.lab-explore__eyebrow) .lab-explore__map-toolbar,
.lab-explore__split:has(.lab-place__eyebrow) .lab-explore__map-toolbar {
    align-self: end;
    padding-bottom: 0.15em;
}

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

/* «К списку» sits above the map’s top-left (toolbar left), title stays clean. */
.lab-explore__map-layers .lab-explore__to-list {
    flex: none;
}

.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;
    min-width: 0;
    max-width: 100%;
}

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

.lab-explore__count:empty {
    display: none !important;
}

.lab-explore__tools {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    flex: none;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}

.lab-explore__tools .kit-lab-offers-active {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: min(520px, 100%);
}

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

.lab-explore__tools .kit-lab-offers-active .kit-lab-search-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
}

/* Same compact chip as list «На карте» (kit-lab-offers-on-map). */
.lab-explore__to-list {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 4px 11px;
    border: 1px solid rgba(18, 32, 58, 0.14);
    border-radius: 999px;
    background: #fff;
    color: var(--lab-explore-ink, #12203a);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    flex: none;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.lab-explore__to-list:hover {
    border-color: rgba(18, 32, 58, 0.28);
    background: #f7f8fa;
    box-shadow: 0 1px 2px rgba(18, 32, 58, 0.06);
}

.lab-explore__to-list svg {
    flex: none;
    width: 14px;
    height: 14px;
    opacity: 0.85;
}


.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--icon {
    position: relative;
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 12px;
    justify-content: center;
}

.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--icon .kit-lab-offers-filter-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 3px;
    background: var(--lab-explore-ink, #12203a);
    color: #fff;
    font-size: 0.62rem;
    box-sizing: border-box;
    pointer-events: none;
}

.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;
    min-height: 112px;
    height: 100%;
    align-self: stretch;
    border-radius: 8px;
    overflow: hidden;
    background: #e8edf3;
    text-decoration: none;
    justify-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%;
    min-height: 112px;
    height: 100%;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    padding-right: 40px;
    padding-bottom: 34px; /* room for absolute price on card */
    box-sizing: border-box;
}

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

.lab-explore-card__as-ico {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    box-sizing: border-box;
}

.lab-explore-card__as-ico img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

.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: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #f5b301;
    line-height: 1;
}

.lab-explore-card__score {
    font-size: 0.82rem;
    font-weight: 700;
    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.82rem;
    letter-spacing: 0.02em;
    line-height: 1;
    height: 1em;
    color: #f5b301;
}

.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: #d1d5db;
}

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

.lab-explore-card__reviews {
    font-size: 0.78rem;
    font-weight: 500;
    color: #6b7280;
}

.lab-explore-card__title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    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__place {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    min-width: 0;
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.25;
}

.lab-explore-card__place svg {
    flex: none;
}

.lab-explore-card__place > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lab-explore-card__facts {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    min-width: 0;
}

.lab-explore-card__fact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.25;
}

.lab-explore-card__fact svg {
    flex: none;
}

.lab-explore-card__fact > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lab-explore-card__price {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    margin: 0;
    padding: 0;
    color: var(--lab-explore-ink);
    pointer-events: none;
}

.lab-explore-card__from {
    color: #6b7280;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.1;
}

.lab-explore-card__price strong {
    color: var(--lab-explore-ink, #12203a);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.1;
}

.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;
}

/* Same side air as sticky chrome on narrow viewports (search etalon). */
@media (max-width: 1100px) {
    .home-page.home-page--kit-short.home-page--lab-explore .home-main.kit-lab-explore {
        max-width: none;
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 900px) {
    .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;
    }
}
