/* Location card: territory scheme + Yandex map, glassmorphism site style */

/* Compact layout: the map block must fit inside the fixed-height deck card */

.loc-card .adv-content {
    max-width: 560px;
    margin-block-start: 8px;
    padding-block: 1rem;
    max-height: calc(100% - 28px);
    overflow: hidden auto;
    scrollbar-width: thin;
}

@media (min-width: 768px) {
    .loc-card .adv-content {
        margin-block-start: 20px;
        max-height: calc(100% - 48px);
    }
}

/* background video: softly blurred and dimmed so the eye goes to the content;
   scaled up a touch so the blur doesn't fade the edges (the card clips it) */
.loc-card .adv-video {
    filter: blur(6px) saturate(0.9) brightness(0.85);
}

.loc-card.is-active .adv-video {
    transform: scale(1.06);
}

.loc-card .card-title {
    font-size: 34px;
    margin-block-end: 6px;
}

@media (max-width: 767px) {
    .loc-card .card-title {
        font-size: 26px;
    }
}

.loc-card .card-desc {
    font-size: 14px;
    line-height: 1.4;
}

.loc-card .card-list {
    margin-block-start: 10px;
    font-size: 0.82rem;
    gap: 0.3rem;
}

/* single-line address under the title */

.loc-card .loc-address {
    text-align: center;
}

.loc-card .loc-address li {
    padding-left: 0;
}

.loc-card .loc-address li::before {
    content: none;
}

.loc-tabs {
    display: inline-flex;
    gap: 6px;
    margin-block-start: 12px;
    padding: 4px;
    border-radius: 9999px;
    background: rgba(23, 37, 29, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.loc-tab {
    border: 0;
    border-radius: 9999px;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.78);
    background: transparent;
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease;
}

.loc-tab:hover {
    color: #ffffff;
}

.loc-tab.is-active {
    color: #17251d;
    background: linear-gradient(135deg, #f2d0a4, #e8c193);
    box-shadow: 0 4px 14px rgba(23, 37, 29, 0.35);
}

.loc-views {
    width: 100%;
    margin-block-start: 10px;
}

.loc-view {
    width: 100%;
}

.loc-view[hidden] {
    display: none;
}

/* --- territory scheme --- */

.loc-map-wrap {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 8px 22px rgba(23, 37, 29, 0.22);
    background: rgba(23, 37, 29, 0.25);
    padding: 6px;
}

/* fills the frame edge to edge (preserveAspectRatio="slice"); the tall
   scheme is cropped to its centre, the rest is reached by drag / zoom */
#loc-map-svg {
    display: block;
    width: 100%;
    height: 250px;
    background: #17251d;
    border-radius: 9px;
    touch-action: none;
    cursor: grab;
}

#loc-map-svg:active {
    cursor: grabbing;
}

.loc-compass {
    font: 600 18px var(--font-display);
    fill: #f2d0a4;
    paint-order: stroke;
    stroke: #17251d;
    stroke-width: 3px;
    pointer-events: none;
}

.loc-marker {
    cursor: pointer;
}

.loc-marker .loc-halo {
    fill: rgba(242, 208, 164, 0.92);
    stroke: #17251d;
    stroke-width: 3;
}

.loc-marker .loc-num {
    font: 700 17px system-ui, sans-serif;
    fill: #17251d;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
}

.loc-marker.is-active .loc-halo {
    fill: #ffffff;
    stroke: #17251d;
    stroke-width: 5;
}

.loc-marker:focus {
    outline: none;
}

.loc-marker:focus .loc-halo {
    stroke: #f2d0a4;
    stroke-width: 6;
}

/* invisible hit area around each marker (tooltip + click zone) */

.loc-marker .loc-hit {
    fill: transparent;
    cursor: pointer;
}

.loc-tooltip {
    position: absolute;
    display: none;
    pointer-events: none;
    z-index: 4;
    background: #17251d;
    color: #f2d0a4;
    padding: 6px 9px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transform: translate(-50%, -120%);
    white-space: nowrap;
}

.loc-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin-block-start: 8px;
}

.loc-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 9999px;
    padding: 3px 10px 3px 5px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.loc-item:hover,
.loc-item.is-selected {
    background: rgba(242, 208, 164, 0.28);
    border-color: rgba(242, 208, 164, 0.8);
}

.loc-item-n {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f2d0a4;
    color: #17251d;
    font-size: 0.65rem;
    font-weight: 700;
}

/* zoom controls: compact pills over the map bottom-right corner */

.loc-tools {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: flex;
    gap: 6px;
    z-index: 3;
}

.loc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(23, 37, 29, 0.62);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.25s ease, border-color 0.25s ease;
}

.loc-btn svg {
    width: 15px;
    height: 15px;
}

.loc-btn:hover {
    background: rgba(242, 208, 164, 0.85);
    border-color: rgba(242, 208, 164, 0.9);
    color: #17251d;
}

/* --- Yandex map --- */

.loc-ymap {
    width: 100%;
    height: 250px;
    margin-block-start: 8px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 8px 22px rgba(23, 37, 29, 0.22);
    background: rgba(23, 37, 29, 0.25);
    cursor: pointer;
}

.loc-hint {
    margin-block-start: 8px;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.72);
}

@media (min-width: 768px) {
    #loc-map-svg {
        height: 320px;
    }

    .loc-ymap {
        height: 320px;
    }
}
