/* ==========================================================
   EXPO SVG Karte Basis
========================================================== */

.expo-map-zoom {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: #ffffff;
}

.expo-map-viewport {
    position: relative;
    width: 100%;
    height: 78vh;
    min-height: 620px;
    max-height: 900px;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
    background: #ffffff;
}

.expo-map-viewport.is-dragging {
    cursor: grabbing;
}

.expo-map-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.expo-map-content svg,
.expo-map-content img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    user-select: none;
}

.expo-map-content svg {
    shape-rendering: geometricPrecision;
    text-rendering: geometricPrecision;
}

.expo-map-content svg [data-messeplan-id],
.expo-map-content svg [data-messeplan-id] * {
    cursor: pointer;
}


/* ==========================================================
   Plus / Minus Zoom Buttons
========================================================== */

.expo-map-controls {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.expo-map-controls button {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: var(--farbe-dunkelgrau);
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(30, 41, 59, 0.22);
}

.expo-map-controls button:hover {
    background: var(--farbe-gelb);
    color: var(--farbe-dunkelgrau);
}


/* ==========================================================
   Highlight Button
   Beispiel:
   <button data-expo-highlight-messeplan-id="FG_A032">Auf der Karte ansehen</button>
========================================================== */

.expo-map-highlight-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    padding: 12px 22px;
    border: 0;
    border-radius: 999px;
    background: var(--farbe-gelb);
    color: var(--farbe-dunkelgrau);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
}

.expo-map-highlight-button:hover {
    background: var(--farbe-rot);
    color: #ffffff;
}

/* ==========================================================
   Desktop Hover: Stand dezent hervorheben
   Keine Fill-/Opacity-Änderung, damit keine SVG-Überlagerungen entstehen
========================================================== */

@media (hover: hover) and (pointer: fine) {
    .expo-map-content svg [data-messeplan-id]:hover {
        filter: drop-shadow(0 0 8px rgba(235, 97, 3, 0.55));
    }

    .expo-map-content svg [data-messeplan-id]:hover rect,
    .expo-map-content svg [data-messeplan-id]:hover polygon,
    .expo-map-content svg [data-messeplan-id]:hover polyline,
    .expo-map-content svg [data-messeplan-id]:hover path,
    .expo-map-content svg [data-messeplan-id]:hover circle,
    .expo-map-content svg [data-messeplan-id]:hover ellipse,
    .expo-map-content svg rect[data-messeplan-id]:hover,
    .expo-map-content svg polygon[data-messeplan-id]:hover,
    .expo-map-content svg polyline[data-messeplan-id]:hover,
    .expo-map-content svg path[data-messeplan-id]:hover,
    .expo-map-content svg circle[data-messeplan-id]:hover,
    .expo-map-content svg ellipse[data-messeplan-id]:hover {
        stroke: #EB6103 !important;
        stroke-width: 2px !important;
        vector-effect: non-scaling-stroke;
    }
}


/* ==========================================================
   Messeplan: klickbare Standplatz-Flächen
   Diese Styles bleiben extern und werden NICHT ins SVG geschrieben.
========================================================== */

.expo-stand,
.expo-map-area,
[data-messeplan-id] {
    cursor: pointer;
}

.expo-map-content svg [data-messeplan-id] rect,
.expo-map-content svg [data-messeplan-id] polygon,
.expo-map-content svg [data-messeplan-id] polyline,
.expo-map-content svg [data-messeplan-id] path,
.expo-map-content svg [data-messeplan-id] circle,
.expo-map-content svg [data-messeplan-id] ellipse,
.expo-map-content svg rect[data-messeplan-id],
.expo-map-content svg polygon[data-messeplan-id],
.expo-map-content svg polyline[data-messeplan-id],
.expo-map-content svg path[data-messeplan-id],
.expo-map-content svg circle[data-messeplan-id],
.expo-map-content svg ellipse[data-messeplan-id] {
    transition: fill 0.25s ease, stroke 0.25s ease, stroke-width 0.25s ease, opacity 0.25s ease;
}

.expo-map-blink-active {
    filter: drop-shadow(0 0 24px rgba(235, 97, 3, 0.95));
}

.expo-map-content svg .expo-map-blink-active rect,
.expo-map-content svg .expo-map-blink-active polygon,
.expo-map-content svg .expo-map-blink-active polyline,
.expo-map-content svg .expo-map-blink-active path,
.expo-map-content svg .expo-map-blink-active circle,
.expo-map-content svg .expo-map-blink-active ellipse,
.expo-map-content svg rect.expo-map-blink-active,
.expo-map-content svg polygon.expo-map-blink-active,
.expo-map-content svg polyline.expo-map-blink-active,
.expo-map-content svg path.expo-map-blink-active,
.expo-map-content svg circle.expo-map-blink-active,
.expo-map-content svg ellipse.expo-map-blink-active {
    fill: #EB6103 !important;
    opacity: 1 !important;
    stroke: #000000 !important;
    stroke-width: 10px !important;
    vector-effect: non-scaling-stroke;
    animation: expoStandBlink 0.9s ease-in-out 0s 6;
}

@keyframes expoStandBlink {
    0%, 100% {
        fill: #EB6103;
        opacity: 1;
        stroke: #000000;
        stroke-width: 10px;
    }

    50% {
        fill: #ffffff;
        opacity: 1;
        stroke: #EB6103;
        stroke-width: 18px;
    }
}


/* ==========================================================
   Mobile
========================================================== */

@media (max-width: 767px) {
    .expo-map-viewport {
        height: 70vh;
        min-height: 520px;
        max-height: none;
    }

    .expo-map-controls {
        right: 12px;
    }

    .expo-map-controls button {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .expo-map-highlight-button {
        width: 100%;
        margin-bottom: 14px;
    }
}