/* Checklist Block Styles */
.checklist-block {
    padding: 20px;
    margin: 20px 0;
}

.checklist-block__heading {
    margin: 0 0 20px 0;
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
}

.checklist-block__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.checklist-block__item {
    margin: 0 0 12px 0;
    padding: 0;
    transition: opacity 0.3s ease;
}

.checklist-block__label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
}

/* Hide default checkbox */
.checklist-block__checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Custom checkbox */
.checklist-block__checkbox-custom {
    position: relative;
    display: inline-block;
    width: 22px;
    height: 22px;
    min-width: 22px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.checklist-block__checkbox-custom::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Hover state */
.checklist-block__label:hover .checklist-block__checkbox-custom {
    border-color: #999;
}

/* Checked state */
.checklist-block__checkbox:checked ~ .checklist-block__checkbox-custom {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

.checklist-block__checkbox:checked ~ .checklist-block__checkbox-custom::after {
    display: block;
}

/* Text styling */
.checklist-block__text {
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    transition: all 0.3s ease;
}

/* Checked text - strikethrough and fade */
.checklist-block__checkbox:checked ~ .checklist-block__text {
    text-decoration: line-through;
    color: #999;
    opacity: 0.6;
}

/* Empty state */
.checklist-block__empty {
    color: #999;
    font-style: italic;
    margin: 0;
}

/* Alignment Classes */
.checklist-block.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.checklist-block.alignfull {
    max-width: 100%;
}

/* Editor Styles */
.block-editor-block-list__block[data-type="acf/checklist"] {
    margin: 20px 0;
}

/* Animation for checking */
@keyframes checkBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.checklist-block__checkbox:checked ~ .checklist-block__checkbox-custom {
    animation: checkBounce 0.3s ease;
}
