/* Estilos específicos para tablas de Filament */
/* Estos estilos solo se aplican a tablas que tengan la clase 'filament-programa-descarga-table' */



/* Forzar estilos en tablas con clase específica */
.filament-programa-descarga-table .fi-ta-table,
.filament-programa-descarga-table .fi-ta-table-wrapper,
.filament-programa-descarga-table .fi-ta-table-container,
.filament-programa-descarga-table [data-filament-table],
.filament-programa-descarga-table .fi-ta-container {
    max-height: calc(100vh - 410px) !important;
    overflow-y: auto !important;
    overflow-x: auto !important;
    display: block !important;
}


/* Encabezados fijos para tablas con clase específica */
.filament-programa-descarga-table .fi-ta-table thead,
.filament-programa-descarga-table .fi-ta-table-wrapper thead,
.filament-programa-descarga-table [data-filament-table] thead {
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;

}

.filament-programa-descarga-table .fi-ta-table thead th,
.filament-programa-descarga-table .fi-ta-table-wrapper thead th,
.filament-programa-descarga-table [data-filament-table] thead th,
.filament-programa-descarga-table .fi-ta-header-cell {
    position: sticky !important;
    top: 0 !important;

    z-index: 2 !important;
    font-weight: 600 !important;
    color: #374151 !important;
    padding: 12px 16px !important;
    white-space: nowrap !important;
}


/* Modo oscuro para tablas con clase específica */
.dark .filament-programa-descarga-table .fi-ta-table thead th,
.dark .filament-programa-descarga-table .fi-ta-table-wrapper thead th,
.dark .filament-programa-descarga-table [data-filament-table] thead th,
.dark .filament-programa-descarga-table .fi-ta-header-cell {

    color: #f9fafb !important;

}

.dark .filament-programa-descarga-table .fi-ta-table thead,
.dark .filament-programa-descarga-table .fi-ta-table-wrapper thead,
.dark .filament-programa-descarga-table [data-filament-table] thead {
    background: #242427 !important;
}


@media (max-width: 768px) {

    .filament-programa-descarga-table .fi-ta-table,
    .filament-programa-descarga-table .fi-ta-table-wrapper,
    .filament-programa-descarga-table .fi-ta-table-container,
    .filament-programa-descarga-table [data-filament-table],
    .filament-programa-descarga-table .fi-ta-container {
        max-height: calc(100vh - 425px) !important;
    }

}


/* Reducir tamaño de fuente en todas las celdas */
.programa-descarga-compact-table .fi-ta-table tbody td,
.programa-descarga-compact-table .fi-ta-table-wrapper tbody td,
.programa-descarga-compact-table [data-filament-table] tbody td,
.programa-descarga-compact-table .fi-ta-table thead th,
.programa-descarga-compact-table .fi-ta-table-wrapper thead th,
.programa-descarga-compact-table [data-filament-table] thead th,
.programa-descarga-compact-table .fi-ta-table tbody td *,
.programa-descarga-compact-table .fi-ta-table-wrapper tbody td *,
.programa-descarga-compact-table [data-filament-table] tbody td *,
.programa-descarga-compact-table .fi-ta-table tbody td span,
.programa-descarga-compact-table .fi-ta-table-wrapper tbody td span,
.programa-descarga-compact-table [data-filament-table] tbody td span,
.programa-descarga-compact-table .fi-ta-table tbody td div,
.programa-descarga-compact-table .fi-ta-table-wrapper tbody td div,
.programa-descarga-compact-table [data-filament-table] tbody td div {
    font-size: 0.7rem !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}


/* ── Facturación: reducir espacio entre título, widget de estadísticas y tabla ── */

/* Espacio arriba: entre el header (título "Facturas") y el widget de estadísticas */
.fi-page-header-main-ctn:has(.facturacion-stats-widget) {
    row-gap: calc(var(--spacing) * 2) !important;
}

/* Espacio abajo: entre el widget de estadísticas y la tabla */
.fi-page-content:has(.filament-facturacion-table) {
    row-gap: calc(var(--spacing) * 0) !important;
}

/* ── Modal Documentos Rápidos: uploads compactos ── */
/* Solo reducir el dropzone vacío, no limitar el root (causa bugs al subir) */
.fi-modal .filepond--drop-label {
    min-height: 2.25rem !important;
    height: 2.25rem !important;
}
.fi-modal .filepond--drop-label label {
    font-size: 0.75rem !important;
    padding: 0 0.5rem !important;
}

/* ── Programa de Descargas: reducir espacio entre título, widget de estadísticas y tabla ── */

/* Espacio arriba: entre el header (título) y el widget de estadísticas */
.fi-page-header-main-ctn:has(.programa-descarga-stats-widget) {
    row-gap: calc(var(--spacing) * 2) !important;
}

/* Espacio abajo: entre el widget de estadísticas y la tabla */
.fi-page-content:has(.filament-programa-descarga-table) {
    row-gap: calc(var(--spacing) * 0) !important;
}