/* ===== Modal Cronograma ===== */
.modal_crono {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5); /* fondo semitransparente */
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal_crono.show {
    display: flex;
    opacity: 1;
}

.modal_crono_content {
    background: #fff;
    border-radius: 1rem;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow-y: auto;
    margin: 1rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal_crono.show .modal_crono_content {
    transform: translateY(0);
}

.modal_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eef2ff;
}

.modal_crono_title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.modal_crono_close {
    font-size: 1.75rem;
    font-weight: 700;
    color: #6b7280;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal_crono_close:hover {
    color: #ef4444;
    background-color: #fef2f2;
}

/* ===== Botón Descargar PDF ===== */
.btn-imprimir {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #059669;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.1);
    margin-bottom: 1.5rem;
    border: 2px solid #059669;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-imprimir:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.2);
    background: #f0fdf4;
    color: #047857;
    border-color: #047857;
}

.btn-imprimir:active {
    transform: translateY(0);
}

/* Elimina o comenta esta regla que añade el emoji */
/*
.btn-imprimir::before {
    content: "📄";
    font-size: 1.125rem;
}
*/

/* Agrega estilos para el icono SVG */
.btn-imprimir-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.btn-imprimir:hover .btn-imprimir-icon {
    transform: scale(1.1);
}

/* ===== Tabla dentro de modal ===== */
.modal_crono_table_wrapper {
    max-height: 500px;
    overflow-y: auto;
    border-radius: 0.75rem;
    margin-top: 1rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.modal_crono_table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
    background: #ffffff;
    
    /* Esto fuerza que todas las columnas tengan ancho equitativo */
    table-layout: fixed;
}

.modal_crono_table th,
.modal_crono_table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    width: 33.33%;
    word-wrap: break-word; /* evita que el texto se salga */
}

.modal_crono_table td {
    font-size: 0.875rem;
    text-align: left;
    line-height: 1.5;
    color: #4b5563;
}

.modal_crono_table th {
    font-size: 0.875rem;
    text-align: center;
    font-weight: 600;
}

.modal_crono_table th {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal_crono_table tr:hover {
    background: #f8fafc;
}

.modal_crono_category .modal_crono_category_label {
    font-weight: 700;
    background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
    color: #006064;
    text-transform: uppercase;
    text-align: center;
    font-size: 0.95rem;
    border-bottom: 2px solid #80deea;
    padding: 12px 16px;
    letter-spacing: 0.5px;
    position: sticky;
    top: 48px; /* Debajo de los headers */
    z-index: 5;
}

/* Mensaje cuando no hay cronogramas */
.modal_crono_content > p {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .modal_crono_content {
        width: 95%;
        padding: 1.5rem;
        margin: 0.5rem;
        max-height: 85vh;
    }
    
    .modal_header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .modal_crono_title {
        font-size: 1.25rem;
    }

    .modal_crono_table th,
    .modal_crono_table td {
        padding: 0.75rem;
        font-size: 0.8125rem;
    }
    
    .btn-imprimir {
        width: 100%;
        justify-content: center;
    }
    
    .modal_crono_close {
        position: absolute;
        right: 1rem;
        top: 1rem;
    }
}

@media (max-width: 480px) {
    .modal_crono_content {
        padding: 1rem;
        max-height: 80vh;
    }

    .modal_crono_table th,
    .modal_crono_table td {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .modal_crono_title {
        font-size: 1.125rem;
    }
    
    .modal_crono_table_wrapper {
        max-height: 400px;
    }
}