/* FC Checklist Block */
.wp-block-fca-course-blocks-checklist {
    margin-bottom: var(--fcom-block-spacing, 20px);
}

/* Progress */
.wp-block-fca-course-blocks-checklist .checklist-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--fcom-active-bg, #f6f7f7);
    border-radius: 8px;
}

.wp-block-fca-course-blocks-checklist .progress-bar {
    flex: 1;
    height: 6px;
    background: var(--fcom-secondary-border, #e5e7eb);
    border-radius: 3px;
    overflow: hidden;
}

.wp-block-fca-course-blocks-checklist .progress-fill {
    height: 100%;
    background: var(--fcom-success-color, #10b981);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.wp-block-fca-course-blocks-checklist .progress-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--fcom-secondary-text, #6b7280);
    white-space: nowrap;
}

/* Checklist Items */
.wp-block-fca-course-blocks-checklist .checklist-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wp-block-fca-course-blocks-checklist .checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--fcom-card-bg, var(--fcom-primary-bg, #fff));
    border: 1px solid var(--fcom-primary-border, #e5e7eb);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.wp-block-fca-course-blocks-checklist .checklist-item:hover {
    border-color: var(--fcom-primary-button, #1877F2);
    background: var(--fcom-light-bg, #fafbfc);
}

.wp-block-fca-course-blocks-checklist .checklist-item.is-checked {
    background: var(--fcom-highlight-bg, #f0fdf4);
    border-color: var(--fcom-success-color, #10b981);
}

.wp-block-fca-course-blocks-checklist .checklist-item.is-checked .checklist-text {
    text-decoration: line-through;
    color: var(--fcom-secondary-text, #6b7280);
}

/* Custom Checkbox */
.wp-block-fca-course-blocks-checklist .checklist-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wp-block-fca-course-blocks-checklist .checklist-checkmark {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--fcom-secondary-border, #d1d5db);
    border-radius: 6px;
    background: var(--fcom-primary-bg, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.wp-block-fca-course-blocks-checklist .checklist-checkmark::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid var(--fcom-primary-bg, #fff);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s ease;
}

.wp-block-fca-course-blocks-checklist .checklist-item:hover .checklist-checkmark {
    border-color: var(--fcom-primary-button, #1877F2);
}

.wp-block-fca-course-blocks-checklist .checklist-checkbox:checked + .checklist-checkmark {
    background: var(--fcom-success-color, #10b981);
    border-color: var(--fcom-success-color, #10b981);
}

.wp-block-fca-course-blocks-checklist .checklist-checkbox:checked + .checklist-checkmark::after {
    transform: rotate(45deg) scale(1);
}

/* Text */
.wp-block-fca-course-blocks-checklist .checklist-text {
    flex: 1;
    font-size: 15px;
    line-height: 1.5;
    color: var(--fcom-primary-text, #19283a);
    padding-top: 1px;
}

/* Style: Minimal */
.wp-block-fca-course-blocks-checklist.checklist-style-minimal .checklist-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--fcom-primary-border, #e5e7eb);
    border-radius: 0;
    padding: 12px 0;
}

.wp-block-fca-course-blocks-checklist.checklist-style-minimal .checklist-item:last-child {
    border-bottom: none;
}

.wp-block-fca-course-blocks-checklist.checklist-style-minimal .checklist-item:hover {
    background: transparent;
}

.wp-block-fca-course-blocks-checklist.checklist-style-minimal .checklist-item.is-checked {
    background: transparent;
}

/* Style: Card */
.wp-block-fca-course-blocks-checklist.checklist-style-card {
    background: var(--fcom-card-bg, var(--fcom-primary-bg, #fff));
    border: 1px solid var(--fcom-primary-border, #e5e7eb);
    border-radius: 12px;
    padding: 20px;
}

.wp-block-fca-course-blocks-checklist.checklist-style-card .checklist-progress {
    margin: -20px -20px 20px -20px;
    border-radius: 11px 11px 0 0;
    border-bottom: 1px solid var(--fcom-primary-border, #e5e7eb);
}

.wp-block-fca-course-blocks-checklist.checklist-style-card .checklist-item {
    border: none;
    background: var(--fcom-active-bg, #f6f7f7);
    padding: 10px 12px;
}

.wp-block-fca-course-blocks-checklist.checklist-style-card .checklist-item.is-checked {
    background: var(--fcom-highlight-bg, #ecfdf5);
}

/* Block alignment support */
.wp-block-fca-course-blocks-checklist.alignwide {
    max-width: var(--wp--style--global--wide-size, 1000px);
    margin-left: auto;
    margin-right: auto;
}

.wp-block-fca-course-blocks-checklist.alignfull {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* Disabled Complete Button */
button.fca-checklist-blocked {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Responsive */
@media (max-width: 768px) {
    .wp-block-fca-course-blocks-checklist .checklist-item {
        padding: 10px 12px;
}

    .wp-block-fca-course-blocks-checklist .checklist-text {
        font-size: 14px;
    }
    
    .wp-block-fca-course-blocks-checklist .checklist-checkmark {
        width: 20px;
        height: 20px;
}
}
