/* =========================================
   VR IMMO - Karte: Vergroessern + Popup-Button
========================================= */

/* ----- Vergroessern-Button (Design = Zoom-Buttons) ----- */
.immo-map .vr-immo-fs {
    position: absolute;
    top: 12px;
    right: 12px;
    left: auto;
    bottom: auto;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    z-index: 30;
    pointer-events: auto;
}

.immo-map .vr-immo-fs button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 34px !important;
    height: 34px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    background: rgba(255, 255, 255, 0.96) !important;
    color: #0d458c !important;
    border: none !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    transition: background .15s ease, transform .15s ease;
}

.immo-map .vr-immo-fs button:hover {
    background: #ffffff !important;
    transform: translateY(-1px);
}

.immo-map .vr-immo-fs button:focus-visible {
    outline: 2px solid #ff7a1a;
    outline-offset: 2px;
}

.immo-map .vr-immo-fs svg {
    width: 17px;
    height: 17px;
    display: block;
    fill: none;
    stroke: #0d458c;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.immo-map .vr-immo-fs .vr-immo-fs__icon--compress { display: none; }

.immo-map.vr-immo-expanded .vr-immo-fs .vr-immo-fs__icon--expand { display: none; }
.immo-map.vr-immo-expanded .vr-immo-fs .vr-immo-fs__icon--compress { display: block; }

/* ----- Vergroesserte Ansicht ----- */
.vr-immo-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(13, 69, 140, .45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 99990;
    opacity: 0;
    animation: vrImmoFadeIn .2s ease forwards;
}

@keyframes vrImmoFadeIn {
    to { opacity: 1; }
}

.immo-map.vr-immo-expanded {
    position: fixed !important;
    top: 5vh !important;
    right: 2vw !important;
    bottom: 5vh !important;
    left: 2vw !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35) !important;
    z-index: 99991 !important;
    display: block !important;
    transform: none !important;
}

.immo-map.vr-immo-expanded > .elementor-widget-container,
.immo-map.vr-immo-expanded .elementor-widget-container,
.immo-map.vr-immo-expanded .inx-property-map,
.immo-map.vr-immo-expanded .inx-property-map-container,
.immo-map.vr-immo-expanded .inx-property-map__map {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.vr-immo-fs-open {
    overflow: hidden !important;
}

@media (max-width: 767px) {
    .immo-map.vr-immo-expanded {
        top: 2vh !important;
        bottom: 2vh !important;
        right: 2vw !important;
        left: 2vw !important;
        border-radius: 16px !important;
    }
}

/* ----- Popup: klickbare Karte + Detail-Button ----- */

/* Das Plugin begrenzt das Popup auf max-height:14em mit overflow:auto.
   Dadurch muss man im Popup scrollen. Stattdessen: Inhalt kompakt
   halten und nur bei echten Clustern (mehrere Objekte) scrollen. */
.immo-map .inx-property-map__property-wrap {
    max-height: none !important;
    overflow: visible !important;
}

/* Cluster mit mehreren Objekten duerfen scrollen, sonst wird es zu hoch. */
.immo-map .inx-property-map__property-wrap:has(.inx-property-map__property + .inx-property-map__property) {
    max-height: min(60vh, 460px) !important;
    overflow-y: auto !important;
}

.immo-map .inx-property-map__property {
    cursor: pointer;
    padding-bottom: 12px !important;
}

.immo-map .inx-property-map__property a {
    text-decoration: none !important;
}

.immo-map .vr-immo-popup-cta {
    display: block;
    margin: 10px 14px 2px 14px;
    padding: 9px 16px;
    background: #ff7a1a;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(255, 122, 26, .28);
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}

.immo-map .vr-immo-popup-cta:hover {
    background: #e96a0c;
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    .immo-map .vr-immo-fs button,
    .immo-map .vr-immo-popup-cta {
        transition: none;
    }
    .immo-map .vr-immo-fs button:hover,
    .immo-map .vr-immo-popup-cta:hover {
        transform: none;
    }
    .vr-immo-backdrop {
        animation: none;
        opacity: 1;
    }
}
