/*
  You can add custom CSS rules or import files here.
*/


/* Import the Radzen CSS files */
/*@import './styles-generated.css';*/
/*@import './default.css';*/

.rz-datatable-thead th .rz-column-title, .rz-grid-table thead th .rz-column-title {
    font-size: 0.85rem;
    /*text-transform: uppercase;*/
    /*color: #3a474d;*/
    /*padding: 0 0 0.625rem 0.625rem;*/
    font-weight: bold;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.rz-fileupload-buttonbar > .rz-fileupload-choose {
    /*font-size: 1.0625rem;*/
    background-color: #ff6d41;
    padding: 0px;
    /*height: 1rem;*/
    /*min-width: 140px;*/
    text-align: center;
    /*align-content: center;*/
    /*vertical-align:sub;*/
    width: 100%;
}

/*.rz-fileupload-choose:hover {
    color: black;
}
*/ /*.rz-fileupload-buttonbar > .rz-fileupload-choose rz-button {
    padding: 0px;
}
*/
.rz-grid-table .rz-cell-data .rz-fileupload .rz-button {
    padding: 0px;
    line-height: 1.5rem;
}

.rz-fileupload .rz-button .rzi {
    vertical-align: middle;
}

.rz-fileupload .rz-button .rz-button-text {
    line-height: 2rem;
    /*vertical-align: sub;*/
}

.rz-fileupload-buttonbar {
    background-color: #ff6d41;
    padding: 0px;
    /*width: fit-content;*/
}

.rz-fileupload-content {
    min-height: 0px;
    height: 0px;
    min-width: 0px;
    width: 0px;
    padding: 0px;
    visibility: collapse;
}

.rz-fileupload-files {
    min-height: 0px;
    height: 0px;
    min-width: 0px;
    width: 0px;
    padding: 0px;
    visibility: collapse;
}

.rz-fileupload-row {
    min-height: 0px;
    height: 0px;
    min-width: 0px;
    width: 0px;
    padding: 0px;
    visibility: collapse;
}

.ui-datalist-data > li, .ui-g > div {
    border-width: 0px;
}

/* ========== CorrectionPL (pagina correzione pre-correzione) ========== */

/* Dialog correzione: adattamento a schermi piccoli (mai più grandi del viewport) */
.rz-dialog:has(.cpl-dialog-layout),
.rz-dialog:has(.cr-dialog-layout) {
    max-width: 100vw;
    max-height: 100vh;
}

    .rz-dialog:has(.cpl-dialog-layout) .rz-dialog-content,
    .rz-dialog:has(.cr-dialog-layout) .rz-dialog-content {
        max-height: calc(100vh - 80px);
        display: flex;
        flex-direction: column;
    }

/* Layout dialog: colonna con body scrollabile e footer sticky in basso */
.cpl-dialog-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.cpl-dialog-body {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}

/* Footer della dialog: sticky in basso, sempre visibile sopra il contenuto scrollabile */
.cpl-dialog-footer {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(0,0,0,.08);
    background: var(--rz-base-background-color, #fff);
}

/* Card sinistra come ChromaShop FormulaCorrection */
.cpl-left-card {
    background: var(--rz-base-background-color, #fff);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.cpl-info-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

    .cpl-info-row .cpl-field-label {
        width: 120px;
        flex-shrink: 0;
    }

/* Anteprima colori Target | Batch come ChromaShop (Std / Trial) */
.cpl-color-preview {
    display: flex;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    max-width: 280px;
}

.cpl-color-preview-box {
    flex: 1;
    height: 48px;
    min-width: 80px;
    border: 1px solid rgba(0,0,0,.15);
}

.cpl-color-preview-labels {
    display: flex;
    gap: 0;
    max-width: 280px;
    margin-top: 4px;
    font-size: 0.75rem;
    color: #666;
}

    .cpl-color-preview-labels span {
        flex: 1;
        text-align: center;
    }

/* Card destra (QC + LAB + Riflettanze) */
.cpl-right-card {
    background: var(--rz-base-background-color, #fff);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* Griglia delta come ChromaShop (ΔE*, ΔL*, Δa*, Δb*, Met) */
.cpl-delta-grid-wrap {
    border: 1px solid #d3d3d3;
    padding: 8px;
    margin-bottom: 10px;
}

.cpl-delta-header, .cpl-delta-values {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    text-align: center;
}

.cpl-delta-header {
    font-weight: 600;
    font-size: 1rem;
    padding-bottom: 6px;
}

.cpl-delta-values {
    border-top: 1px solid #d3d3d3;
    padding-top: 10px;
    font-size: 1.1rem;
}

.cpl-passfail-bar {
    padding: 10px;
    text-align: center;
    border-radius: 4px;
    font-weight: 600;
}

/* Riga unica Diagramma LAB | Riflettanze come ChromaShop */
.cpl-qc-lab-chart-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cpl-lab-block {
    flex-shrink: 0;
}

.cpl-chart-block {
    min-width: 0;
}

.cpl-field-label {
    width: 100%;
    font-weight: 600;
    opacity: .85;
}

/* Fieldset */
.cpl-fieldset-inner {
    padding: .5rem .75rem .75rem .75rem;
}

.cpl-hint {
    font-size: small;
    color: #666;
    width: 100%;
    display: block;
}

/* Diagramma LAB come ChromaShop (WPF), ingrandito 2x per leggibilità */
.cpl-lab-diagram-wrap {
    width: 420px;
    height: 220px;
}

    .cpl-lab-diagram-wrap svg {
        width: 100%;
        height: 100%;
        display: block;
    }

.cpl-color-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: .5rem;
    height: 1rem;
}

.cpl-color-option-text {
    margin-top: -2px;
    padding: 0;
}

/* Correzione avanzata */
.cpl-advanced-correction-fieldset {
    margin-top: 5px;
}

.cpl-advanced-correction {
    padding: .5rem .75rem;
}

.cpl-original-colorants {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0.5rem;
}

.cpl-colorant-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,.12);
    min-height: 28px;
    background: var(--rz-base-background-color, #fff);
}

.cpl-colorant-chip-swatch {
    flex-shrink: 0;
    border-radius: 2px;
    border: 1px solid rgba(0,0,0,.15);
}

.cpl-colorant-chip-code {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(0,0,0,.8);
    white-space: nowrap;
}

/* Chip originali: già selezionati, disattivati (solo lettura) */
.cpl-colorant-chip--disabled {
    opacity: 0.85;
    cursor: default;
    border-color: rgba(0,0,0,.2);
    background: rgba(0,0,0,.04);
}

/* Dropdown coloranti aggiuntivi (come FormulationPL) */
.cpl-dropdown-option.cpl-dropdown-option--colorant {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.25rem;
    min-height: 2rem;
}

.cpl-dropdown-option--colorant .cpl-dropdown-swatch {
    flex-shrink: 0;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,.15);
}

.cpl-dropdown-option--colorant .cpl-dropdown-text {
    font-size: 0.875rem;
}

/* ========== CorrectionResults (dialog risultati correzione) ========== */

/* Layout dialog: colonna con body scrollabile e footer sticky in basso */
.cr-dialog-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.cr-dialog-body {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}
/* Footer sticky: riga pulsanti sempre visibile sopra il contenuto */
.cr-dialog-footer {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 10;
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(0,0,0,.08);
    background: var(--rz-base-background-color, #fff);
}

/* Layout dialog ChromaShop (CorrectedFormulaView) */
.cr-header-close {
    margin-left: auto;
}

.cr-toprow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 15px;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.08);
    flex-shrink: 0;
}

.cr-toprow-left {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}

.cr-toprow-label {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(0,0,0,.8);
}

.cr-toprow-units {
    flex-shrink: 0;
}

.cr-panels {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 10px 10px 10px;
    margin-top: 0;
}

.cr-panel {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.08);
}

.cr-panel--border {
    border-right: 1px solid rgba(0,0,0,.08);
}

.cr-panel--reformulated {
    background-color: rgba(33, 150, 243, 0.04);
}
/* Riga unica: Origine e tab Aggiunta/Riformulata stesso stile e stessa altezza */
.cr-header-row {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    background: rgba(0,0,0,.06);
    border-bottom: 1px solid rgba(0,0,0,.08);
    font-size: 0.875rem;
    font-weight: 500;
}

.cr-header-tab {
    color: rgba(0,0,0,.75);
}

.cr-header-tab--active {
    color: rgba(0,0,0,.9);
}
/* Tab Radzen: stesse dimensioni e stile di cr-header-row */
.cr-correction-tabs.rz-tabview .rz-tabview-nav {
    min-height: 40px;
    background: rgba(0,0,0,.06);
    border-bottom: 1px solid rgba(0,0,0,.08);
    padding: 0;
}

    .cr-correction-tabs.rz-tabview .rz-tabview-nav li {
        margin: 0;
    }

        .cr-correction-tabs.rz-tabview .rz-tabview-nav li a {
            font-size: 0.875rem !important;
            font-weight: 500 !important;
            padding: 0 12px !important;
            min-height: 40px;
            display: flex;
            align-items: center;
        }

    .cr-correction-tabs.rz-tabview .rz-tabview-nav .rz-tabview-selected a {
        font-weight: 600;
    }

.cr-panel-body--no-top-padding {
    padding-top: 0;
}

.cr-panel-header {
    padding: 8px 12px;
    background: rgba(0,0,0,.06);
    font-weight: 600;
    font-size: 1rem;
}

.cr-panel-body {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.cr-panel-footer {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,.06);
    text-align: center;
}

/* Tab Origine: front (ΔE, 4 metriche, base, lista, Dettagli) */
.cr-origine-front {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.cr-origine-deltae {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 6px;
    min-height: 52px;
}

    .cr-origine-deltae .rz-text {
        font-weight: 700;
        font-size: 1.25rem;
        line-height: 1.2;
    }

.cr-origine-label {
    font-size: 0.75rem;
    color: rgba(0,0,0,.6);
    white-space: nowrap;
    flex-basis: 100%;
    text-align: center;
    margin-top: 2px;
}

.cr-origine-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(58px, 1fr));
    gap: 10px 12px;
    text-align: center;
}

.cr-origine-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    font-size: 0.9rem;
    min-width: 0;
    min-height: 56px;
}

    .cr-origine-metric > span:first-of-type {
        line-height: 1.2;
        font-variant-numeric: tabular-nums;
    }

.cr-origine-metric-label {
    font-size: 0.68rem;
    color: rgba(0,0,0,.55);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.cr-origine-sep {
    margin: 4px 0;
    border: none;
    border-top: 1px solid rgba(0,0,0,.08);
}

.cr-origine-base {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.cr-origine-base-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cr-origine-base-qty {
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    margin-left: 8px;
}

.cr-origine-list {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

/* Tab Origine: back (Dettagli = LAB + tabella delta) */
.cr-origine-back {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.cr-origine-back-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .cr-origine-back-header span {
        font-size: 0.95rem;
        font-weight: 500;
    }

/* Tab Aggiunta: Delta E sopra le metriche (come Origine) */
.cr-aggiunta-front {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    width: 100%;
}
/* Come Origine: 4 colonne (Metamerismo, Coprenza, Prezzo, Riflessione) */
.cr-aggiunta-metrics {
    width: 100%;
    grid-template-columns: repeat(4, minmax(58px, 1fr));
    gap: 10px 12px;
}

    .cr-aggiunta-metrics .cr-origine-metric {
        min-width: 0;
        min-height: 56px;
    }

.cr-aggiunta-list {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.cr-aggiunta-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cr-aggiunta-btn-icon {
    min-width: 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
}

    .cr-aggiunta-btn-icon .rz-button-icon {
        margin: 0;
    }

/* Riformulata: riga DeltaE + Metamerism come WPF */
.cr-reformulated-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.cr-reformulated-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.cr-reformulated-base {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.9rem;
}
/* Contenuto tab Aggiunta/Riformulata: due colonne (sinistra = metriche + lista, destra = LAB + tabella delta) */
.cr-tab-content {
    display: flex;
    flex-direction: row;
    gap: 16px;
    min-height: 320px;
    width: 100%;
}
/* Due colonne uguali (come col-md-4 ciascuna dentro col-md-8): stessa dimensione */
.cr-tab-left {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.cr-tab-right {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .cr-tab-right .cr-lab-wrap {
        width: 100%;
        flex: 1;
        min-height: 200px;
    }

    .cr-tab-right .cr-reflectance-wrap {
        width: 100%;
        flex-shrink: 0;
        min-height: 200px;
        margin-top: 8px;
    }

    .cr-tab-right .cr-delta-table-wrap {
        width: 100%;
        flex-shrink: 0;
        margin-top: 8px;
    }

.cr-lab-and-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.cr-lab-wrap {
    width: 100%;
    max-width: 100%;
}

.cr-delta-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 4px;
    background: #fafafa;
}

.cr-delta-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

    .cr-delta-table th,
    .cr-delta-table td {
        padding: 6px 10px;
        text-align: right;
    }

    .cr-delta-table th {
        font-weight: 600;
        background: rgba(0,0,0,.04);
    }

    .cr-delta-table .cr-delta-label {
        text-align: right;
        font-weight: 500;
    }

    .cr-delta-table .cr-delta-val {
        font-variant-numeric: tabular-nums;
    }

/* Header */
.cpl-title {
    font-size: x-large;
    font-weight: 700;
}

/* Divider */
.cpl-divider {
    border: none;
    background-color: rgba(0,0,0,.08);
    height: 1px;
    margin: 1rem 0;
}

/* 3-column grid */
.cpl-grid {
    margin: 0;
}

.cpl-col {
    padding: 0 15px;
}

.cpl-col--border {
    border-right: 1px solid rgba(0,0,0,.08);
}

.cpl-col--reformulated {
    background-color: rgba(33, 150, 243, 0.03);
    border-radius: 4px;
    padding: 10px 15px;
}

.cpl-col-header {
    margin-bottom: 1rem;
    display: grid;
    gap: .35rem;
}

.cpl-col-title {
    font-weight: 700;
}

.cpl-metrics {
    margin-bottom: 1rem;
    display: grid;
    gap: .5rem;
}

/* ΔL* Δa* Δb* ΔC* ΔH* su due colonne */
.cpl-delta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.cpl-list {
    width: 100%;
}

/* Lista coloranti: una riga per colorante, nessuna griglia a 2 colonne */
.cpl-colorants .rz-datalist-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Card = una riga: colonna 1 = RGB + codice, colonna 2 = quantità (colonna distinta) */
.cpl-colorant-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(80px, auto);
    align-items: center;
    gap: 14px 18px;
    background: var(--rz-base-background-color, #fff);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    min-height: 52px;
}

/* Colonna colorante: barra RGB + codice (barra fissa, codice non sovrappone) */
.cpl-colorant-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    overflow: hidden;
}

/* Colonna quantità: larghezza minima per evitare sovrapposizione con sinistra */
.cpl-colorant-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    min-width: 80px;
    flex-shrink: 0;
}

.cpl-colorant-bar {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    flex: 0 0 28px;
}

.cpl-colorant-code {
    font-size: 13px;
    font-weight: 600;
    color: rgba(0,0,0,.75);
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cpl-colorant-value {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: rgba(0,0,0,.65);
}

/* Aggiunta: colonna quantità con due righe (delta + totale) */
.cpl-colorant-value--two-cols {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

    .cpl-colorant-value--two-cols .cpl-addition {
        font-weight: 600;
        color: rgba(0, 120, 0, .9);
    }

    .cpl-colorant-value--two-cols .cpl-total {
        font-size: 13px;
        color: rgba(0,0,0,.65);
    }
