/**
 * English Level Test — Widget Styles
 *
 * Todos los estilos están encapsulados bajo .elt-widget para evitar
 * conflictos con el tema activo de WordPress.
 */

/* ==========================================================================
   Contenedor principal
   ========================================================================== */

.elt-widget {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #2c2c2c;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 32px;
    max-width: 680px;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.elt-widget *,
.elt-widget *::before,
.elt-widget *::after {
    box-sizing: inherit;
}

.elt-widget.elt-error {
    border-color: #e53e3e;
    background-color: #fff5f5;
    color: #c53030;
    text-align: center;
    padding: 24px;
}

/* ==========================================================================
   Indicador de progreso
   ========================================================================== */

.elt-widget .elt-progress-bar {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.elt-widget .elt-progress {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    background-color: #f4f4f4;
    border-radius: 20px;
    padding: 4px 12px;
    letter-spacing: 0.02em;
}

/* ==========================================================================
   Área de pregunta
   ========================================================================== */

.elt-widget .elt-question-area {
    margin-bottom: 20px;
}

.elt-widget .elt-question-text {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

/* ==========================================================================
   Opciones de selección múltiple
   ========================================================================== */

.elt-widget .elt-options {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.elt-widget .elt-option {
    margin: 0;
    padding: 0;
}

.elt-widget .elt-option-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    color: #2c2c2c;
    background-color: #fafafa;
    border: 2px solid #d8d8d8;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
    line-height: 1.5;
}

.elt-widget .elt-option-btn:hover {
    border-color: #4a90d9;
    background-color: #f0f7ff;
    color: #1a1a1a;
}

.elt-widget .elt-option-btn:focus {
    outline: 3px solid #4a90d9;
    outline-offset: 2px;
}

.elt-widget .elt-option-btn.elt-selected {
    border-color: #2563eb;
    background-color: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

.elt-widget .elt-option-btn.elt-selected:hover {
    border-color: #1d4ed8;
    background-color: #dbeafe;
}

/* Feedback de autocorrección */
.elt-widget .elt-option-btn.elt-feedback-correct {
    border-color: #16a34a;
    background-color: #f0fdf4;
    color: #15803d;
    font-weight: 600;
}

.elt-widget .elt-option-btn.elt-feedback-incorrect {
    border-color: #dc2626;
    background-color: #fef2f2;
    color: #b91c1c;
    font-weight: 600;
}

/* ==========================================================================
   Textarea — texto libre
   ========================================================================== */

.elt-widget .elt-free-text {
    display: block;
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    color: #2c2c2c;
    background-color: #fafafa;
    border: 2px solid #d8d8d8;
    border-radius: 6px;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    line-height: 1.6;
}

.elt-widget .elt-free-text:focus {
    outline: none;
    border-color: #4a90d9;
    background-color: #ffffff;
}

.elt-widget .elt-free-text::placeholder {
    color: #aaa;
}

/* ==========================================================================
   Contador de caracteres
   ========================================================================== */

.elt-widget .elt-char-counter {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #888;
    margin-top: 6px;
}

/* ==========================================================================
   Mensaje de validación
   ========================================================================== */

.elt-widget .elt-validation-message {
    font-size: 14px;
    color: #c53030;
    background-color: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 5px;
    padding: 10px 14px;
    margin-bottom: 16px;
}

/* ==========================================================================
   Botón de avance
   ========================================================================== */

.elt-widget .elt-btn-next {
    display: inline-block;
    padding: 12px 28px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 600;
    color: #ffffff;
    background-color: var(--elt-primary-color, #2563eb);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
    margin-top: 8px;
}

.elt-widget .elt-btn-next:hover {
    filter: brightness(0.9);
}

.elt-widget .elt-btn-next:active {
    filter: brightness(0.8);
    transform: translateY(1px);
}

.elt-widget .elt-btn-next:focus {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

/* ==========================================================================
   Pantalla de confirmación
   ========================================================================== */

.elt-widget .elt-confirmation {
    text-align: center;
    padding: 24px 16px;
}

.elt-widget .elt-confirmation-message {
    font-size: 16px;
    color: #2c2c2c;
    line-height: 1.7;
    margin: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 480px) {
    .elt-widget {
        padding: 20px 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .elt-widget .elt-question-text {
        font-size: 16px;
    }

    .elt-widget .elt-btn-next {
        width: 100%;
        text-align: center;
    }
}
