/* Pandal Explorer — interactive map page (light theme) */
.pe-map-page {
    --pe-map-maroon: #b01532;
    --pe-map-gold: #c9a227;
    --pe-map-cream: #f7f4ef;
    --pe-map-ink: #24181d;
    --pe-map-soft: #ffffff;
    background: #f3f0ea;
    color: var(--pe-map-ink);
    padding-top: 4.5rem; /* clear fixed navbar */
}

.pe-map-page--light .pe-map-hero {
    background: #fff;
}

.pe-map-hero {
    border-bottom: 1px solid rgba(42, 31, 36, 0.08);
    background: #fff;
    padding-top: 0.25rem;
}

.pe-map-divicon {
    background: transparent;
    border: 0;
}

.pe-map-status {
    position: absolute;
    z-index: 600;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(42, 31, 36, 0.12);
    border-radius: 0.85rem;
    padding: 0.85rem 1.1rem;
    max-width: min(90%, 360px);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pe-map-ink);
    box-shadow: 0 12px 32px rgba(36, 24, 29, 0.12);
}

.pe-map-status.is-error {
    color: #8b1e3f;
    border-color: rgba(176, 21, 50, 0.25);
}

.pe-map-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--pe-map-maroon);
}

.pe-map-shell {
    display: grid;
    grid-template-columns: minmax(280px, 340px) 1fr;
    min-height: calc(100dvh - 170px);
    background: #f3f0ea;
}

.pe-map-sidebar {
    background: var(--pe-map-soft);
    border-right: 1px solid rgba(42, 31, 36, 0.08);
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 170px);
    overflow: hidden;
}

.pe-map-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid rgba(42, 31, 36, 0.08);
}

.pe-map-tab {
    border: 0;
    background: transparent;
    padding: 0.85rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b5a62;
}

.pe-map-tab.is-active {
    color: var(--pe-map-maroon);
    box-shadow: inset 0 -2px 0 var(--pe-map-maroon);
}

.pe-map-panel {
    display: none;
    padding: 1rem;
    overflow: auto;
    flex: 1;
}

.pe-map-panel.is-active {
    display: block;
}

.pe-map-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.pe-map-search {
    position: relative;
}

.pe-map-search i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8a7a82;
}

.pe-map-search .form-control {
    padding-left: 2.25rem;
}

.pe-map-chips,
.pe-map-quickbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.pe-map-chip {
    border: 1px solid rgba(42, 31, 36, 0.12);
    background: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pe-map-ink);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.pe-map-chip span,
.pe-map-chip em {
    font-style: normal;
    font-weight: 700;
    color: var(--pe-map-maroon);
}

.pe-map-chip.is-active {
    background: var(--pe-map-maroon);
    border-color: var(--pe-map-maroon);
    color: #fff;
}

.pe-map-chip.is-active span,
.pe-map-chip.is-active em {
    color: #ffd98a;
}

.pe-map-zones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

.pe-map-zone {
    border: 1px solid rgba(42, 31, 36, 0.1);
    background: var(--pe-map-cream);
    border-radius: 0.75rem;
    padding: 0.55rem 0.65rem;
    text-align: left;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.pe-map-zone em {
    font-style: normal;
    color: var(--pe-map-maroon);
}

.pe-map-zone.is-active {
    background: #fff;
    border-color: var(--pe-map-maroon);
    box-shadow: 0 0 0 1px var(--pe-map-maroon);
}

.pe-map-stage {
    position: relative;
    min-height: 520px;
    background: #eef1f4;
}

.pe-leaflet-map {
    width: 100%;
    height: 100%;
    min-height: calc(100dvh - 170px);
    background: #eef1f4;
}

.leaflet-container {
    font: inherit;
    background: #eef1f4;
}

.pe-map-quickbar {
    position: absolute;
    z-index: 500;
    top: 0.75rem;
    left: 0.75rem;
    right: 3.5rem;
    max-width: calc(100% - 4.5rem);
}

.pe-map-quickbar .pe-map-chip {
    box-shadow: 0 4px 14px rgba(42, 31, 36, 0.12);
    backdrop-filter: blur(6px);
}

.pe-map-sidebar-toggle {
    position: absolute;
    z-index: 500;
    left: 0.75rem;
    bottom: 1rem;
    border: 0;
    border-radius: 999px;
    background: var(--pe-map-maroon);
    color: #fff;
    padding: 0.65rem 1rem;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(139, 30, 63, 0.35);
}

.pe-map-route-list li {
    background: var(--pe-map-cream);
    border-radius: 0.65rem;
    padding: 0.55rem 0.7rem;
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: center;
}

.pe-map-route-list button {
    border: 0;
    background: transparent;
    color: #a33;
    font-size: 0.85rem;
}

.pe-map-divicon {
    background: transparent !important;
    border: 0 !important;
}
.pe-map-pin {
    position: relative;
    width: 36px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(0 3px 6px rgba(20, 8, 12, 0.35));
}
.pe-map-pin-face {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pe-map-maroon);
}
.pe-map-pin-svg {
    width: 22px;
    height: 22px;
    display: block;
}
.pe-map-pin-svg--idol {
    width: 24px;
    height: 24px;
    overflow: visible;
}
.pe-map-pin--pandal .pe-map-pin-face {
    background: linear-gradient(160deg, #b01532 0%, #6e0e20 100%);
}
.pe-map-pin-point {
    width: 12px;
    height: 12px;
    margin-top: -7px;
    background: inherit;
    background: var(--pe-map-maroon);
    transform: rotate(45deg);
    border-radius: 0 0 3px 0;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
}
.pe-map-pin--pandal .pe-map-pin-face,
.pe-map-pin--pandal .pe-map-pin-point { background: var(--pe-map-maroon); }
.pe-map-pin--food .pe-map-pin-face,
.pe-map-pin--food .pe-map-pin-point { background: #0f766e; }
.pe-map-pin--cafe .pe-map-pin-face,
.pe-map-pin--cafe .pe-map-pin-point { background: #b45309; }
.pe-map-pin--pandal.is-featured .pe-map-pin-face,
.pe-map-pin--pandal.is-featured .pe-map-pin-point { background: #c9a227; }
.pe-map-pin--pandal.is-award .pe-map-pin-face,
.pe-map-pin--pandal.is-award .pe-map-pin-point { background: #1f6b4a; }
.pe-map-pin--pandal.is-saved .pe-map-pin-face,
.pe-map-pin--pandal.is-saved .pe-map-pin-point { background: #2457c5; }

/* Legacy legend dots still used in sidebar */
.pe-map-marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--pe-map-maroon);
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    display: inline-block;
    vertical-align: middle;
}
.pe-map-marker.is-pandal { background: var(--pe-map-maroon); }
.pe-map-marker.is-food { background: #0f766e; border-radius: 4px; }
.pe-map-marker.is-cafe { background: #b45309; border-radius: 4px; }
.pe-map-marker.is-featured { background: #c9a227; }
.pe-map-marker.is-award { background: #1f6b4a; }
.pe-map-marker.is-saved { background: #2457c5; }
.pe-map-marker--legend {
    display: inline-block;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 0.35rem;
    box-shadow: none;
}
.pe-map-marker--legend span { display: none; }
.pe-map-legend-box {
    display: grid;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: #6b5a62;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(42, 31, 36, 0.08);
}
.pe-map-legend-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-right: 0.45rem;
}
.pe-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    display: inline-block;
}
.pe-dot-pandal { background: var(--pe-map-maroon); }
.pe-dot-food { background: #0f766e; }

.pe-map-popup-wrap .leaflet-popup-content-wrapper {
    border-radius: 0.85rem;
    box-shadow: 0 12px 28px rgba(20, 8, 12, 0.18);
}
.pe-map-popup-wrap .leaflet-popup-content {
    margin: 0.75rem 0.85rem;
}
.pe-map-popup {
    min-width: 220px;
    max-width: 280px;
}
.pe-map-popup-top {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin-bottom: 0.55rem;
}
.pe-map-popup-thumb {
    width: 64px;
    height: 64px;
    border-radius: 0.65rem;
    object-fit: cover;
    flex: 0 0 64px;
    background: #f3ebe3;
}
.pe-map-popup-thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #8b1530, #5c0f20);
}
.pe-map-popup-thumb--empty .pe-map-pin-svg {
    width: 34px;
    height: 34px;
}
.pe-map-popup-main {
    min-width: 0;
    flex: 1;
}
.pe-map-popup h3 {
    font-size: 0.98rem;
    margin: 0 0 0.3rem;
    line-height: 1.25;
}
.pe-map-popup-score {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.55rem;
    margin-bottom: 0.3rem;
}
.pe-map-popup-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.86rem;
    font-weight: 800;
    color: #9a6b00;
    background: #fff4d0;
    border-radius: 999px;
    padding: 0.12rem 0.5rem;
}
.pe-map-popup-stars--empty {
    color: #6b5a62;
    background: #f1ebe4;
    font-weight: 600;
}
.pe-map-popup-reviews {
    font-size: 0.78rem;
    color: #6b5a62;
    font-weight: 600;
}
.pe-map-popup .meta {
    font-size: 0.78rem;
    color: #6b5a62;
    margin-bottom: 0;
    line-height: 1.4;
}

.pe-map-popup .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.pe-map-popup .actions a,
.pe-map-popup .actions button {
    font-size: 0.75rem;
    border-radius: 999px;
    padding: 0.28rem 0.6rem;
    border: 1px solid rgba(42, 31, 36, 0.15);
    background: #fff;
    color: var(--pe-map-ink);
    text-decoration: none;
    cursor: pointer;
}

.pe-map-popup .actions a.primary,
.pe-map-popup .actions button.primary {
    background: var(--pe-map-maroon);
    border-color: var(--pe-map-maroon);
    color: #fff;
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background-color: rgba(139, 30, 63, 0.18) !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background-color: var(--pe-map-maroon) !important;
    color: #fff !important;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .pe-map-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .pe-map-sidebar {
        position: fixed;
        z-index: 1050;
        inset: auto 0 0 0;
        max-height: 70dvh;
        border-right: 0;
        border-top-left-radius: 1rem;
        border-top-right-radius: 1rem;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.18);
        transform: translateY(110%);
        transition: transform 0.25s ease;
    }

    .pe-map-sidebar.is-open {
        transform: translateY(0);
    }

    .pe-leaflet-map {
        min-height: calc(100dvh - 210px);
    }
}
