/* ============================================
   ESTILOS DE CHECKBOX PERSONALIZADOS (DATATABLES)
   ============================================ */

/* ===== CHECKBOXES ===== */

/* Estilos estructurales base para checkboxes */
.dataTables_wrapper .allInOneDatatable tbody td.select-checkbox {
    position: relative !important;
}

.dataTables_wrapper .allInOneDatatable tbody td.select-checkbox::before {
    width: 1.1em !important;
    height: 1.1em !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    display: block !important;
}

.dataTables_wrapper .allInOneDatatable tbody td.select-checkbox::after {
    position: absolute !important;
    font-size: 1rem !important;
    margin: 0 !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: block !important;
    line-height: 1 !important;
}

/* Checkbox deseleccionado */
.dataTables_wrapper .allInOneDatatable tbody td.select-checkbox:before,
.dataTables_wrapper .allInOneDatatable tbody th.select-checkbox:before {
    border: 1px solid var(--checkbox-border) !important;
    background-color: var(--checkbox-bg) !important;
    border-radius: 4px !important;
}

/* Checkbox seleccionado */
.dataTables_wrapper .allInOneDatatable tbody tr.selected td.select-checkbox:before,
.dataTables_wrapper .allInOneDatatable tbody tr.selected th.select-checkbox:before {
    border-color: var(--checkbox-checked-border) !important;
    background-color: var(--checkbox-checked-bg) !important;
}

/* Mostrar símbolo check en checkbox de fila seleccionada */
.dataTables_wrapper .allInOneDatatable tbody tr.selected td.select-checkbox::after,
.dataTables_wrapper .allInOneDatatable tbody tr.selected th.select-checkbox::after {
    content: "\2713" !important;
    color: var(--checkbox-checked-mark) !important;
    position: absolute !important;
    font-size: 0.8rem !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: block !important;
    line-height: 1.2 !important;
}

#tabla_lista_actas.dataTable tr.selected td.select-checkbox::after, #tablafacturasenvio.dataTable tr.selected td.select-checkbox::after, #tablaalbaranes.dataTable tr.selected td.select-checkbox::after, #tabla_alumnos.dataTable tr.selected td.select-checkbox::after, #tablacursos.dataTable tr.selected td.select-checkbox::after, #tabla_partidos.dataTable tr.selected td.select-checkbox::after, #tabla_remesas.dataTable tr.selected td.select-checkbox::after, #tablaJugadoresDocumentacion.dataTable tr.selected td.select-checkbox::after, #tablaEntrenadoresDocumentacion.dataTable tr.selected td.select-checkbox::after{
    content: "\2713" !important;
    color: var(--checkbox-checked-mark) !important;
    background: var(--checkbox-checked-bg) !important;
    position: absolute !important;
    font-size: 0.8rem !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: block !important;
    line-height: 1.7 !important;
}

/* Checkbox seleccionado en fila de baja */
.dataTables_wrapper .allInOneDatatable tbody tr.de_baja.selected td.select-checkbox:before,
.dataTables_wrapper .allInOneDatatable tbody tr.de_baja.selected th.select-checkbox:before {
    background-color: var(--checkbox-de-baja-checked-bg) !important;
    border-color: var(--checkbox-de-baja-checked-border) !important;
}

/* Fila de baja seleccionada - Fondo */
.dataTables_wrapper .allInOneDatatable tbody tr.de_baja.selected,
.dataTables_wrapper .allInOneDatatable tbody tr.de_baja.selected td {
    background-color: var(--row-de-baja-selected-bg) !important;
}
/* Checkbox seleccionado en fila de baja */
.dataTables_wrapper .allInOneDatatable tbody tr.de_baja.selected td.select-checkbox:before,
.dataTables_wrapper .allInOneDatatable tbody tr.de_baja.selected
    colorth.select-checkbox:before {
    background-color: var(--checkbox-de-baja-checked-bg) !important;
    border-color: var(--checkbox-de-baja-checked-border) !important;
}

/* Fila de baja seleccionada - Fondo */
.dataTables_wrapper .allInOneDatatable tbody tr.de_baja.selected,
.dataTables_wrapper .allInOneDatatable tbody tr.de_baja.selected td {
    background-color: var(--row-de-baja-selected-bg) !important;
}
/* Checkbox seleccionado en fila de baja */
.dataTables_wrapper .allInOneDatatable tbody tr.cancelada.selected td.select-checkbox:before,
.dataTables_wrapper .allInOneDatatable tbody tr.de_baja.selected th.select-checkbox:before {
    background-color: var(--checkbox-de-baja-checked-bg) !important;
    border-color: var(--checkbox-de-baja-checked-border) !important;
}

/* Mostrar símbolo check en checkbox de fila cancelada seleccionada */
.dataTables_wrapper .allInOneDatatable tbody tr.cancelada.selected td.select-checkbox::after,
.dataTables_wrapper .allInOneDatatable tbody tr.cancelada.selected th.select-checkbox::after {
    content: "\2713" !important;
    color: white !important;
    position: absolute !important;
    font-size: 0.8rem !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: block !important;
    line-height: 1.2 !important;
}

/* Fila de baja seleccionada - Fondo */
.dataTables_wrapper .allInOneDatatable tbody tr.de_baja.selected,
.dataTables_wrapper .allInOneDatatable tbody tr.de_baja.selected td {
    background-color: var(--label-info-background) !important;
}

/* Fila de copia seleccionada - Fondo */
.dataTables_wrapper .allInOneDatatable tbody tr.copiada.selected,
.dataTables_wrapper .allInOneDatatable tbody tr.copiada.selected td {
    background-color: var(--label-info-background) !important;
}
/* Checkbox seleccionado en fila de copia */
.dataTables_wrapper .allInOneDatatable tbody tr.copiada.selected td.select-checkbox:before{
    background-color: var(--info-color) !important;
    border-color: var(--info-color) !important;
}

/* Mostrar símbolo check en checkbox de fila copiada seleccionada */
.dataTables_wrapper .allInOneDatatable tbody tr.copiada.selected td.select-checkbox::after,
.dataTables_wrapper .allInOneDatatable tbody tr.copiada.selected th.select-checkbox::after {
    content: "\2713" !important;
    color: white !important;
    position: absolute !important;
    font-size: 0.8rem !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: block !important;
    line-height: 1.2 !important;
}

/* Fila de copia seleccionada - Fondo */
.dataTables_wrapper .allInOneDatatable tbody tr.copiada.selected,
.dataTables_wrapper .allInOneDatatable tbody tr.copiada.selected td {
    background-color: var(--label-info-background) !important;
}



/* Marca de verificación (Checkmark) - Desactivar el default de DataTables */
.dataTables_wrapper .allInOneDatatable tbody tr.selected td.select-checkbox:after,
.dataTables_wrapper .allInOneDatatable tbody tr.selected th.select-checkbox:after {
    /* content: none !important;
    display: none !important; */
}

/* Estilos para el icono inyectado en el HTML (render) */
.dataTables_wrapper .allInOneDatatable tbody td.select-checkbox i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8em;
    color: var(--checkbox-checked-mark);
    display: none;
    z-index: 2;
    pointer-events: none; /* Para que no interfiera con el click */
}

/* Mostrar el icono cuando la fila está seleccionada */
.dataTables_wrapper .allInOneDatatable tbody tr.selected td.select-checkbox i {
    display: block;
}

/* Color del checkmark en filas de baja seleccionadas */
.dataTables_wrapper .allInOneDatatable tbody tr.de_baja.selected td.select-checkbox i {
    color: var(--checkbox-de-baja-checked-mark) !important;
}

/* Fila seleccionada - Fondo */
.dataTables_wrapper .allInOneDatatable tbody tr.selected,
.dataTables_wrapper .allInOneDatatable tbody tr.selected td {
    background-color: var(--checkbox-tr-bg) !important;
}

/* Prioridad: si la fila es cancelada y seleccionada, mantener el fondo rojo */
.dataTables_wrapper .allInOneDatatable tbody tr.cancelada.selected,
.dataTables_wrapper .allInOneDatatable tbody tr.cancelada.selected td {
    background-color: var(--row-de-baja-selected-bg) !important;
}

/* Estilos para los checkboxes de selección en filas de baja */
.dataTables_wrapper .allInOneDatatable tbody tr.de_baja td.select-checkbox::before,
.dataTables_wrapper .allInOneDatatable tbody td.de_baja.select-checkbox::before,
tbody tr.de_baja td.select-checkbox::before {
    border-color: var(--checkbox-de-baja-border) !important;
    background-color: var(--checkbox-de-baja-bg) !important;

}

/* Color del checkmark en filas de baja seleccionadas */
.dataTables_wrapper .allInOneDatatable tbody tr.de_baja.selected td.select-checkbox::after,
.dataTables_wrapper .allInOneDatatable tbody tr.de_baja.selected th.select-checkbox::after {
    color: var(--checkbox-de-baja-mark) !important;

}

/* ============================================
   CHECKBOXES GENÉRICOS (Dropdowns, Formularios, etc.)
   ============================================ */

/* Checkbox visual personalizado (span) */
.custom-checkbox-visual {
    width: 1.1em;
    height: 1.1em;
    border: 1px solid var(--checkbox-border);
    background-color: var(--checkbox-bg);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Icono dentro del checkbox visual */
.custom-checkbox-visual i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--checkbox-checked-mark);
    font-size: 0.8em;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Estado Checked */
input[type="checkbox"]:checked + .custom-checkbox-visual {
    background-color: var(--checkbox-checked-bg);
    border-color: var(--checkbox-checked-border);
}

/* Mostrar icono cuando está checked */
input[type="checkbox"]:checked + .custom-checkbox-visual i {
    opacity: 1;
}

/* Hover effect */
label:hover .custom-checkbox-visual {
    border-color: var(--primary-color);
}
.checkbox.check-success input[type=checkbox]:checked + label:before {
    border-color: var(--checkbox-checked-bg);
    background: var(--checkbox-checked-bg);
}
.checkbox.check-success input[type=checkbox]:checked + label:after {
    color: #000;
    content: "\2713";
}
.checkbox label::after {
    left: 4px !important;
    top: 0px !important;
}

#tabla_lista_actas.dataTable tr.selected td.select-checkbox::after{
    width: 12px !important;
    height: 12px !important;
    background-color: var(--checkbox-checked-bg) !important;
}