html.ml-modal-lock { overflow: hidden !important; overscroll-behavior: none; }
.p7-dialog.ml-floorplan[open] { position: fixed; inset: 0; margin: 0; width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none; display: flex; flex-direction: column; overflow: hidden; overscroll-behavior: none; background: #151515; }
.p7-dialog.ml-floorplan header { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #ffffff30; }
.p7-dialog.ml-floorplan header [data-caption] { flex: 1; font: 600 18px/1.3 'Titillium Web',sans-serif; }
.p7-dialog.ml-floorplan header button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #ffffff40; border-radius: 5px; font-size: 24px; padding: 0; }
.p7-dialog.ml-floorplan header button:hover { background: #ffffff20; }
.p7-dialog.ml-floorplan [hidden] { display: none !important; }
.p7-dialog.ml-floorplan .p7-viewer { flex: 1; min-height: 0; height: auto; width: 100%; }
.p7-dialog.ml-floorplan .p7-stage { position: relative; width: 100%; min-width: 0; height: 100%; padding: 16px; box-sizing: border-box; overflow: hidden; display: grid; place-items: center; touch-action: none; }
.p7-dialog.ml-floorplan .p7-stage img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center; user-select: none; pointer-events: none; }
.p7-dialog.ml-floorplan .p7-stage.is-zoomed { cursor: grab; }
.p7-dialog.ml-floorplan .p7-stage.is-dragging { cursor: grabbing; }
.p7-dialog.ml-floorplan .ml-plan-hint { flex: 0 0 auto; text-align: center; padding: 8px 12px max(12px,env(safe-area-inset-bottom)); color: #ccc; font: 14px/1.4 'Titillium Web',sans-serif; }
.p7-dialog.ml-floorplan .ml-plan-percent { flex: 0 0 auto; font-size: 14px; min-width: 42px; text-align: center; }
@media(max-width: 767px) { .p7-dialog.ml-floorplan header { gap: 5px; padding: 8px; } .p7-dialog.ml-floorplan header [data-caption] { font-size: 15px; } .p7-dialog.ml-floorplan header button { width: 34px; height: 38px; } .p7-dialog.ml-floorplan .p7-stage { padding: 8px; } }

/* =========================================
   FLOOR PLAN — FULL IMAGE FIT FIX
   ========================================= */

.p7-dialog.ml-floorplan[open] {
    position: fixed !important;
    inset: 0 !important;

    width: 100vw !important;
    height: 100dvh !important;

    max-width: none !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    flex-direction: column;

    overflow: hidden !important;
    box-sizing: border-box;
}

/* Keep toolbar visible */
.p7-dialog.ml-floorplan header {
    flex: 0 0 auto;
    box-sizing: border-box;
}

/* Use remaining screen space */
.p7-dialog.ml-floorplan .p7-viewer {
    position: relative;
    flex: 1 1 0 !important;

    width: 100% !important;
    height: 0 !important;

    min-height: 0 !important;
    min-width: 0 !important;

    overflow: hidden !important;
}

/* Image viewing area */
.p7-dialog.ml-floorplan .p7-stage {
    position: relative !important;

    display: flex !important;
    justify-content: center;
    align-items: center;

    width: 100% !important;
    height: 100% !important;

    min-width: 0 !important;
    min-height: 0 !important;

    padding: 16px !important;
    box-sizing: border-box;

    overflow: hidden !important;
}

/* Fit the entire floor plan */
.p7-dialog.ml-floorplan .p7-stage img {
    display: block !important;

    width: auto !important;
    height: auto !important;

    max-width: 100% !important;
    max-height: 100% !important;

    min-width: 0 !important;
    min-height: 0 !important;

    flex: 0 1 auto;

    object-fit: contain !important;
    object-position: center !important;

    transform-origin: center center;
}

/* Keep bottom instructions visible */
.p7-dialog.ml-floorplan .ml-plan-hint {
    flex: 0 0 auto;
}

/* Mobile */
@media (max-width: 767px) {
    .p7-dialog.ml-floorplan .p7-stage {
        padding: 8px !important;
    }
}
/* Floor plan dragging */

.p7-dialog.ml-floorplan .p7-stage {
    touch-action: none !important;
    user-select: none !important;
    overscroll-behavior: none !important;
}

.p7-dialog.ml-floorplan .p7-stage img {
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-drag: none;
    transform-origin: center center !important;
    transition: none !important;
    will-change: transform;
}

.p7-dialog.ml-floorplan .p7-stage.is-zoomed {
    cursor: grab !important;
}

.p7-dialog.ml-floorplan .p7-stage.is-dragging {
    cursor: grabbing !important;
}