:root {
    --issfa-color: rgba(115, 198, 134, 0.45);
    --ispol-color: rgba(203, 182, 140, 0.45);
    --iess-color: rgba(130, 180, 209, 0.45);
    --naranja-color: rgb(245, 128, 92);
}

.backcolor {
    background: linear-gradient(90deg, #3769b4, #757678);
    min-height: 100vh !important;
    height: 100%;
}

.feriado-evento {
    background: red !important;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feriado-evento::before {
    content: "Día feriado";
}

.fc-event-title {
    font-size: 11px;
}

.disabled-row {
    pointer-events: none;
    cursor: not-allowed;
}

.hidden {
    display: none !important;
}

.modal-body {
    overflow-y: auto;
    max-height: 80vh;
}

.checkbox-disabled {
    pointer-events: none;
    opacity: 1;
}

@media only screen and (max-width: 540px) {
    .div-wrap {
        flex-direction: column;
    }

    .input-group-text,
    .input-txt {
        width: 100% !important;
    }
}

@media only screen and (max-width: 360px) {
    .g-recaptcha {
        transform: scale(0.75);
        transform-origin: 10 0;
    }
}

button.btn.btn-fixed {
    min-width: 90px;
    max-width: 90px;
    width: 90px;
}

.error {
    border: 2px solid red !important;
    background-color: #ffe6e6; /* Opcional: fondo ligeramente rojo */
}

input[type="checkbox"].error {
    outline: 2px solid red;
}

/* Módulo Asistencia */
.fila-editando {
    background-color: #fff3cd !important; /* Amarillo claro */
}

.fila-sin-cobertura {
    background-color: #ff9800 !important; /* Naranja fuerte */
    color: #fff !important; /* Texto blanco */
    font-weight: bold;
}

.btn-fixed-width {
    width: 120px;
    min-width: 120px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

/* Asegura que los íconos y texto estén alineados */
.btn-fixed-width i {
    margin-right: 0.25rem;
}

/* Agregar en tu archivo CSS */
#explorador-dropbox {
    position: relative;
    z-index: 1000;
}

#contenido-carpeta {
    min-height: 200px;
}

.list-group-item {
    cursor: pointer;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

.btn-cita {
    font-size: 0.9rem;   /* Texto más pequeño */
    padding: 0.4rem 0.75rem;  /* Reduce altura del botón */
    width: 80%;          /* Ajusta el ancho (antes usabas w-30) */
    max-width: 160px;    /* Para que no se estire demasiado en pantallas grandes */
}

/* Alto de filas del calendario */
.fc-timegrid-slot {
    height: 20px !important;
}
.fc-timegrid-slot-label {
    line-height: 20px !important;
}

/* Tamaño del calendario MINI */
#calendar-mini .fc-daygrid-day-number {
    font-size: 9px;
    font-weight: 500;
}

#calendar-mini .fc-event-bg {
    opacity: 0.5;
}

#calendar-mini .fc-daygrid-day-frame {
    padding: 1px !important;
}

/* Estilo para indicar que la tabla Reportes está vacía inicialmente */
#tableReportes tbody td {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

/* Mensaje inicial para la tabla Reportes vacía */
.dataTables_empty {
    content: "Haga clic en 'Aplicar Filtros' para cargar los datos";
}

/* Estilos para la tabla */
#tableReportes {
    table-layout: auto !important;
}

#tableReportes th {
    min-width: 100px;
    max-width: 400px;
}

#tableReportes td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Para el contenedor de la tabla */
.dataTables_wrapper {
    position: relative;
}

.dataTables_scroll {
    overflow: auto;
}

/* Cuando el modo responsive está desactivado */
.no-responsive-table {
    overflow-x: auto;
}

.no-responsive-table table {
    min-width: max-content;
}

/* Alertas de caducidad del formulario 053 */
/* Colores básicos */
.text-normal {
    color: #28a745 !important;
}

.text-advertencia {
    color: #fd7e14 !important;
    background-color: #fff3cd;
    padding: 2px 5px;
    border-radius: 3px;
}

.text-peligro {
    color: #dc3545 !important;
    background-color: #f8d7da;
    padding: 2px 5px;
    border-radius: 3px;
}

.text-caducado {
    color: #6c757d !important;
    text-decoration: line-through;
    background-color: #f8f9fa;
    padding: 2px 5px;
    border-radius: 3px;
}

/* Efecto NEON para alerta máxima */
.text-neon {
    animation: neon-pulse 1.5s ease-in-out infinite alternate;
    text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor;
    font-size: 1.1em !important;
}

@keyframes neon-pulse {
    from {
        text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor;
        transform: scale(1);
    }
    to {
        text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor;
        transform: scale(1.02);
    }
}

.text-neon-blink {
    animation: blink-alert 0.8s ease-in-out infinite alternate;
}

@keyframes blink-alert {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Unificación de pacientes IA */
.ia-conversation {
    min-height: 60px;
    border-left: 4px solid #007bff;
    padding-left: 15px;
}

.ia-message {
    font-size: 1.1em;
    line-height: 1.5;
}

.ia-typing {
    display: inline-block;
}

.typing-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background-color: #007bff;
    margin-left: 2px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.ia-thinking {
    color: #6c757d;
    font-style: italic;
}

.ia-success {
    color: #28a745;
}

.ia-warning {
    color: #ffc107;
}

.ia-error {
    color: #dc3545;
}

/* Estilos para el logo del asistente */
.card.bg-light .mr-3 {
    min-width: 100px;
}

/* Asegurar que el texto "Powered by" se vea bien */
.text-muted {
    opacity: 0.8;
}

.min-height-150 {
    min-height: 150px;
}

/* Estilo para los radio buttons seleccionados */
.radioSeleccionaPaciente:checked {
    background-color: #007bff;
    border-color: #007bff;
}

/* Estilo para cuando se está escribiendo */
.typing {
    border-right: 2px solid #007bff;
    animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #007bff; }
}

/* Estilos para el módulo de Pedido Médico */
/* Estilos para campos con error */
.select2-container.error .select2-selection {
    border-color: #dc3545 !important;
}

.icheck-primary.error label {
    color: #dc3545 !important;
}

.icheck-primary.error .icheck-primary > input:first-child + label::before {
    border-color: #dc3545 !important;
}

/* Mejorar la visualización de múltiples órdenes */
table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::after {
    opacity: 1;
    font-size: 0.8em;
}

/* Destacar columnas ordenadas */
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    background-color: rgba(13, 110, 253, 0.1);
    border-left: 3px solid #0d6efd;
}

/* Para suavizar la transición de columnas */
#tableReportes th, #tableReportes td {
    transition: all 0.3s ease;
}

/* Estilos para el gráfico de barras horizontal */
.card-body {
    position: relative;
    overflow: hidden;
}

#pieChart {
    width: 100% !important;
    height: 400px !important;
}

/* Para mejor scroll si hay muchas barras */
.chart-container {
    position: relative;
    height: 400px;
    overflow-y: auto;
}

.fila-alerta-pago-pendiente {
    background-color: #ffcccc !important; /* Rojo claro */
    font-weight: bold;
    border-left: 4px solid #ff0000 !important;
}

.fila-alerta-pago-pendiente:hover {
    background-color: #ffb3b3 !important;
}

/* Para mejor visibilidad */
.fila-alerta-pago-pendiente td {
    color: #cc0000 !important;
}

/* Estilos para mejorar la apariencia */
.bg-light-custom {
    background-color: #f8f9fa !important;
}

.table th {
    font-size: 12px;
    font-weight: 600;
}

.input-group-text {
    min-width: 45px;
    justify-content: center;
}

.form-label {
    font-size: 14px;
    margin-bottom: 8px;
}

/* Estilo para el small box cuando tiene cursor */
.small-box[style*="cursor: pointer"]:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Estilo para la tabla en el modal */
#tablaPacientesCreados th {
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
}

/* Ajustes responsive */
@media (max-width: 768px) {
    .modal-xl {
        max-width: 95%;
    }
    
    .chart-legend {
        font-size: 12px;
    }
}

/* Ajustes para el daterangepicker */
.daterangepicker {
    font-family: inherit;
}

/* Estilo para el botón del date range */
#daterange-pacientes-creados {
    background-color: white;
    border: 1px solid #ced4da;
    padding: 8px 12px;
}

#daterange-pacientes-creados:hover {
    background-color: #f8f9fa;
}

/* Agregar transición suave */
.col-8, .col-10, .col-4, .col-2 {
    transition: all 0.3s ease-in-out;
}

/* Estilos para resaltar filas con códigos duplicados */
#tablaConveniosOS tbody tr.duplicado-warning {
    background-color: #fff3cd !important;
    border-left: 4px solid #ffc107;
}

#tablaConveniosOS tbody tr.duplicado-warning:hover {
    background-color: #ffe69c !important;
}

/* Estilo para el botón de editar en filas duplicadas */
.btn-duplicado {
    animation: pulse 2s infinite;
    position: relative;
}

.btn-duplicado::after {
    content: '⚠️';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 12px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

/* Estilo para el toast de duplicados */
.toast-error {
    background-color: #dc3545 !important;
    border-left: 4px solid #ffc107 !important;
}

.toast-error .toast-title {
    color: #ffc107 !important;
    font-weight: bold;
}

.toast-error .toast-message {
    font-size: 14px;
    line-height: 1.6;
}

.toast-error .toast-message strong {
    color: #ffc107;
}