/* --- Styles for Interactive Question Elements --- */

.options-container { 
    display: flex; 
    flex-direction: column; 
    gap: 0.8rem; 
    margin-top: 1.5rem; 
    align-items: center; 
}
.option-btn { 
    background-color: var(--color-secundario); 
    color: var(--text-option); 
    width: 100%; 
    max-width: 500px; 
    text-align: center; 
    padding: 1rem; 
    border: 2px solid var(--color-borde-suave); 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
    border-radius: 8px; 
    font-weight: 600; 
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out; 
}
.option-btn:not([disabled]):hover { 
    border-color: var(--color-primario);
    background-color: #f5f6ff;
    transform: translateY(-2px);
}
.option-btn[disabled] {
    cursor: not-allowed;
    opacity: 0.8;
}
.option-btn.correct {
    background-color: #ecfdf5;
    border-color: var(--color-acento-correcto);
    color: #065f46;
}
.option-btn.incorrect {
    background-color: #fef2f2;
    border-color: var(--color-acento-incorrecto);
    color: #991b1b;
    opacity: 0.7;
}

.fill-blank-container,
.drag-drop-container,
.pairing-container,
/* START: MODIFICATION - Added application question container */
.application-question-container {
/* END: MODIFICATION */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin: 1.5rem auto 0 auto;
    width: 100%;
}

.fill-blank-inner {
    display: flex;
    /* START: MODIFICATION - Added flex-wrap */
    flex-wrap: wrap;
    /* END: MODIFICATION */
    gap: 0.75rem;
    width: 100%;
    max-width: 500px;
}
.respuesta-input {
    flex-grow: 1;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid var(--color-borde-suave);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    /* START: MODIFICATION - Added min-width */
    min-width: 150px;
    /* END: MODIFICATION */
}
.respuesta-input:focus {
    outline: none;
    border-color: var(--color-primario);
}
.btn-verify {
    background-color: var(--color-primario);
    color: white;
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    /* START: MODIFICATION - Added flex-grow */
    flex-grow: 1;
    /* END: MODIFICATION */
}

/* --- INICIO: CORRECCIÓN DE DISEÑO PARA PREGUNTAS DE EMPAREJAR --- */
.pairing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 600px;
    align-items: center;
}
.pairing-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    align-items: center;
}
.pairing-item label {
    font-weight: 600;
    padding: 1rem;
    background-color: #f8fafc;
    border: 2px solid var(--color-borde-suave);
    border-radius: 8px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}
.pairing-item select {
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid var(--color-borde-suave);
    border-radius: 8px;
    background-color: var(--color-secundario);
    width: 100%;
}
/* --- FIN: CORRECCIÓN DE DISEÑO --- */

/* --- INICIO: NUEVOS ESTILOS PARA DRAG AND DROP --- */
.drop-zone {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 500px;
    padding: 0; /* Quitamos padding para que los items ocupen todo el ancho */
    border: none; /* Quitamos el borde punteado */
    list-style-type: none; /* Quitamos los números de la lista */
    counter-reset: drag-item-counter; /* Iniciamos un contador */
}

.drag-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: white;
    border: 1px solid var(--color-borde-suave);
    border-radius: 8px;
    cursor: grab;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s ease, background-color 0.2s ease;
    position: relative;
    counter-increment: drag-item-counter; /* Incrementamos el contador por cada item */
}

/* Añadimos el número usando un pseudo-elemento */
.drag-item::before {
    content: counter(drag-item-counter);
    font-weight: 700;
    color: var(--color-primario);
    background-color: #eef2ff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.drag-item:active {
    cursor: grabbing;
}

.drag-item.dragging {
    opacity: 0.5;
    background-color: #eef2ff;
    box-shadow: 0 8px 15px rgba(88,103,221,0.2);
}

.drag-handle {
    color: var(--color-terciario);
    cursor: grab;
}
.drag-handle svg {
    width: 24px;
    height: 24px;
}
.drag-text {
    flex-grow: 1;
    font-weight: 600;
}
/* --- FIN: NUEVOS ESTILOS PARA DRAG AND DROP --- */

/* Media Queries */
@media (min-width: 768px) {
    .pairing-item {
        grid-template-columns: 1fr auto; /* Ajusta las columnas para alinear en la misma línea */
        gap: 1.5rem; /* Aumenta el espacio entre el label y el select */
    }
     /* --- FIN: CORRECCIÓN DE DISEÑO --- */
}