/* ── Diagram Designer — layout fisso in tema chiaro ───────────────────────── */
/* Il designer usa sempre colori chiari indipendentemente dal tema dell'app.   */

.designer-wrapper {
    display: flex;
    height: calc(100vh - 180px);
    overflow: hidden;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #ffffff;
}

.designer-panel-palette {
    flex-shrink: 0;
    overflow-y: auto;
    border-right: 1px solid #dee2e6;
}

.designer-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
    flex-shrink: 0;
}

.designer-toolbar-separator {
    width: 1px;
    height: 20px;
    background: #dee2e6;
    margin: 0 4px;
}

.designer-canvas-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.designer-canvas {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #ffffff;
}

.designer-panel-props {
    width: 320px;
    flex-shrink: 0;
    overflow-y: auto;
    border-left: 1px solid #dee2e6;
    background: #fafafa;
    color: #212529;
    padding: 12px;
    /* Forza i valori light-mode per tutti i componenti MudBlazor dentro il pannello */
    --mud-palette-text-primary: rgba(0,0,0,0.87);
    --mud-palette-text-secondary: rgba(0,0,0,0.60);
    --mud-palette-text-disabled: rgba(0,0,0,0.38);
    --mud-palette-action-default: rgba(0,0,0,0.54);
    --mud-palette-action-disabled: rgba(0,0,0,0.26);
    --mud-palette-surface: #ffffff;
    --mud-palette-background: #ffffff;
    --mud-palette-background-grey: #f5f5f5;
    --mud-palette-lines-default: rgba(0,0,0,0.12);
    --mud-palette-lines-inputs: rgba(0,0,0,0.42);
    --mud-palette-table-hover: rgba(0,0,0,0.04);
    --mud-palette-divider: rgba(0,0,0,0.12);
    --mud-palette-appbar-background: #594ae2;
}

.designer-empty-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: #adb5bd;
}

.designer-validation-errors {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    background: #fff8f0;
    margin-bottom: 8px;
}

/* Forza tema chiaro nei popup MudSelect aperti dal designer */
.designer-popup {
    --mud-palette-text-primary: rgba(0,0,0,0.87);
    --mud-palette-text-secondary: rgba(0,0,0,0.60);
    --mud-palette-text-disabled: rgba(0,0,0,0.38);
    --mud-palette-surface: #ffffff;
    --mud-palette-background: #ffffff;
    --mud-palette-lines-default: rgba(0,0,0,0.12);
    background: #ffffff !important;
    color: #212529 !important;
}
.designer-popup .mud-list-item-text span,
.designer-popup .mud-list-item {
    color: #212529 !important;
}
