/* ============================================
   Import wizard (_ImportWizard.cshtml) and the older import page
   Colors come from the theme variables, so the light and dark modes both read well.
   ============================================ */

[x-cloak] {
    display: none !important;
}

.import-preview-table {
    font-size: 0.8125rem;
}

.import-preview-table th {
    background-color: var(--highdmin-tertiary-bg);
    font-weight: 600;
    white-space: nowrap;
}

.import-preview-table .import-row-invalid > td,
.import-preview-table .row-invalid > td {
    background-color: var(--highdmin-danger-bg-subtle);
}

.import-preview-table .import-row-errors > td {
    background-color: var(--highdmin-danger-bg-subtle);
    color: var(--highdmin-danger-text-emphasis);
    border-top: 0;
    font-size: 0.75rem;
}

/* The errors of a row stay in the visible width while the columns slide (bolsa #75): at 390 px the message of a rule
   was cut at the right edge of the scrolling table. */
.import-preview-scroll {
    container-type: inline-size;
}

.import-preview-scroll .import-row-errors ul {
    position: sticky;
    left: 0;
    /* El ancho visible menos el relleno de la celda y la sangría de la lista: con 0,5 rem, a 390 px el mensaje pasaba
       3 px del borde (recorrido de la #75 sobre la copia de producción, 10-11). */
    max-width: calc(100cqi - 2.5rem);
    box-sizing: border-box;
    white-space: normal;
}

.import-preview-table .row-valid > td {
    background-color: var(--highdmin-success-bg-subtle);
}

.import-preview-table .error-column {
    background-color: var(--highdmin-danger-bg-subtle);
    color: var(--highdmin-danger-text-emphasis);
    font-size: 0.75rem;
}

.import-error-badge {
    background-color: var(--highdmin-danger-bg-subtle);
    color: var(--highdmin-danger-text-emphasis);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 500;
}

.import-valid-badge {
    background-color: var(--highdmin-success-bg-subtle);
    color: var(--highdmin-success-text-emphasis);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 500;
}

.import-dropzone {
    border: 2px dashed var(--highdmin-border-color);
    border-radius: 0.5rem;
    padding: 3rem 2rem;
    text-align: center;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
    background-color: var(--highdmin-tertiary-bg);
}

.import-dropzone:hover,
.import-dropzone.dragover,
.import-dropzone:focus-within {
    border-color: var(--highdmin-success);
    background-color: var(--highdmin-success-bg-subtle);
}

.import-dropzone:focus-within {
    outline: 2px solid var(--highdmin-success);
    outline-offset: 2px;
}

.import-dropzone i {
    font-size: 3rem;
    color: var(--highdmin-secondary-color);
}

.import-dropzone:hover i,
.import-dropzone.dragover i,
.import-dropzone:focus-within i {
    color: var(--highdmin-success);
}

.import-columns > summary {
    cursor: pointer;
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    .import-dropzone {
        transition: none;
    }
}
