/* --- AULAQUEST ACTIVITY STYLES v1.0 (COMPLETO) --- */

/* =========================================
   1. LAYOUT & DRAWER (Panel Deslizante)
   ========================================= */

/* Contenedor principal de la simulación */
#view-simulation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: width 0.3s ease;
}

/* El Panel Drawer (Oculto a la derecha por defecto) */
.activity-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: calc(100% - 60px); /* Restamos altura de tabs móviles por defecto */
    background: #ffffff;
    color: #111827;
    z-index: 50;
    
    /* Animación de deslizamiento */
    transform: translateX(100%); 
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}

/* Área de contenido con scroll independiente */
.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    position: relative;
    background: #f8fafc; /* Fondo gris muy suave */
}

/* Botón Pestaña/Tirador (Solo visible en PC) */
.drawer-toggle {
    display: none; /* Se activa en media queries */
    position: absolute;
    top: 20px;
    left: -120px; /* Lo sacamos fuera del panel hacia la izquierda */
    width: 120px;
    height: 44px;
    background: #3B82F6; /* Azul Aulaquest */
    color: white;
    border: none;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: -4px 4px 10px rgba(0,0,0,0.1);
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, left 0.3s;
    z-index: 51;
}

.drawer-toggle:hover {
    background: #2563eb;
}

/* =========================================
   2. NAVEGACIÓN MÓVIL (Tabs Inferiores)
   ========================================= */
.mobile-tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #1e293b; /* Panel oscuro */
    display: flex;
    border-top: 1px solid #334155;
    z-index: 60;
}

.tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s;
}

.tab-btn.active {
    color: #3B82F6;
    background: rgba(59, 130, 246, 0.1);
}

.tab-btn i {
    font-size: 1.2rem;
}

/* =========================================
   3. RESPONSIVE (Media Queries)
   ========================================= */

/* DESKTOP (Pantallas grandes > 1024px) */
@media (min-width: 1024px) {
    .mobile-tabs {
        display: none; /* Ocultamos tabs */
    }

    .activity-drawer {
        width: 500px; /* Ancho fijo cómodo para leer */
        height: 100vh; /* Altura completa */
        transform: translateX(100%); /* Estado cerrado */
    }

    .activity-drawer.is-open {
        transform: translateX(0); /* Estado abierto */
    }

    .drawer-toggle {
        display: flex; /* Mostramos el botón pestaña */
    }
}

/* MOBILE (< 1023px) */
@media (max-width: 1023px) {
    .activity-drawer {
        transform: translateX(100%);
        transition: none; /* Sin animación al cambiar de tab para que sea instantáneo */
    }

    .activity-drawer.mobile-active {
        transform: translateX(0);
    }

    #view-simulation {
        height: calc(100vh - 60px); /* Dejamos hueco para la barra inferior */
    }
}

/* =========================================
   4. ESTILOS DE ACTIVIDAD Y CUESTIONARIOS
   ========================================= */

/* Formulario de Acceso (Candado) */
.aq-access-form-container {
    max-width: 400px;
    margin: 4rem auto;
    text-align: center;
    padding: 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.aq-access-form-container input {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-align: center;
    outline: none;
}

.aq-access-form-container input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.aq-access-form-container button {
    width: 100%;
    padding: 12px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    transition: 0.2s;
    cursor: pointer;
    font-size: 1rem;
}

.aq-access-form-container button:hover {
    background: #4338ca;
}

/* Cabecera de Actividad */
.aq-activity-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

/* Tarjetas de Información (Curso, Duración) */
.aq-info-cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.info-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.info-card .label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.info-card .value {
    font-weight: 700;
    color: #334155;
    font-size: 1rem;
    margin-top: 4px;
}

/* Pasos del Quiz */
.quiz-step {
    background: #fff;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.quiz-step h3, .quiz-step .block-title {
    color: #4f46e5;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.enunciado {
    font-size: 1rem;
    color: #1e293b;
    margin-bottom: 15px;
    line-height: 1.6;
    font-weight: 500;
}

/* Imágenes en enunciados */
.enunciado-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    margin-bottom: 1.5rem;
}

.enunciado-gallery img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    transition: border-color 0.2s;
}

.enunciado-gallery img:hover {
    border-color: #4f46e5;
}

/* Inputs: Radio y Checkbox */
.quiz-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-options-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    color: #334155;
}

.quiz-options-list label:hover {
    border-color: #4f46e5;
    background: #eef2ff;
}

.quiz-options-list input:checked + span {
    color: #4f46e5;
    font-weight: 600;
}

/* Tablas Responsive */
.tabla-respuesta-wrapper {
    overflow-x: auto;
    padding-bottom: 5px;
    margin-top: 10px;
}

.tabla-respuesta {
    width: 100%;
    min-width: 400px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tabla-respuesta th {
    background: #f1f5f9;
    padding: 10px;
    text-align: center;
    border: 1px solid #cbd5e1;
    font-weight: 600;
    color: #475569;
    font-size: 0.85rem;
}

.tabla-respuesta td {
    padding: 5px;
    border: 1px solid #cbd5e1;
    background: #fff;
}

.tabla-respuesta input {
    width: 100%;
    padding: 8px;
    border: 1px solid transparent;
    text-align: center;
    outline: none;
    transition: background 0.2s;
    background: transparent;
}

.tabla-respuesta input:focus {
    background: #f0f9ff;
    border-color: #3b82f6;
}

/* Mensajes de Feedback */
#submit-feedback {
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.text-green-600 { color: #16a34a; }
.text-red-500 { color: #ef4444; }
.bg-red-50 { background-color: #fef2f2; }
.border-red-200 { border-color: #fecaca; }