/* Clubs Asistencia Profesor - Estilos */

.cbta256-clubs-asistencia-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Header */
.asistencia-header {
    text-align: center;
    margin-bottom: 30px;
}

.asistencia-header h2 {
    color: #2c3e50;
    font-size: 2em;
    margin-bottom: 10px;
}

/* Status Messages */
.status-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1em;
    animation: slideDown 0.3s ease;
}

.status-message.status-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.status-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.status-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Sin Club / Pendiente */
.sin-club-card,
.pendiente-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 40px auto;
}

.sin-club-content {
    color: #7f8c8d;
}

.sin-club-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: #95a5a6;
}

.sin-club-card h3,
.pendiente-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.pendiente-card {
    border: 2px solid #f39c12;
    background-color: #fff9e6;
}

.pendiente-card p {
    color: #856404;
    font-size: 1.1em;
}

/* Club Info Header */
.club-info-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.club-info-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.8em;
}

.cupo-info {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.95;
}

/* Selector de Fecha */
.fecha-selector-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.fecha-selector-container label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1em;
}

#fecha-asistencia {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    color: #2c3e50;
    transition: border-color 0.3s ease;
    flex: 1;
    min-width: 200px;
}

#fecha-asistencia:focus {
    outline: none;
    border-color: #3498db;
}

.btn-cargar-fecha {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.btn-cargar-fecha:hover {
    background-color: #2980b9;
}

/* Tabla de Asistencia */
.lista-alumnos-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

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

.tabla-asistencia {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.tabla-asistencia thead {
    background-color: #34495e;
    color: white;
}

.tabla-asistencia th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95em;
}

.th-asistencia {
    text-align: center !important;
}

.tabla-asistencia tbody tr {
    border-bottom: 1px solid #ecf0f1;
    transition: background-color 0.2s ease;
}

.tabla-asistencia tbody tr:hover {
    background-color: #f8f9fa;
}

.tabla-asistencia tbody tr.guardando {
    background-color: #fff3cd;
}

.tabla-asistencia td {
    padding: 15px;
    color: #2c3e50;
}

.td-checkbox {
    text-align: center;
}

/* Custom Checkbox */
.checkbox-container {
    display: inline-block;
    position: relative;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    display: inline-block;
    width: 28px;
    height: 28px;
    background-color: #ecf0f1;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-container:hover .checkmark {
    border-color: #3498db;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #27ae60;
    border-color: #27ae60;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 9px;
    top: 5px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.no-data {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 40px !important;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.modal-contenido {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}

.modal-contenido h3 {
    color: #e74c3c;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.alumno-nombre-modal,
.fecha-modal {
    font-size: 1.1em;
    margin: 10px 0;
}

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

.btn-confirmar-eliminar,
.btn-cancelar {
    padding: 10px 25px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-confirmar-eliminar {
    background-color: #e74c3c;
    color: white;
}

.btn-confirmar-eliminar:hover {
    background-color: #c0392b;
}

.btn-cancelar {
    background-color: #95a5a6;
    color: white;
}

.btn-cancelar:hover {
    background-color: #7f8c8d;
}

/* Loader */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loader-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

.loader-overlay p {
    margin-top: 20px;
    color: #2c3e50;
    font-size: 1.1em;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .cbta256-clubs-asistencia-wrapper {
        padding: 10px;
    }
    
    .asistencia-header h2 {
        font-size: 1.5em;
    }
    
    .fecha-selector-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    #fecha-asistencia,
    .btn-cargar-fecha {
        width: 100%;
    }
    
    .tabla-asistencia {
        font-size: 0.9em;
    }
    
    .tabla-asistencia th,
    .tabla-asistencia td {
        padding: 10px 8px;
    }
    
    .checkmark {
        width: 24px;
        height: 24px;
    }
    
    .modal-contenido {
        width: 95%;
        padding: 20px;
    }
    
    .modal-acciones {
        flex-direction: column;
    }
    
    .btn-confirmar-eliminar,
    .btn-cancelar {
        width: 100%;
    }
    
    /* Ocultar columna "No." en móvil */
    .tabla-asistencia th:nth-child(1),
    .tabla-asistencia td:nth-child(1) {
        display: none;
    }
    
    /* Hacer nombres más compactos */
    .tabla-asistencia td:nth-child(2) {
        font-size: 0.85em;
        max-width: 150px;
    }
}
