/* Multi-View Location Layout Styles */

.multi-view-grid {
    height: calc(100vh - 100px);
    overflow: hidden;
    padding: 16px;
}

.grid-cell {
    height: 100%;
    min-height: 400px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;
}

.grid-cell:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.grid-cell.cell-active {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 0 0 3px rgba(var(--mud-palette-primary-rgb), 0.2);
}

.cell-header {
    background-color: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-divider);
    padding: 4px 8px;
    min-height: 40px;
}

.empty-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100% - 40px);
    color: var(--mud-palette-text-secondary);
    background-color: var(--mud-palette-background-grey);
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.empty-cell:hover {
    background-color: var(--mud-palette-action-default-hover);
}

.empty-cell .mud-icon-root {
    font-size: 48px;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* Responsive adjustments */
@media (max-width: 960px) {
    .multi-view-grid {
        height: auto;
    }

    .grid-cell {
        min-height: 300px;
        margin-bottom: 16px;
    }
}

@media (max-width: 600px) {
    .grid-cell {
        min-height: 250px;
    }
}

/* Configuration drawer styles */
.multi-view-config-drawer .mud-expansion-panel {
    margin-bottom: 8px;
}

.multi-view-config-drawer .mud-select,
.multi-view-config-drawer .mud-input {
    margin-bottom: 16px;
}

/* Active cell indicator in appbar */
.active-cell-indicator {
    padding: 4px 12px;
    background-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    border-radius: 4px;
    font-weight: 500;
    margin-right: 16px;
}

/* Grid layout visualization in config drawer */
.grid-layout-preview {
    display: grid;
    gap: 4px;
    padding: 16px;
    background-color: var(--mud-palette-background);
    border-radius: 4px;
    margin: 16px 0;
}

.grid-layout-preview.layout-2x2 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 60px);
}

.grid-layout-preview.layout-2x3 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 40px);
}

.grid-layout-preview.layout-3x2 {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 60px);
}

.grid-layout-preview-cell {
    background-color: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.grid-layout-preview-cell.configured {
    background-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    border-color: var(--mud-palette-primary);
}

/* ---- Render-only multi-view page (shared free-move stage) ---- */

/* The single shared stage (id="mv-stage-container") that fills the viewport and owns every cell's box.
   It is the one InteractableHelper container, so each box's restrictEdges:'parent' bounds it here, and
   a box can be dragged/resized anywhere across the stage rather than being confined to a cell. */
.mv-shared-stage {
    position: relative;
    width: 100%;
    height: calc(100vh - 183px);
    box-sizing: border-box;
}

/* Loading spinner, positioned at the cell's default slot via inline style. */
.mv-cell-loading {
    pointer-events: none;
}

.mv-canvas-layer {
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
}

/* visibility (not display:none) keeps the hidden layer's dimensions nonzero so the JS
   zone-creation planes that reference both parent divs don't degenerate. */
.mv-canvas-layer.mv-hidden {
    visibility: hidden;
    pointer-events: none;
}

/* No additional CSS needed - the classes are reused from LocationView3D's visualizer.css */

/* Resize handles - auto-generated by interact.js */
