/* Festival Map Styling */

.festival-map-section {
    --zone-hover-outline: rgba(196, 157, 246, 0.9);
    --zone-hover-shadow: rgba(196, 157, 246, 0.7);
    --zone-active-shadow: rgba(196, 157, 246, 0.85);
    --zone-active-shadow-soft: rgba(196, 157, 246, 0.45);
    --map-neutral-bg: #141414;
    margin: 0 auto 3rem;
    padding: 0 2rem;
    max-width: 1400px;
}

.festival-map-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.35rem;
    font-size: 2rem;
    font-weight: 800;
}

.festival-map-intro {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 52ch;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.9rem;
}

/* Layout */
.festival-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* SVG Map Container */
.svg-map-container {
    position: relative;
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
}

.festival-map {
    width: 100%;
    min-height: 360px;
    border-radius: 8px;
    background: var(--map-neutral-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.festival-map-svg {
    width: 100%;
    height: auto;
    display: block;
}

.festival-map-svg > rect:first-of-type {
    fill: var(--map-neutral-bg) !important;
}

.map-loading,
.map-error {
    margin: 0;
    padding: 1rem;
    color: var(--text-body);
    font-weight: 600;
    text-align: center;
}

.map-error { color: #f87171; }

/* Zone Interactions */
.zone {
    cursor: pointer;
    transition: transform 0.24s ease, opacity 0.24s ease, filter 0.24s ease;
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(1);
    -webkit-tap-highlight-color: transparent;
}

.zone > * {
    transition: stroke 0.24s ease, stroke-width 0.24s ease, opacity 0.24s ease;
}

.festival-map-svg.is-hovering .zone {
    opacity: 0.3;
    filter: saturate(0.4);
}

.festival-map-svg.is-hovering .zone.is-hovered {
    opacity: 1;
    filter: none;
}

.zone.is-hovered,
.zone:focus-visible {
    opacity: 1;
    transform: scale(1.06);
    filter: drop-shadow(0 0 18px var(--zone-hover-shadow));
}

.zone.is-hovered > *,
.zone:focus-visible > * {
    stroke: var(--zone-hover-outline);
    stroke-width: 6px;
}

.zone:focus { outline: none !important; }
.zone:focus-visible { outline: none; }

.zone.active {
    opacity: 1;
    transform: scale(1.09);
    filter:
        drop-shadow(0 0 20px var(--zone-active-shadow))
        drop-shadow(0 0 36px var(--zone-active-shadow-soft));
}

.zone.active > * {
    stroke: #ffffff;
    stroke-width: 6px;
}

.festival-map-svg.is-hovering .zone.active {
    opacity: 1;
    filter:
        drop-shadow(0 0 20px var(--zone-active-shadow))
        drop-shadow(0 0 36px var(--zone-active-shadow-soft));
}

/* Dim non-selected zones when a selection is active */
.festival-map-svg.has-selection .zone:not(.active) {
    opacity: 0.3;
    filter: saturate(0.4);
}

.festival-map-svg.has-selection .zone.active {
    opacity: 1;
    filter:
        drop-shadow(0 0 20px var(--zone-active-shadow))
        drop-shadow(0 0 36px var(--zone-active-shadow-soft));
}

/* When also hovering while a selection is active, brighten the hovered zone */
.festival-map-svg.has-selection.is-hovering .zone.is-hovered:not(.active) {
    opacity: 0.7;
    filter: saturate(0.7);
}

/* Tooltip */
.map-tooltip {
    position: absolute;
    background: rgba(15, 15, 15, 0.97);
    color: var(--primary-color);
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.01em;
    pointer-events: none;
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 10;
    white-space: normal;
    max-width: 200px;
}

.map-tooltip .tooltip-title {
    display: block;
    color: var(--primary-color);
}

.map-tooltip .tooltip-hint {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--accent-color);
    text-transform: uppercase;
}

.map-tooltip.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Sidebar */
.zone-info-sidebar {
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 360px;
    display: flex;
    flex-direction: column;
}

/* Default state */
.zone-default-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.5rem 0;
    flex: 1;
}

.zone-default-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.zone-default-state h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.zone-default-state p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    text-align: center;
}

/* Legend */
.zone-legend {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-align: left;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.83rem;
    color: var(--text-body);
    font-weight: 500;
    padding: 0.2rem 0;
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: var(--accent-color);
    flex-shrink: 0;
}

/* Active zone detail panel */
.zone-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.zone-detail-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.zone-detail-icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.zone-details h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 0;
    font-weight: 700;
}

.zone-details p {
    color: var(--text-body);
    line-height: 1.65;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.zone-details .schedule {
    background: var(--accent-dim);
    padding: 0.9rem 1rem;
    border-radius: 6px;
    margin-top: auto;
    margin-bottom: 1rem;
    border-left: 2px solid var(--accent-color);
}

.zone-details .schedule ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.zone-details .schedule li {
    padding: 0.3rem 0;
    color: var(--text-body);
    font-size: 0.855rem;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.zone-details .schedule li::before {
    content: '✓';
    color: var(--accent-color);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.05em;
}

.zone-close-btn {
    display: inline-block;
    margin-top: auto;
    padding: 0.45rem 1rem;
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: 20px; /* pill shape intentional for close button */
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    align-self: flex-start;
    transition: border-color 0.2s ease, color 0.2s ease;
    font-family: inherit;
}

.zone-close-btn:hover {
    border-color: var(--accent-color);
    color: var(--primary-color);
}

/* Remove legacy box-shadows from info page map embeds in this context */
.info-page .map-container,
.info-page .map-wrapper {
    box-shadow: none;
}

/* Dark map filter */
.map-wrapper iframe {
    filter: invert(90%) hue-rotate(180deg);
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .festival-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .svg-map-container { order: 1; }

    .zone-info-sidebar {
        order: 2;
        min-height: auto;
    }

    .festival-map-section {
        padding: 0 1rem;
        margin: 0 0 2rem;
    }

    .festival-map-section h2 { font-size: 1.5rem; }

    .zone-legend {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem 1rem;
    }
}

@media (max-width: 480px) {
    .festival-map-section { padding: 0 0.5rem; }

    .festival-map { min-height: 260px; }

    .zone-legend { grid-template-columns: 1fr; }
}

/* Steunkaart */
.steunkaart-voordelen {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.steunkaart-voordelen li {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
}

.steunkaart-voordelen li::before {
    content: '';
    display: inline-block;
    width: 11px;
    height: 11px;
    background-image: url('../../images/assets/no_arrow_dark.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    opacity: 0.75;
    position: relative;
    top: 1px;
}

.steunkaart-images {
    display: flex;
    gap: 1.5rem;
    margin: 1.25rem 0;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.steunkaart-img {
    width: 280px;
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
    border: 1px solid var(--grey-color, #cccccc);
}

@media (max-width: 640px) {
    .steunkaart-img { width: 100%; }
}
