/* ServerAdmin seat plan editor + seating configuration (PO-PB-B21 allowlist).
 * Canvas/split-panel/SVG layout — not replaceable with MudBlazor props alone.
 * Linked from ServerAdmin App.razor after seat-map-viewer.css.
 * Never use Blazor ::deep here — only valid in scoped .razor.css; use descendants instead.
 */

/* Admin form/table width utilities (PO-PB-B21-b3) */
.admin-theme-color-chip {
    min-width: 60px;
}

.admin-theme-color-chip-wide {
    min-width: 80px;
}

.timeslot-checkbox-column {
    max-width: 50px;
    width: 50px;
}

.slot-editor-capacity-field {
    min-width: 120px;
}

.heatmap-legend-swatch-low {
    background-color: #66bb6a;
}

.heatmap-legend-swatch-mid {
    background-color: #ffb74d;
}

.heatmap-legend-swatch-high {
    background-color: #ef5350;
}

/* Unified legend/category seat swatch */
.seating-legend-preview-row {
    display: flex;
    gap: 0.35rem;
}

.seat-admin-swatch,
.seating-legend-preview-seat,
.seat-category-seat-swatch,
.seat-category-legend-seat {
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 6px;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 600;
    height: 2rem;
    justify-content: center;
    min-width: 2rem;
}

.seat-editor-main {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.seat-plan-revision-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 0.5rem;
    max-width: 100%;
}

.seat-plan-inspector-field-row {
    flex-wrap: wrap;
}

.seat-plan-inspector-field-row > * {
    flex: 1 1 11rem;
    min-width: 11rem;
}

.seat-plan-inspector-field-row .mud-input-control {
    width: 100%;
}

.seat-plan-corner-distribution-row {
    align-items: center;
    flex-wrap: wrap;
}

.seat-plan-corner-distribution-row > * {
    flex: 1 1 10rem;
    min-width: 10rem;
}

.seat-plan-corner-row-label {
    flex: 0 0 5rem !important;
    min-width: 5rem !important;
}

.seat-plan-canvas-preset-select {
    min-width: 10rem;
}

.seat-editor-canvas-settings-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    width: 100%;
}

.seat-editor-canvas-settings-title {
    flex: 0 0 auto;
    margin-right: 0.25rem;
}

.seat-editor-canvas-size-field {
    max-width: 6.5rem;
}

.seat-editor-canvas-zoom-controls {
    flex: 0 0 auto;
    margin-left: auto;
}

.seat-editor-zoom-button {
    flex: 0 0 auto;
}

.seat-editor-toolbar-icon-group {
    align-items: center;
    flex-wrap: wrap;
}

.seat-editor-toolbar-icon-button {
    flex: 0 0 auto;
}

.seat-editor-sidebar-actions {
    justify-content: flex-end;
}

.seat-editor-summary-chips {
    align-items: center;
}

.seat-editor-summary-chips .mud-chip {
    margin: 0;
}

.seat-editor-seat-actions {
    align-items: center;
    flex-wrap: wrap;
}

.seat-editor-seat-actions-row {
    align-items: center;
}

.seat-editor-compact-panel {
    border-radius: 8px;
}

.seat-editor-root-toggles {
    align-items: center;
}

.seat-editor-empty-actions {
    align-items: center;
}

.seat-editor-image-card {
    border-radius: 8px;
}

.seat-editor-area-card {
    border-radius: 8px;
}

.seat-editor-image-meta {
    min-width: 0;
}

.seat-editor-truncate {
    display: block;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.seat-editor-zoom-chip {
    font-weight: 600;
    min-width: 4.75rem;
}

.seat-editor-toolbar {
    flex-wrap: wrap;
}

.seat-plan-status-badges {
    flex-wrap: wrap;
}

.seat-plan-revision-summary-panel,
.seat-plan-action-panel {
    height: 100%;
}

.seat-plan-revision-meta-list {
    gap: 0.35rem;
}

.seat-plan-action-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.seat-plan-upload-dropzone {
    background: color-mix(in srgb, var(--mud-palette-primary) 5%, transparent);
    border: 2px dashed var(--mud-palette-primary);
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.seat-plan-upload-dropzone:hover {
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
    border-color: var(--mud-palette-primary-lighten);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--mud-palette-primary) 22%, transparent);
    transform: translateY(-1px);
}

.seat-plan-upload-dropzone-active {
    background: color-mix(in srgb, var(--mud-palette-primary) 14%, transparent) !important;
    border-color: var(--mud-palette-primary-lighten) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mud-palette-primary) 30%, transparent) !important;
    transform: translateY(-1px);
}

.seat-plan-upload-dropzone .mud-button {
    pointer-events: none;
}

.seat-plan-upload-dropzone-background,
.seat-plan-upload-dropzone-overlay {
    min-height: 7.5rem;
}

.seat-editor-canvas-settings {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
}

.seat-plan-test-preview-canvas {
    align-items: center;
    display: flex;
    height: clamp(20rem, 55vh, 42rem);
    justify-content: center;
    overflow: hidden;
    width: 100%;
}

.seat-plan-test-preview-canvas .seat-map-viewer {
    display: flex;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.seat-plan-test-preview-canvas .seat-map-svg {
    display: block;
    max-height: 100%;
    max-width: 100%;
}

.seat-editor-overview-grid {
    width: 100%;
}

/* MudGrid/MudItem are flex items with min-width:auto — canvas px width must scroll inside the cell, not wrap the inspector row. */
.seat-editor-overview-canvas-cell {
    min-width: 0;
}

.seat-editor-overview-inspector-cell {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.seat-editor-overview-canvas-shell {
    align-items: flex-start;
    background: var(--mud-palette-background-grey);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    display: flex;
    justify-content: flex-start;
    max-height: min(70vh, 52rem);
    min-height: 24rem;
    min-width: 0;
    overflow: auto;
    padding: 1rem;
    width: fit-content;
}

.seat-editor-overview-inspector {
    flex: 1 1 auto;
    max-height: min(70vh, 52rem);
    min-width: 0;
    overflow: auto;
    width: 100%;
}

.seat-editor-overview-canvas {
    display: flex;
    flex: 0 0 auto;
    height: var(--zoom-editor-canvas-height);
    min-height: var(--zoom-editor-canvas-height);
    min-width: var(--zoom-editor-canvas-width);
    width: var(--zoom-editor-canvas-width);
}

.seat-editor-overview-canvas .seat-map-viewer,
.seat-editor-overview-canvas .seat-map-canvas-shell,
.seat-editor-overview-canvas .seat-map-svg {
    height: 100%;
    width: 100%;
}

.seat-editor-overview-canvas .seat-map-svg {
    display: block;
    height: 100%;
}

.seat-plan-test-selection-summary {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.seat-plan-test-category-header {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.seat-plan-test-category-swatches {
    display: flex;
    gap: 0.35rem;
}

.seat-plan-test-legend-clickable {
    cursor: pointer;
}

.zoom-editor-dialog-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
}

.zoom-editor-workspace {
    flex: 1;
    display: flex;
    min-height: 0;
}

.zoom-editor-split-panel {
    display: flex;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.zoom-editor-split-panel .mud-splitpanel-first-panel,
.zoom-editor-split-panel .mud-splitpanel-second-panel {
    min-height: 0;
}

.zoom-editor-split-panel .mud-splitpanel-second-panel {
    display: flex;
    flex-direction: column;
}

.zoom-editor-split-panel .child-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.zoom-editor-canvas-shell {
    background: var(--mud-palette-background-grey);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    display: flex;
    height: 100%;
    justify-content: flex-start;
    min-height: 0;
    overflow: auto;
    padding: 1rem;
    align-items: flex-start;
    width: 100%;
}

.zoom-editor-canvas {
    display: flex;
    flex: 0 0 auto;
    height: var(--zoom-editor-canvas-height);
    min-height: var(--zoom-editor-canvas-height);
    min-width: var(--zoom-editor-canvas-width);
    width: var(--zoom-editor-canvas-width);
}

.zoom-editor-canvas .seat-map-viewer {
    height: 100%;
    width: 100%;
}

.zoom-editor-canvas .seat-map-canvas-shell {
    height: 100%;
    width: 100%;
}

.zoom-editor-canvas .seat-map-svg {
    display: block;
    height: 100%;
    width: 100%;
}

.seat-editor-sidebar {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    height: 100%;
    max-height: 100%;
    max-width: 100%;
    min-height: 0;
    min-width: 0;
    overflow: auto;
    width: 100%;
}

.seat-editor-sidebar-paper {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: auto;
}

.seat-editor-main {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

@media (max-width: 960px) {
    .seat-editor-canvas-zoom-controls {
        margin-left: 0;
    }
}

.seat-category-seat-swatch-row {
    display: flex;
    gap: 0.35rem;
}

.seat-category-preset-preview {
    align-items: center;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
}

.seat-category-preset-details {
    align-items: center;
    display: flex;
    flex: 1;
    gap: 0.75rem;
    min-width: 0;
}

.seat-category-preset-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.seat-category-preset-name {
    font-weight: 600;
}

.seat-category-preset-key {
    color: var(--mud-palette-text-secondary);
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .seat-plan-test-preview-canvas {
        height: min(70vh, 32rem);
    }

    .seat-editor-overview-inspector {
        max-height: none;
    }

    .zoom-editor-workspace {
        min-height: auto;
    }

    .zoom-editor-split-panel {
        min-height: 60rem;
    }
}

.seat-plan-row-name {
    gap: 0.75rem;
}

.seat-plan-row-open-indicator {
    opacity: 0.28;
    transform: translateX(-0.15rem);
    transition: opacity 120ms ease, transform 120ms ease;
}
 .seat-plan-overview-table .mud-table-clickable-row:hover .seat-plan-row-open-indicator, .seat-plan-overview-table .mud-table-clickable-row:focus-within .seat-plan-row-open-indicator {
    opacity: 0.9;
    transform: translateX(0);
}
.shared-layout-preview-canvas {
    align-items: center;
    display: flex;
    height: clamp(20rem, 55vh, 42rem);
    justify-content: center;
    overflow: hidden;
    width: 100%;
}

.shared-layout-preview-canvas .seat-map-viewer {
    display: flex;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.shared-layout-preview-canvas .seat-map-svg {
    display: block;
    max-height: 100%;
    max-width: 100%;
}

.shared-layout-preview-modal-canvas {
    align-items: center;
    display: flex;
    height: calc(100vh - 8rem);
    justify-content: center;
    min-height: 20rem;
    overflow: auto;
    width: 100%;
}

.shared-layout-preview-modal-canvas .seat-map-viewer {
    display: flex;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.shared-layout-preview-modal-canvas .seat-map-svg {
    display: block;
    max-height: 100%;
    max-width: 100%;
}

.seat-preview-header {
    flex-wrap: wrap;
    gap: 0.75rem;
}

.seat-preview-header-actions {
    flex-wrap: wrap;
}

.test-reservation-canvas {
    align-items: center;
    display: flex;
    height: clamp(20rem, 55vh, 42rem);
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.test-reservation-canvas .seat-map-viewer {
    display: flex;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.test-reservation-canvas .seat-map-svg {
    display: block;
    max-height: 100%;
    max-width: 100%;
}

.test-reservation-overlay {
    align-items: center;
    background: rgba(255, 255, 255, 0.68);
    display: flex;
    inset: 0;
    justify-content: center;
    position: absolute;
    z-index: 2;
}

.test-reservation-summary {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.test-hold-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.test-hold-card {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.test-hold-copy {
    min-width: 0;
}

.test-hold-actions {
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .shared-layout-preview-canvas {
        height: min(70vh, 32rem);
    }

    .shared-layout-preview-modal-canvas {
        height: calc(100vh - 6.5rem);
    }

    .test-reservation-canvas {
        height: min(70vh, 32rem);
    }

    .test-hold-card {
        align-items: flex-start;
        flex-direction: column;
    }
}

.seat-category-legend-header {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.seat-category-legend-swatches {
    display: flex;
    gap: 0.35rem;
}

.seat-category-legend-seat {
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 6px;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 600;
    height: 2rem;
    justify-content: center;
    min-width: 2rem;
}