/**
 * Elementor Slides — per-slide pannable floor plan.
 * Paired with assets/js/modules/elementor-slides-floorplan.js and
 * mu-plugins/site-core/elementor/widgets/slides-floorplan.php.
 *
 * Layout: full-bleed inside .swiper-slide-bg (same pattern as the video
 * module), sitting behind the slide heading/description/button. The track
 * is translated horizontally on drag; the image keeps its natural width
 * and scales only in height to fit.
 */

.swiper-slide-bg.has-miv-floorplan {
    /* Disable Ken Burns / slide-bg transforms while a floor plan is present. */
    animation: none !important;
    transform: none !important;
    /* Contain the floor plan's stacking context inside the bg layer so the
       slide-inner (heading/description/button) stays on top. */
    isolation: isolate;
}

.miv-floorplan {
    position: absolute;
    inset: 0;
    overflow: hidden;
    /* Allow vertical page scroll while swiping over the plan; JS handles X. */
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    opacity: 0;
    transition: opacity 300ms ease;
    outline: none;
    z-index: 0;
}

.miv-floorplan.is-ready {
    opacity: 1;
}

.miv-floorplan.is-pannable {
    cursor: grab;
}

.miv-floorplan.is-dragging {
    cursor: grabbing;
}

.miv-floorplan:focus-visible {
    box-shadow: inset 0 0 0 2px currentColor;
}

.miv-floorplan__track {
    position: absolute;
    inset: 0;
    width: max-content;
    will-change: transform;
}

.miv-floorplan__img {
    display: block;
    height: 100%;
    width: auto;
    max-width: none; /* beat any global `img { max-width: 100% }` rule */
    pointer-events: none;
    -webkit-user-drag: none;
    user-drag: none;
}

/* Initial drag affordance. Static styling only — movement is driven by a
   GSAP timeline in elementor-slides-floorplan.js. JS removes the node on
   first interaction AND sets a session flag so the hint doesn't replay on
   subsequent widget instances in the same session. */
.miv-floorplan__hint {
    position: absolute;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    pointer-events: none;
    opacity: 0;
}

.miv-floorplan__hint::before,
.miv-floorplan__hint::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 0.6rem;
    height: 0.6rem;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    transform: translateY(-50%) rotate(-45deg);
}

.miv-floorplan__hint::before { left: 0.75rem; }
.miv-floorplan__hint::after  { right: 0.75rem; transform: translateY(-50%) rotate(135deg); }

@media (prefers-reduced-motion: reduce) {
    .miv-floorplan { transition: none; }
}

@media (max-width: 767px) {
    .miv-floorplan__track {
        display: flex;
        align-items: center;
    }

    .miv-floorplan__img {
        height: auto;
        max-height: 70vh;
        width: auto;
        max-width: 100%;
    }
}
