/**
 * Multiple Response Block - Académie des Étoiles
 * Multiple-answer checkbox question
 */

/* ========================================
   BASE STYLES (inherits most from multiple choice)
   ======================================== */

.ade-multiple-response {
    margin: var(--ade-space-2xl) 0;
}

.ade-multiple-response__question-card {
    /* Removed bulky white wrapper - clean minimal style */

    margin: var(--ade-space-xl) 0;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.ade-multiple-response__question-card--correct {
    border-color: #10b981;
}

.ade-multiple-response__question-card--incorrect {
    border-color: #ef4444;
}

/* Header with badge */
.ade-multiple-response__header {
    margin-bottom: var(--ade-space-lg);
}

.ade-multiple-response__badge {
    display: inline-block;
    padding: var(--ade-space-xs) var(--ade-space-md);
    background: linear-gradient(135deg, #FF7500 0%, #e06800 100%);
    color: var(--ade-white);
    border-radius: 20px;
    font-size: var(--ade-font-size-small);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Question text */
.ade-multiple-response__question {
    font-size: var(--ade-font-size-large);
    font-weight: 600;
    color: var(--ade-primary-dark);
    margin: 0 0 var(--ade-space-md) 0;
    line-height: 1.4;
}

/* Hint */
.ade-multiple-response__hint {
    display: flex;
    align-items: center;
    gap: var(--ade-space-xs);
    padding: var(--ade-space-sm) var(--ade-space-md);
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 6px;
    font-size: var(--ade-font-size-small);
    color: #92400e;
    margin-bottom: var(--ade-space-xl);
}

.ade-multiple-response__hint-icon {
    font-size: 16px;
    line-height: 1;
}

/* Form */
.ade-multiple-response__form {
    margin-bottom: 0;
}

/* Options container */
.ade-multiple-response__options {
    display: flex;
    flex-direction: column;
    gap: var(--ade-space-md);
    margin-bottom: var(--ade-space-xl);
}

/* Individual option */
.ade-multiple-response__option {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--ade-space-md);
    padding: var(--ade-space-lg);
    background: var(--ade-gray-lighter);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.ade-multiple-response__option:hover {
    background: var(--ade-primary-light);
    border-color: var(--ade-primary);
}

.ade-multiple-response__option:focus-within {
    outline: 2px solid var(--ade-primary);
    outline-offset: 2px;
}

/* Hide native checkbox */
.ade-multiple-response__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom checkbox */
.ade-multiple-response__checkbox {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 2px solid var(--ade-gray);
    border-radius: 6px;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ade-multiple-response__input:checked + .ade-multiple-response__checkbox {
    border-color: var(--ade-primary);
    background: var(--ade-primary);
}

.ade-multiple-response__checkmark {
    display: none;
}

.ade-multiple-response__input:checked + .ade-multiple-response__checkbox .ade-multiple-response__checkmark {
    display: block;
}

/* Option text */
.ade-multiple-response__option-text {
    flex: 1;
    font-size: var(--ade-font-size-base);
    line-height: 1.6;
    color: var(--ade-gray-dark);
}

/* Option feedback icon (shown after submission) */
.ade-multiple-response__option-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: none;
}

/* Answered states */
.ade-multiple-response__option--correct {
    background: #d1fae5;
    border-color: #10b981;
}

.ade-multiple-response__option--correct:hover {
    background: #d1fae5;
    border-color: #10b981;
}

.ade-multiple-response__option--correct .ade-multiple-response__option-icon {
    display: block;
}

.ade-multiple-response__option--correct .ade-multiple-response__option-icon::after {
    content: "✓";
    color: #10b981;
    font-size: 20px;
    font-weight: 700;
}

.ade-multiple-response__option--incorrect {
    background: #fee2e2;
    border-color: #ef4444;
}

.ade-multiple-response__option--incorrect:hover {
    background: #fee2e2;
    border-color: #ef4444;
}

.ade-multiple-response__option--incorrect .ade-multiple-response__option-icon {
    display: block;
}

.ade-multiple-response__option--incorrect .ade-multiple-response__option-icon::after {
    content: "✗";
    color: #ef4444;
    font-size: 20px;
    font-weight: 700;
}

/* Disabled state after answering */
.ade-multiple-response__option--disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.ade-multiple-response__option--disabled:hover {
    background: var(--ade-gray-lighter);
    border-color: transparent;
}

/* Actions */
.ade-multiple-response__actions {
    display: flex;
    justify-content: center;
}

/* Submit button */
.ade-multiple-response__submit {
    padding: var(--ade-space-md) var(--ade-space-2xl);
    background: linear-gradient(135deg, var(--ade-primary) 0%, var(--ade-primary-dark) 100%);
    color: var(--ade-white);
    border: none;
    border-radius: 8px;
    font-size: var(--ade-font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--ade-shadow-sm);
}

.ade-multiple-response__submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--ade-shadow-md);
}

.ade-multiple-response__submit:active:not(:disabled) {
    transform: translateY(0);
}

.ade-multiple-response__submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ade-multiple-response__submit:focus {
    outline: 2px solid var(--ade-primary);
    outline-offset: 2px;
}

/* Feedback area */
.ade-multiple-response__feedback {
    margin-top: var(--ade-space-xl);
    padding: var(--ade-space-lg);
    border-radius: 12px;
    animation: fadeIn 0.3s ease;
}

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

.ade-multiple-response__feedback--correct {
    background: #d1fae5;
    border-left: 4px solid #10b981;
}

.ade-multiple-response__feedback--incorrect {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
}

/* Feedback header */
.ade-multiple-response__feedback-header {
    display: flex;
    align-items: center;
    gap: var(--ade-space-sm);
    margin-bottom: var(--ade-space-md);
}

.ade-multiple-response__feedback-icon {
    font-size: 24px;
    line-height: 1;
}

.ade-multiple-response__feedback-text {
    font-size: var(--ade-font-size-medium);
    font-weight: 600;
}

.ade-multiple-response__feedback--correct .ade-multiple-response__feedback-icon::after {
    content: "✓";
    color: #10b981;
}

.ade-multiple-response__feedback--correct .ade-multiple-response__feedback-text {
    color: #065f46;
}

.ade-multiple-response__feedback--incorrect .ade-multiple-response__feedback-icon::after {
    content: "✗";
    color: #ef4444;
}

.ade-multiple-response__feedback--incorrect .ade-multiple-response__feedback-text {
    color: #991b1b;
}

/* Explanation */
.ade-multiple-response__explanation {
    font-size: var(--ade-font-size-base);
    line-height: 1.6;
    color: var(--ade-gray-dark);
    margin-bottom: var(--ade-space-md);
}

.ade-multiple-response__explanation strong {
    color: var(--ade-primary-dark);
}

/* Retry button */
.ade-multiple-response__retry-container {
    margin-top: var(--ade-space-md);
}

.ade-multiple-response__retry {
    padding: var(--ade-space-sm) var(--ade-space-lg);
    background: var(--ade-white);
    color: var(--ade-primary);
    border: 2px solid var(--ade-primary);
    border-radius: 8px;
    font-size: var(--ade-font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ade-multiple-response__retry:hover {
    background: var(--ade-primary);
    color: var(--ade-white);
}

.ade-multiple-response__retry:focus {
    outline: 2px solid var(--ade-primary);
    outline-offset: 2px;
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */

@media screen and (max-width: 768px) {
    .ade-multiple-response__question-card {
        padding: var(--ade-space-xl);
    }

    .ade-multiple-response__question {
        font-size: var(--ade-font-size-medium);
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media screen and (max-width: 480px) {
    .ade-multiple-response__question-card {
        padding: var(--ade-space-lg);
        border-radius: 12px;
    }

    .ade-multiple-response__question {
        font-size: var(--ade-font-size-base);
    }

    .ade-multiple-response__option {
        padding: var(--ade-space-md);
        gap: var(--ade-space-sm);
    }

    .ade-multiple-response__option-text {
        font-size: var(--ade-font-size-small);
    }

    .ade-multiple-response__submit {
        width: 100%;
        padding: var(--ade-space-md);
    }
}

/* ========================================
   PRINT
   ======================================== */

@media print {
    .ade-multiple-response__question-card {
        box-shadow: none;
        border: 1px solid var(--ade-gray);
        page-break-inside: avoid;
    }

    .ade-multiple-response__submit,
    .ade-multiple-response__retry {
        display: none;
    }

    .ade-multiple-response__feedback {
        page-break-inside: avoid;
    }
}
