/* ================================================================
   DEFINITIVNO REŠENJE ZA WRIF PLUGIN - FINALNA VERZIJA
   Ovo je poslednji put da menjamo ovu datoteku!
   ================================================================ */

/* OSNOVNA STRUKTURA - NEPROMENLJIVA */
.wrif-floorplan-wrapper {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    max-width: 100% !important;
    margin: 20px 0 !important;
    overflow: hidden !important;
    z-index: 1 !important;
}

.wrif-floorplan-container {
    display: grid !important;
    grid-template-columns: 60% 40% !important;
    gap: 0 !important;
    background: #fff !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1) !important;
    min-height: 400px !important;
    max-height: 600px !important;
    width: 100% !important;
    position: relative !important;
}

/* LEFT SIDE - SLIDER */
.wrif-slider-section {
    position: relative !important;
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

/* RIGHT SIDE - FLOORPLAN */
.wrif-floorplan-section {
    position: relative !important;
    background: #f8f9fa !important;
    display: flex !important;
    flex-direction: column !important;
    border-left: 1px solid #e9ecef !important;
    min-height: 400px !important;
    max-height: 600px !important;
    justify-content: space-between !important;
}

/* FLOOR CONTENT CONTAINER */
.wrif-floor-content {
    position: relative !important;
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 300px !important;
    max-height: 500px !important;
    overflow: hidden !important;
}

/* FLOOR PANELS */
.wrif-floor-panel {
    display: none !important;
    width: 100% !important;
    height: 100% !important;
    padding: 15px !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.wrif-floor-panel.active {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ================================================================
   VISION PRO KONTROLA - APSOLUTNA KONTROLA NAD VISION PRO CSS-OM
   ================================================================ */
.wrif-vision-wrapper {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    position: relative !important;
    contain: layout style size !important;
}

/* VISION PRO ELEMENTI - NIKAD NE SMEJU DA IZAĐU IZ OKVIRA */
.wrif-vision-wrapper .vision-map,
.wrif-vision-wrapper .vision-image,
.wrif-vision-wrapper .vision-stage,
.wrif-vision-wrapper .vision-layers,
.wrif-vision-wrapper .vision-layer,
.wrif-vision-wrapper img,
.wrif-vision-wrapper > *,
.wrif-vision-wrapper * {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    position: relative !important;
    overflow: hidden !important;
    contain: layout !important;
}

/* SPECIJALNA KONTROLA ZA VISION PRO GENERISANE ELEMENTE */
.wrif-vision-wrapper [class*="vision-map-"],
.wrif-vision-wrapper [class*="vision-layer"],
.wrif-vision-wrapper [data-layer-id] {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    position: relative !important;
    overflow: hidden !important;
    contain: layout style !important;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .wrif-floorplan-container {
        grid-template-columns: 1fr !important;
        max-height: none !important;
    }
    
    .wrif-floorplan-section {
        border-left: none !important;
        border-top: 1px solid #e9ecef !important;
        min-height: 350px !important;
        max-height: 400px !important;
    }
}

/* FORCE FLOORPLAN SECTIONS VISIBLE - NO EXCEPTIONS */
.wrif-floorplan-wrapper .wrif-floorplan-section,
.wrif-floorplan-wrapper .wrif-floorplan-section *,
div[id*="wrif_"] .wrif-floorplan-section {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 400px !important;
    position: relative !important;
}

.wrif-floorplan-wrapper .wrif-floor-content,
.wrif-floorplan-wrapper .wrif-floor-content *,
div[id*="wrif_"] .wrif-floor-content {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
}

.wrif-floorplan-wrapper .wrif-floor-panel.active,
.wrif-floorplan-wrapper .wrif-floor-panel,
div[id*="wrif_"] .wrif-floor-panel.active,
div[id*="wrif_"] .wrif-floor-panel {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
}

.wrif-floorplan-wrapper .wrif-vision-wrapper,
.wrif-floorplan-wrapper .wrif-vision-wrapper *,
div[id*="wrif_"] .wrif-vision-wrapper {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
}

/* NUCLEAR OPTION - Override ANY attempt to hide */
.wrif-floorplan-wrapper .wrif-floorplan-section[style*="display: none"],
.wrif-floorplan-wrapper .wrif-floor-content[style*="display: none"],
.wrif-floorplan-wrapper .wrif-floor-panel[style*="display: none"],
.wrif-floorplan-wrapper .wrif-vision-wrapper[style*="display: none"] {
    display: flex !important;
}

.wrif-floorplan-wrapper .wrif-floorplan-section[style*="visibility: hidden"],
.wrif-floorplan-wrapper .wrif-floor-content[style*="visibility: hidden"],
.wrif-floorplan-wrapper .wrif-floor-panel[style*="visibility: hidden"],
.wrif-floorplan-wrapper .wrif-vision-wrapper[style*="visibility: hidden"] {
    visibility: visible !important;
}

.wrif-floorplan-wrapper .wrif-floorplan-section[style*="opacity: 0"],
.wrif-floorplan-wrapper .wrif-floor-content[style*="opacity: 0"],
.wrif-floorplan-wrapper .wrif-floor-panel[style*="opacity: 0"],
.wrif-floorplan-wrapper .wrif-vision-wrapper[style*="opacity: 0"] {
    opacity: 1 !important;
}

/* GLOBAL NUCLEAR OVERRIDE - WORKS AT DOCUMENT LEVEL */
body div[id*="wrif_"],
body div[class*="wrif-floorplan-wrapper"],
body .wrif-floorplan-wrapper,
html div[id*="wrif_"],
html div[class*="wrif-floorplan-wrapper"],
html .wrif-floorplan-wrapper {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 999999 !important;
}

/* FORCE ALL FLOORPLAN RELATED ELEMENTS VISIBLE AT GLOBAL LEVEL */
body .wrif-floorplan-section,
body .wrif-floor-content,
body .wrif-floor-panel,
body .wrif-vision-wrapper,
html .wrif-floorplan-section,
html .wrif-floor-content,
html .wrif-floor-panel,
html .wrif-vision-wrapper {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 999998 !important;
}

/* OVERRIDE ANY POSSIBLE HIDING ATTEMPTS */
[style*="display: none"] .wrif-floorplan-section,
[style*="display: none"] .wrif-floor-content,
[style*="display: none"] .wrif-floor-panel,
[style*="display: none"] .wrif-vision-wrapper,
.hidden .wrif-floorplan-section,
.hidden .wrif-floor-content,
.hidden .wrif-floor-panel,
.hidden .wrif-vision-wrapper {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ================================================================
   FINALNA ZAŠTITA - SPREČAVA VISION PRO DA KVARI CELU STRANICU
   ================================================================ */

/* GLOBALNA ZAŠTITA PROTIV VISION PRO CSS-a KOJI KVARI LAYOUT */
.wrif-floorplan-wrapper,
.wrif-floorplan-wrapper * {
    box-sizing: border-box !important;
}

/* SPREČAVA VISION PRO DA RASTEGNE CELU STRANICU */
.wrif-floorplan-wrapper .vision-map,
.wrif-floorplan-wrapper [class*="vision-map-"],
.wrif-floorplan-wrapper .vision-layers,
.wrif-floorplan-wrapper [class*="vision-layer"],
.wrif-floorplan-wrapper [data-layer-id],
.wrif-floorplan-wrapper .vision-stage {
    position: relative !important;
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    contain: layout style size !important;
}

/* NEUTRALIŠE SVE VISION PRO TRANSFORMACIJE */
.wrif-vision-wrapper [style*="transform"],
.wrif-vision-wrapper [style*="position: absolute"],
.wrif-vision-wrapper [style*="width:"],
.wrif-vision-wrapper [style*="height:"] {
    transform: none !important;
    position: relative !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* POSLEDNJA LINIJA ODBRANE - APSOLUTNI OVERRIDE */
body .wrif-floorplan-wrapper,
html .wrif-floorplan-wrapper {
    max-width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
}

body .wrif-floorplan-wrapper .wrif-floorplan-container,
html .wrif-floorplan-wrapper .wrif-floorplan-container {
    display: grid !important;
    grid-template-columns: 60% 40% !important;
    max-width: 100% !important;
    max-height: 600px !important;
    overflow: hidden !important;
}

body .wrif-vision-wrapper,
html .wrif-vision-wrapper,
body .wrif-vision-wrapper *,
html .wrif-vision-wrapper * {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    overflow: hidden !important;
    contain: layout !important;
}

/* ================================================================
   FINALNA KLASA ZA PRISILNO PRIKAZIVANJE - JAVASCRIPT PODRŠKA
   ================================================================ */
.wrif-forced-visible,
.wrif-forced-visible.wrif-floorplan-section,
.wrif-forced-visible.wrif-floor-panel,
.wrif-forced-visible.wrif-floor-content,
.wrif-forced-visible.wrif-vision-wrapper {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
}

/* Ensure interactive elements are clickable */
.wrif-vision-wrapper [data-slide-to],
.wrif-vision-wrapper [class*="data-slide-to"] {
    cursor: pointer !important;
    pointer-events: auto !important;
}