/**
 * CSS: Shortcode Reinscripción
 * Estilos para el sistema de consulta de reinscripción
 */

/* Contenedor principal */
.cbta256-reinscripcion-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

/* Secciones generales */
.reinscripcion-seccion {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.reinscripcion-seccion h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #0D0D6B;
    font-size: 1.4em;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

/* ========================================
   SECCIÓN 1: Búsqueda por CURP
   ======================================== */
.seccion-busqueda {
    color: #0D0D6B;
    border: none;
    background: linear-gradient(135deg, #A3C6FD 0%, #C2E8FD 100%);
    border-radius: 10px;
}

.seccion-busqueda h3 {
    color: #0D0D6B;;
    border-bottom: 2px solid rgba(13,13,107,0.3);
}

.curp-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.curp-input-group label {
    font-weight: bold;
    font-size: 1.1em;
}

.curp-input {
    padding: 12px;
    font-size: 1em;
    border: 2px solid #fff;
    border-radius: 5px;
    text-transform: uppercase;
    width: 100%;
    max-width: 400px;
}

.btn-buscar {
    padding: 12px 30px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    max-width: 200px;
}

.btn-buscar:hover {
    background: #218838;
}

.mensaje-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 5px;
    margin-top: 10px;
    border: 1px solid #f5c6cb;
}

/* ========================================
   SECCIÓN 2: Datos del Alumno
   ======================================== */
.alumno-info-card {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.alumno-foto {
    flex-shrink: 0;
}

.alumno-foto img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid #0073aa;
}

.alumno-detalles h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.3em;
}

.alumno-salon {
    margin: 0;
    color: #666;
    font-size: 1.1em;
    font-weight: bold;
}

/* ========================================
   SECCIÓN 3: Calificaciones
   ======================================== */
.ciclo-escolar-label {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #555;
}

.tabla-responsive {
    overflow-x: auto;
}

.tabla-calificaciones {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.tabla-calificaciones thead {
    background: #0073aa;
    color: #fff;
}

.tabla-calificaciones th,
.tabla-calificaciones td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

.tabla-calificaciones th {
    font-weight: bold;
    font-size: 0.95em;
}

.tabla-calificaciones tbody tr:hover {
    opacity: 0.9;
}

/* Colores de fondo para filas de calificaciones */
.row-liberada {
    background-color: #d4edda !important; /* Verde tenue */
}

.row-adeudo {
    background-color: #fff3cd !important; /* Amarillo */
}

.row-reprobada {
    background-color: #f8d7da !important; /* Rojo */
}

/* ========================================
   SECCIÓN 4: Liberaciones Escolares
   ======================================== */
.mensaje-info {
    background: #d1ecf1;
    color: #0c5460;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #bee5eb;
    text-align: center;
}

.tabla-liberaciones {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.tabla-liberaciones thead {
    background: #17a2b8;
    color: #fff;
}

.tabla-liberaciones th,
.tabla-liberaciones td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

.tabla-liberaciones th {
    font-weight: bold;
}

/* ========================================
   SECCIÓN 5: Materias Reprobadas
   ======================================== */
.seccion-verde {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.seccion-amarilla {
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.seccion-roja {
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.mensaje-sin-adeudo {
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    color: #155724;
    padding: 15px;
}

.lista-reprobadas {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.lista-reprobadas li {
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.7);
    border-radius: 5px;
    border-left: 4px solid #dc3545;
}

/* ========================================
   SECCIÓN 6: Status de Reinscripción
   ======================================== */
.status-apto {
    background-color: #d4edda;
    border-color: #c3e6cb;
    text-align: center;
}

.status-apto-contenido {
    padding: 20px;
}

.mensaje-apto {
    font-size: 1.3em;
    font-weight: bold;
    color: #155724;
    margin-bottom: 20px;
}

.btn-generar {
    padding: 15px 40px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-generar:hover {
    background: #218838;
}

.status-no-apto {
    text-align: center;
    padding: 20px;
}

.mensaje-no-apto {
    font-size: 1.2em;
    color: #721c24;
    font-weight: bold;
}

.status-con-folio {
    text-align: center;
    padding: 20px;
    background: #e7f3ff;
    border-radius: 8px;
}

.folio-generado {
    font-size: 1.3em;
    color: #004085;
}

.folio-generado strong {
    color: #0056b3;
    font-size: 1.4em;
}

/* ========================================
   LOADER
   ======================================== */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #0073aa;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-overlay p {
    color: #fff;
    margin-top: 20px;
    font-size: 1.2em;
}

/* ========================================
   MODALES
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-contenido {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-contenido h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.modal-mensaje-confirmacion p {
    margin: 15px 0;
    line-height: 1.6;
}

.mensaje-reprobadas {
    background: #fff3cd;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #ffc107;
    margin-top: 15px;
}

.modal-acciones {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.btn-confirmar {
    padding: 12px 30px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-confirmar:hover {
    background: #218838;
}

.btn-cancelar {
    padding: 12px 30px;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-cancelar:hover {
    background: #5a6268;
}

.resultado-folio {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.resultado-folio p {
    margin: 10px 0;
    font-size: 1.1em;
}

.resultado-folio strong {
    color: #0073aa;
}

.resultado-folio ul {
    margin: 10px 0;
    padding-left: 20px;
}

.resultado-folio ul li {
    margin: 5px 0;
}

.mensaje-correo {
    background: #d1ecf1;
    color: #0c5460;
    padding: 12px;
    border-radius: 5px;
    margin-top: 15px;
    border: 1px solid #bee5eb;
    text-align: center;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .cbta256-reinscripcion-wrapper {
        padding: 10px;
    }
    
    .alumno-info-card {
        flex-direction: column;
        text-align: center;
    }
    
    .alumno-foto img {
        width: 100px;
        height: 100px;
    }
    
    .tabla-calificaciones,
    .tabla-liberaciones {
        font-size: 0.9em;
    }
    
    .tabla-calificaciones th,
    .tabla-calificaciones td,
    .tabla-liberaciones th,
    .tabla-liberaciones td {
        padding: 8px 5px;
    }
    
    .modal-contenido {
        padding: 20px;
    }
    
    .modal-acciones {
        flex-direction: column;
    }
    
    .btn-confirmar,
    .btn-cancelar {
        width: 100%;
    }
}
