/**
 * Checkbox List Block - Académie des Étoiles
 * Interactive checklist with localStorage persistence
 */

.ade-checkbox-list {
    /* Removed bulky white wrapper - clean minimal style */
    margin: var(--ade-space-xl) 0;
}

/* Optional title */
.ade-checkbox-list__title {
    font-size: var(--ade-font-size-medium);
    font-weight: 700;
    color: var(--ade-gray-dark);
    margin: 0 0 var(--ade-space-lg) 0;
}

/* List */
.ade-checkbox-list__list {
    margin: 0 0 var(--ade-space-lg) 0;
    padding: 0;
    list-style: none;
}

/* List item */
.ade-checkbox-list__item {
    margin-bottom: var(--ade-space-sm);
}

.ade-checkbox-list__item:last-child {
    margin-bottom: 0;
}

/* Label (clickable area) */
.ade-checkbox-list__label {
    display: flex;
    align-items: flex-start;
    gap: var(--ade-space-md);
    cursor: pointer;
    padding: var(--ade-space-sm);
    border-radius: 8px;
    transition: background var(--ade-transition-fast);
}

.ade-checkbox-list__label:hover {
    background: rgba(155, 81, 224, 0.05);
}

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

/* Custom checkbox */
.ade-checkbox-list__checkbox {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 2px solid var(--ade-gray);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--ade-transition-base);
    background: var(--ade-white);
}

/* Checkmark (hidden by default) */
.ade-checkbox-list__checkmark {
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--ade-transition-fast);
    color: var(--ade-white);
}

/* Checked state */
.ade-checkbox-list__input:checked + .ade-checkbox-list__checkbox {
    background: var(--ade-primary);
    border-color: var(--ade-primary);
}

.ade-checkbox-list__input:checked + .ade-checkbox-list__checkbox .ade-checkbox-list__checkmark {
    opacity: 1;
    transform: scale(1);
}

/* Focus state */
.ade-checkbox-list__input:focus + .ade-checkbox-list__checkbox {
    outline: 2px solid var(--ade-primary);
    outline-offset: 2px;
}

/* Item text */
.ade-checkbox-list__text {
    font-size: var(--ade-font-size-base);
    line-height: 1.6;
    color: var(--ade-gray-dark);
    transition: all var(--ade-transition-base);
}

/* Checked text styling */
.ade-checkbox-list__input:checked ~ .ade-checkbox-list__text {
    color: var(--ade-gray-medium);
    text-decoration: line-through;
    opacity: 0.7;
}

/* Progress section */
.ade-checkbox-list__progress {
    padding-top: var(--ade-space-lg);
    border-top: 1px solid var(--ade-gray-light);
}

.ade-checkbox-list__progress-text {
    display: block;
    font-size: 15px;
    color: var(--ade-gray-dark);
    margin-bottom: var(--ade-space-sm);
}

.ade-checkbox-list__progress-text strong {
    color: var(--ade-primary);
    font-weight: 600;
}

/* Progress bar */
.ade-checkbox-list__progress-bar {
    width: 100%;
    height: 8px;
    background: var(--ade-gray-light);
    border-radius: 4px;
    overflow: hidden;
}

.ade-checkbox-list__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ade-primary) 0%, var(--ade-primary-dark) 100%);
    border-radius: 4px;
    transition: width 0.3s ease-in-out;
}

/* Responsive - mobile */
@media screen and (max-width: 480px) {
    .ade-checkbox-list {
        padding: var(--ade-space-lg);
    }

    .ade-checkbox-list__title {
        font-size: 18px;
    }

    .ade-checkbox-list__label {
        gap: var(--ade-space-sm);
    }

    .ade-checkbox-list__text {
        font-size: 15px;
    }
}

/* Print */
@media print {
    .ade-checkbox-list {
        box-shadow: none;
        border: 1px solid var(--ade-gray);
        page-break-inside: avoid;
    }

    .ade-checkbox-list__progress {
        display: none;
    }
}
