body {
    /*padding-top: 50px;*/
    padding-bottom: 10px;
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
}

/* Spinner Overlay para mostrar durante operaciones de carga */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-overlay.hidden {
    display: none !important;
}

.spinner-custom {
    width: 3rem;
    height: 3rem;
    color: #fff;
}

/* Set padding to keep content from hitting the edges */
.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

/* Override the default bootstrap behavior where horizontal description lists 
   will truncate terms that are too long to fit in the left column 
*/
.dl-horizontal dt {
    white-space: normal;
}

/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
    max-width: 280px;
}

/* para la grilla de los mantenedores */
#mantenedor-table tbody td,
#tablaDocumentos tbody td,
#mantenedor-table2 tbody td {
    border: none !important;
}

.fila-seleccionada {
    background-color: #c2f0c2 !important; /* Verde suave */
}
/* --------------  */

#btnExcel {    
    background-image: url('@Url.Content("~/Content/img/excel.png")');
    background-repeat: no-repeat;
    background-color: transparent;
    border-color: transparent;
    border: 0px,;
    background-position: center;
    background-size: contain; /* o un tamaño específico como 24px */
    width: 47px;
    height: 47px;
    text-indent: -9999px; /* Oculta el texto */
    overflow: hidden;
    cursor: pointer;
}

.btn-wsp {
    color: #25d366;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 5px 10px;
    border: 1px solid #25d366;
    border-radius: 6px;
    background: #fff;
    transition: 0.2s;
    white-space: nowrap;
}

    .btn-wsp:hover {
        background: #25d366;
        color: #fff;
        transform: scale(1.05);
    }

.btn-telefono {
    color: #2570d3;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 5px 10px;
    border: 1px solid #2570d3;
    border-radius: 6px;
    background: #fff;
    transition: 0.2s;
    white-space: nowrap;
}

    .btn-telefono:hover {
        background: #2570d3;
        color: #fff;
        transform: scale(1.05);
    }

.btn-sms {
    color: #d32f2f;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 5px 10px;
    border: 1px solid #d32f2f;
    border-radius: 6px;
    background: #fff;
    transition: 0.2s;
    white-space: nowrap;
}

    .btn-sms:hover {
        background: #d32f2f;
        color: #fff;
        transform: scale(1.05);
    }

.btn-correo {
    color: #f9a825;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 5px 10px;
    border: 1px solid #f9a825;
    border-radius: 6px;
    background: #fff;
    transition: 0.2s;
    white-space: nowrap;
}

    .btn-correo:hover {
        background: #f9a825;
        color: #fff;
        transform: scale(1.05);
    }

/* Botones de cobranza ya utilizados */
.btn-wsp-usado {
    background: #25d366;
    color: #fff;
    opacity: 0.80;
}
    .btn-wsp-usado:hover { opacity: 1; }

.btn-telefono-usado {
    background: #2570d3;
    color: #fff;
    opacity: 0.80;
}
    .btn-telefono-usado:hover { opacity: 1; }

.btn-sms-usado {
    background: #d32f2f;
    color: #fff;
    opacity: 0.80;
}
    .btn-sms-usado:hover { opacity: 1; }

.btn-correo-usado {
    background: #f9a825;
    color: #fff;
    opacity: 0.80;
}
    .btn-correo-usado:hover { opacity: 1; }

/* Columnas de acción (Editar/Eliminar) en tablas mantenedor */
.col-accion {
    width: 5rem;
}

@media (max-width: 767.98px) {
    .col-accion {
        width: 2.5rem !important;
    }

    .contenedor-fluid h2 {
        font-size: 1.1rem;
        word-break: break-word;
    }

    .dataTables_length {
        display: none !important;
    }

    .dataTables_wrapper .dataTables_filter {
        width: 100%;
    }

    .dataTables_wrapper .dataTables_filter label {
        width: 100%;
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }

    .dataTables_wrapper .dataTables_filter input {
        flex: 1;
        width: 100% !important;
        box-sizing: border-box;
    }
}

/* Indicador de orden para DataTables 1.x */
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    position: relative;
    padding-right: 1.5rem !important;
    cursor: pointer;
    background-image: none !important;
}

table.dataTable thead th.sorting::before,
table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::before,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::before,
table.dataTable thead th.sorting_desc::after {
    content: "";
    position: absolute;
    right: 0.55rem;
    width: 0;
    height: 0;
    border-left: 0.25rem solid transparent;
    border-right: 0.25rem solid transparent;
    opacity: 0.28;
    pointer-events: none;
}

table.dataTable thead th.sorting::before,
table.dataTable thead th.sorting_asc::before,
table.dataTable thead th.sorting_desc::before {
    top: calc(50% - 0.42rem);
    border-bottom: 0.34rem solid #6c757d;
}

table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::after {
    top: calc(50% + 0.08rem);
    border-top: 0.34rem solid #6c757d;
}

table.dataTable thead th.sorting_asc::before {
    border-bottom-color: #0a8b41;
    opacity: 1;
}

/* Modal Comprobante - ajustes móviles */
@media (max-width: 768px) {
    #modalComprobante .modal-header #infoComprobante {
        display: block;
        width: 100%;
        margin-top: 0.35rem;
    }

    #modalComprobante .modal-footer {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 0.5rem !important;
    }

    #modalComprobante .modal-footer .btn,
    #modalComprobante .modal-footer .btn-custom {
        width: 100%;
        margin: 0 !important;
    }
}

table.dataTable thead th.sorting_desc::after {
    border-top-color: #0a8b41;
    opacity: 1;
}


/* Base reutilizable para modales de reportes */
.report-modal-dialog {
    width: min(960px, 96vw);
    max-width: min(960px, 96vw);
}

.report-modal-content {
    height: 90vh;
}

.report-modal-header {
    padding: 8px 15px;
}

.report-modal-body {
    flex: 1;
    overflow: hidden;
}

.report-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
}


/* Estado de carga y fondo gris para visor de reportes */
.report-modal-content,
.report-modal-body,
.report-modal-iframe {
    background: #d9d9d9;
}

.report-modal-body {
    position: relative;
}

.report-modal-loader {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #333;
    background: #d9d9d9;
    font-size: 0.9rem;
}

.report-modal.is-loading .report-modal-loader {
    display: flex;
}

.report-modal.is-loading .report-modal-iframe {
    opacity: 0;
}
