:root {
    --map-sidebar-maxw: 410px;
    --map-sidebar-gap: 10px;
}

.map-layout {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.map-sidebar {
    position: fixed;
    right: var(--map-sidebar-gap);
    bottom: 20px;
    z-index: 5;
    overflow: hidden;
    width: auto;
    max-height: calc(100% - 120px);
    max-width: var(--map-sidebar-maxw);
    /* margin-top: 110px; */
    display: flex;
    gap: 4px;
    flex-direction: column;


    transform: translateX(0);
    transition: transform .35s ease, box-shadow .2s ease;
    will-change: transform;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .15);
}

.map-sidebar.is-closed {
    /* панель з’їжджає за край */
    transform: translateX(calc(100% + 40px));
    box-shadow: none;
}

/* ====== HANDLE BUTTON (вушко) ====== */
.map-sidebar-handle {
    position: fixed;
    right: calc(var(--map-sidebar-maxw) + var(--map-sidebar-gap));
    /* 410 + 20 = 430 */
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    width: 40px;
    height: 56px;
    border-radius: 20px 0 0 20px;
    border: 1px solid #EEE;
    background: #fff;
    box-shadow: -10px 0px 15px rgb(0 0 0 / 11%);
    color: #000;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .35s ease;
    border-width: 1px 0px 1px 1px;
    border-style: solid;
    border-color: var(--Color-Scheme-1-Border-Border-Lightest, #EEEEEE);

    transition:
        right .35s ease,
        background .2s ease,
        border-color .2s ease,
        transform .35s ease;
}

/*.map-sidebar-handle:hover {
    border-color: #3E2E68;
}*/

.map-sidebar-handle:active {
    transform: translateY(-50%) scale(.98);
}

.handle-arrow {
    transition: transform .25s ease;
    transform: rotate(180deg);
}

/* коли сайдбар ЗАКРИТИЙ — вушко прилипає до краю */
.map-sidebar[aria-expanded="false"]~.map-sidebar-handle {
    right: 0;
}

/* розворот стрілки коли закрито */
.map-sidebar[aria-expanded="false"]~.map-sidebar-handle .handle-arrow {
    transform: rotate(0deg);
}

/* ====== OPEN BANNER ====== */
.map-open-banner {
    position: fixed;
    top: 100px;
    right: 10px;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #000;
    color: #fff;
    font: 600 16px/1.5 "Artegra Sans", system-ui, sans-serif;
    border: 0;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease;
}

.map-open-banner[hidden] {
    display: none;
}

.map-open-banner.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.map-open-banner.is-hiding {
    opacity: 0;
    transform: translateY(-12px);
}

/* ====== a11y: зменшення руху ====== */
@media (prefers-reduced-motion: reduce) {

    .map-sidebar,
    .map-sidebar-handle,
    .map-open-banner,
    .handle-arrow {
        transition: none !important;
    }
}

.map-choiser-sity {
    background: #fff;
    padding: 10px;
    border: 1px solid #EEEEEE;
    display: flex;
    gap: 10px;
    align-items: center;
}

.map-filter-and-search {
    background: #fff;
    padding: 10px;
    border: 1px solid #EEEEEE;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.map-result {
    background: #fff;
    border: 1px solid #EEEEEE;
    overflow: auto;
    min-height: 40vh;
}

.map__tab {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    padding: 12px 18px;
    background: #fff;
    color: #000;
    border: 1px solid #eee;
    border-radius: 0;
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
    font-family: "Artegra Sans";
    flex: 1;
    text-align: center;
    justify-content: center;
}

.map__tab:hover {
    border: 1px solid #3E2E68;
}

.map__tab.is-active:hover {
    border: 1px solid #eee;
}

.map__tab.is-active {
    color: #fff;
    background: #3E2E68;
}

.map__tab-ico {
    width: 18px;
    height: 18px;
    display: none;
}

.map__tab.is-active .map__tab-ico {
    display: block;
}


.map-filters {
    display: inline-flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.map-filters::-webkit-scrollbar {
    height: 2px;
}

.ones-filter {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 8px;
    cursor: pointer;
    background: rgb(000 00 00 / 5%);
}

.ones-filter svg {
    color: rgb(225 225 225);
}

.ones-filter span {
    font: 500 12px/1.5 "Artegra Sans", sans-serif;
    color: var(--c-text);
    white-space: nowrap;
    word-break: keep-all;
}

.ones-filter.is-active {
    background: rgb(000 00 00);
}

.ones-filter.is-active svg {
    color: #fff;
}

.ones-filter.is-active span {
    color: #fff;
}

/* Визначні місця */
.map-landmarks {
    background: rgb(219 53 20 / 5%);
}

.map-landmarks svg {
    color: rgb(219, 53, 20);
}

.map-landmarks.is-active {
    background: rgb(219, 53, 20);
}

/* Гастролокації */
.map-gastro {
    background: rgb(21 129 140 / 5%);
}

.map-gastro svg {
    color: rgb(21, 129, 140);
}

.map-gastro.is-active {
    background: rgb(21, 129, 140);
}

/* Житло */
.map-accommodation {
    background: rgb(162 132 94/ 5%);
}

.map-accommodation svg {
    color: rgb(162, 132, 94);
}

.map-accommodation.is-active {
    background: rgb(162, 132, 94);
}

/* Атракції */
.map-attractions {
    background: rgb(86 59 152/ 5%);
}


.map-attractions svg {
    color: rgb(86, 59, 152);
}

.map-attractions.is-active {
    background: rgb(86, 59, 152);
}

/* Маршрути */
.map-routes {
    background: rgb(242 94 48/ 5%);
}

.map-routes svg {
    color: rgb(242, 94, 48);
}

.map-routes.is-active {
    background: rgb(242, 94, 48);
}

/* Музеї */
.map-museum {
    background: rgb(198 24 91/ 5%);
}

.map-museum svg {
    color: rgb(198, 24, 91);
}

.map-museum.is-active {
    background: rgb(198, 24, 91);
}

/* Храми */
.map-temples {
    background: rgb(26 102 112/ 5%);
}

.map-temples svg {
    color: rgb(26, 102, 112);
}

.map-temples.is-active {
    background: rgb(26, 102, 112);
}

/* Транспорт */
.map-transport {
    background: rgb(69 69 69/ 5%);
}

.map-transport svg {
    color: rgb(69, 69, 69);
}

.map-transport.is-active {
    background: rgb(69, 69, 69);
}

/* Паркінг */
.map-parking {
    background: rgb(0 13 255/ 5%);
}

.map-parking svg {
    color: rgb(0, 13, 255);
}

.map-parking.is-active {
    background: rgb(0, 13, 255);
}

/* Безпека */
.map-safety {
    background: rgb(255 0 0/ 5%);
}

.map-safety svg {
    color: rgb(255, 0, 0);
}

.map-safety.is-active {
    background: rgb(255, 0, 0);
}

/* Прокат спорядження */
.map-equipment-rental {
    background: rgb(195 104 13/ 5%);
}

.map-equipment-rental svg {
    color: rgb(195, 104, 13);
}

.map-equipment-rental.is-active {
    background: rgb(195, 104, 13);
}

/* Події */
.map-events {
    background: rgb(62 46 104/ 5%);
}

.map-events svg {
    color: rgb(62, 46, 104);
}

.map-events.is-active {
    background: rgb(62, 46, 104);
}



.map-search_block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-search {
    position: relative;
    display: block;
    width: 100%;
}

.map-search__input {
    width: 100%;
    padding: 12px 60px 12px 16px;
    outline: none;
    background: #fff;
    font-size: 16px;
    font-weight: 500;
    font-family: "Artegra Sans";
    line-height: 1.5;
    color: #666666;
    border: 1px solid #EEEEEE;
    border-radius: 0;
}

.map-search__ico {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
}

.map-butt-filter {
    background: #fff;
    border: 1px solid #EEEEEE;
    padding: 12px;
    display: none;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.map-butt-filter.is-visible {
  display: flex;
}

.map-butt-filter span {
    font: 600 14px/1.5 "Artegra Sans", sans-serif;
    color: #3E2E68;
    display: flex;
    align-items: center;
}

.filter-caret {
    margin-left: 6px;
    transition: transform .22s ease;
    transform: rotate(180deg);
}

.map-butt-filter.is-open .filter-caret {
    transform: rotate(0deg);
}






.map-list {}

.list-item {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid #eee;
    transition: .2s ease;
}

.list-item:hover {
    background: #00000008;
}

.list-item img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 8px;
    flex: 1;
}

.list-item-title {
    display: flex;
    gap: 4px;
    flex-direction: column;
    align-items: flex-start;
}

.list-item-title b {
    font: 600 18px/1.2 "Artegra Sans", sans-serif;
    color: #3E2E68;
}

.list-item-titlespan {
    font: 500 14px/1.5 "Artegra Sans", sans-serif;
    color: var(--c-text);
}

.list-item-details {
    display: flex;
    gap: 12px;
    flex-direction: column;
    align-items: flex-start;
    flex: 3;
}

.list-item-heart-categories span {
    font: 500 12px/1.5 "Artegra Sans", sans-serif;
}

.list-item-heart-categories {
    display: flex;
    align-items: center;
    gap: 8px;
}

.list-item-heart-categories .heart-background {
    background: transparent;
    border: none;
    padding: 0;
    width: auto;
    justify-content: flex-start;
}












/* --- БАЗА --- */
.map-filters-all {
    /*position: relative;

    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
    color: #2e2461;*/
}

/* --- ПОПАП --- */
.filters-popover {
    position: absolute;
    inset-inline-end: 0;
    z-index: 2;
    max-inline-size: 100%;
    max-block-size: calc(100% - 16px);
    overflow: auto;
    overscroll-behavior: contain;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 0px;
    box-shadow: 0 10px 10px rgba(21, 9, 79, .15);
    padding: 24px;
    box-sizing: border-box;
    width: 100%;

    /* стан "закрито" */
    opacity: 0;
    transform: translateY(-8px) scale(.98);
    pointer-events: none;
    visibility: hidden;
    transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}

.filters-popover.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    visibility: visible;
    transition: opacity .22s ease, transform .22s ease;
}

/* Заголовок */
.filters-popover__header {
    font: 600 16px/1.5 "Artegra Sans", sans-serif;
    margin-bottom: 20px;
    color: #3E2E68;
}

/* Акордеон на details/summary — без JS */
.filters-accordion {
    border-bottom: 1px solid #eee;
    padding: 0 0 12px;
}

/*.filters-accordion:last-of-type {
    border-bottom: none;
}*/

.filters-accordion>summary {
    display: flex;
    align-items: center;
    gap: 8px;
    font: 600 14px/1.5 "Artegra Sans", sans-serif;
    list-style: none;
    cursor: pointer;
    padding: 12px 0 0;
    outline: none;
    color: #000;
}

.filters-accordion>summary::-webkit-details-marker {
    display: none;
}

.summary-arrow {
    margin-inline-start: auto;
    flex: 0 0 auto;
    color: #000;
    transition: transform .2s ease;
}

.filters-accordion[open] .summary-arrow {
    transform: rotate(180deg);
}

.accordion-body {
    overflow: hidden;
    height: 0;
}

.filters-accordion[open] .accordion-body {
    /* без фіксованих значень тут */
}

/* Чіпси / кнопки-мітки */
.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 0 0px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #ebe7f5;
    border-radius: 0px;
    cursor: pointer;
    user-select: none;
    font: 600 14px/1.5 "Artegra Sans", sans-serif;
    color: #3E2E68;
    transition: .2s ease;
}

.chip:hover {
    border-color: var(--c-accent);
    background: #fff4ee;

}

.chip input {
    display: none;
}

.chip:has(input:checked) {
    color: #fff;
    background: #3E2E68;
}

.chip:has(input:checked):hover {
    border: 1px solid #ebe7f5;
}

/* Рендж */
.range {
    padding-top: 12px;
}

.range input[type="range"] {
    width: 100%;
    color: var(--c-accent);
}

.range__hint {
    opacity: .7;
    margin-top: 6px;
    font: 500 12px/1.55 "Artegra Sans", sans-serif;
}

/* Футер */
.filters-popover::-webkit-scrollbar {
    width: 2px;
}

.filters-popover__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.refresh-link-btn {
    background: none;
    border: none;
    color: var(--c-text);
    text-decoration: underline;
    padding: 8px 0;
    cursor: pointer;
    font: 600 14px/1.5 "Artegra Sans", sans-serif;
    transition: .2s ease;
}

.refresh-link-btn:hover {
    color: var(--c-accent);
}

.map-filter-primary-btn {
    padding: 8px 16px;
    border-radius: 0px;
    border: none;
    background: var(--c-accent);
    color: #fff;
    cursor: pointer;
    font: 600 14px/1.5 "Artegra Sans", sans-serif;
    transition: .2s ease;
}

.map-filter-primary-btn:hover {
    background: #3E2E68;
    color: #fff;
}




/* Адаптив: всередині вузького батька попап стане на всю ширину */
/*@container mapfilters (inline-size < 420px) {
    .filters-popover {
        inset: auto 8px auto 8px;
    }
}*/

/* якщо немає CSS Container Queries — підстрахуємося */
/*@media (max-width: 420px) {
    .filters-popover {
        inset: auto 8px auto 8px;
    }
}*/
















/* ===== POPUP: Детальніше ===== */
.map-details {
    position: fixed;
    top: 175px;
    right: calc(9px + 410px + 8px);
    z-index: 6;
    width: min(340px, calc(100vw - 64px - 410px));
    max-height: calc(100% - 120px);
    display: grid;
    gap: 10px;
    grid-template-rows: auto 1fr;
    border: 1px solid #eee;
    background: #fff;
    box-shadow: 0px 10px 10px rgba(0, 0, 0, .15);
    border-radius: 0px;
    transform: translateX(16px);
    opacity: 0;
    pointer-events: none;
    transition: transform .35s ease, opacity .25s ease;
}

/* видимий стан */
.map-details.is-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

/* медіа (картинка) */
.map-details__media {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    height: 190px;
}

.map-details__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* кругла кнопка × вгорі зліва */
.map-details__close {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 8px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    border: none;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
    color: #000;
}

/* «вушко» для попапу */
.map-details-handle {
    position: absolute;
    left: 0px;
    top: 50%;
    transform: translate(-100%, -50%);
    width: 40px;
    height: 56px;
    border-radius: 20px 0 0 20px;
    background: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: -10px 0 15px rgba(0, 0, 0, .11);
    border-width: 1px 0px 1px 1px;
    border-style: solid;
    border-color: var(--Color-Scheme-1-Border-Border-Lightest, #EEEEEE);
}

.map-details-handle svg {
    transition: transform .25s ease;
    transform: rotate(0deg);
}

.map-details__body {
    padding: 12px;
}

.map-details__category {
    color: #000;
    margin-bottom: 12px;
    font: 500 12px/1.5 "Artegra Sans", system-ui, sans-serif;
}

.map-details__title {
    font: 600 18px/1.2 "Artegra Sans", system-ui, sans-serif;
    color: #3E2E68;
    margin: 0 0 4px;
}

.map-details__address {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--c-text);
    margin-bottom: 32px;
    font: 500 14px/1.5 "Artegra Sans", system-ui, sans-serif;
}

.map-details_all_buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.map-details__cta {
    display: block;
    width: 100%;
    padding: 8px 20px;
    border: 0;
    border-radius: 0px;
    background: var(--c-accent);
    color: #fff;
    font: 600 16px/1.5 "Artegra Sans", system-ui, sans-serif;
    text-align: center;
    flex: 1;
    text-decoration: none;
    cursor: pointer;
    transition: .2s ease;
}

.map-details__cta:hover {
    background: #3E2E68;
}

/* активний айтем у списку */
.map-list .list-item.is-active {
    background: #00000008;
}

/* коли сайдбар закрито, посунемо попап ближче до краю, щоб не «з’їхав» за екран */
.map-sidebar.is-closed~.map-details {
    right: calc(20px + 40px);
    /* 40px — ширина «вушка» сайдбара біля краю */
}

/* зменшення руху */
@media (prefers-reduced-motion: reduce) {
    .map-details {
        transition: none;
    }
}


















/* Базовий пін: 16×16 іконка + 8px паддінг = круг 32×32 */
.vv-pin {
    --pin-bg: #3e2e68;
    /* дефолт, перевизначимо класами категорій */
    --pin-fg: #fff;
    /*--pin-size: 32px;*/
    /* 16 + 8 + 8 */
    /* width: var(--pin-size);
    height: var(--pin-size);*/
    border-radius: 50%;
    background: var(--pin-bg);
    display: grid;
    place-items: center;
    padding: 8px;
    border: none;
    box-sizing: border-box;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}

.vv-pin img,
.vv-pin svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: var(--pin-fg);
}

/* hover/active/focus */
.vv-pin:hover {
    transform: scale(1.03);
}

.vv-pin.is-active {
    box-shadow: 0 0 0 4px #fff;
}

.vv-pin:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px #fff;
}

.vv-cluster {
    --bg: #fff;
    --fg: #3E2E68;
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--bg);
    color: var(--fg);
    font: 600 14px/1.0 Inter, system-ui, -apple-system, Arial, sans-serif;
    border: 4px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}

.map-empty {
    height: 50vh;
    font: 500 16px/1.5 "Artegra Sans", system-ui, sans-serif;
    text-align: center;
    padding: 20px;
}







.map-sidebar__toggle {
    position: sticky;
    top: 0;
    right: 0;
    margin-left: auto;
    display: block
}

.map-sidebar:not(.is-open) {
    width: 0;
    min-width: 0;
    border: 0;
    overflow: hidden
}

.map-canvas {
    height: 100%;
    width: 100%;
}





.map-open-banner_mobile,
.map-close-banner_mobile {
	display: none;
}





@media (max-width: 900px) {
	.map-sidebar.is-closed~.map-details {
	    right: 10px;
	}
	.map-sidebar.is-closed~.map-details {
	    right: 10px;
	    top: 160px;
	}
	.map-details__media {
	    position: relative;
	    aspect-ratio: 16/9;
	    overflow: hidden;
	    height: 190px;
	    width: 100%;
	}
	.map-details {
	    width: min(340px, calc(100vw - 64px));
	}

}
@media (max-width: 500px) {
	/* ховаємо обидва хендли-вушка */
	#mapSidebarHandle,
	#mapDetailsHandle {
		display: none !important;
	}
	/* карта деталей — зручніша ширина й відступи на мобайлі */
	.map-details {
	    width: calc(100vw - 20px);
	    max-height: calc(100vh - 140px);
	}
	.map-sidebar {
	    max-width: calc(100vw - 20px);
	}
	button#mapOpenBanner {
	    display: none;
	}
	.map-sidebar.is-closed~.map-details {
	    right: 10px;
	    top: 86px;
	}

	.map-close-banner_mobile{
	    position: fixed;
	    bottom: 20px;
	    right: 10px;
	    z-index: 6;
	    display: inline-flex;
	    align-items: center;
	    gap: 10px;
	    padding: 8px 16px;
	    background: #000;
	    color: #fff;
	    font: 600 16px/1.5 "Artegra Sans", system-ui, sans-serif;
	    border: 0;
	    cursor: pointer;
	    opacity: 0;
	    transform: translateY(12px);
	    transition: opacity .25s ease, transform .25s ease;
	}
	.map-close-banner_mobile[hidden] {
	    display: none;
	}


	.map-open-banner_mobile {
	    position: fixed;
	    bottom: 20px;
	    right: 10px;
	    z-index: 6;
	    display: inline-flex;
	    align-items: center;
	    gap: 10px;
	    padding: 8px 16px;
	    background: #000;
	    color: #fff;
	    font: 600 16px/1.5 "Artegra Sans", system-ui, sans-serif;
	    border: 0;
	    cursor: pointer;
	    opacity: 0;
	    transform: translateY(12px);
	    transition: opacity .25s ease, transform .25s ease;
	}
	.map-open-banner_mobile[hidden] {
	    display: none;
	}



}








