/* Checklist Manager Widget Styles */
.checklist-manager-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

.checklist-title {
    margin: 0 0 20px 0;
    font-weight: 600;
}

.checklist-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.checklist-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: #fff;
    position: relative;
    transition: all 0.2s ease;
    outline: none;
}

.checklist-item input[type="checkbox"]:checked {
    background-color: #007cba !important;
    border-color: #007cba !important;
}

.checklist-item input[type="checkbox"]:checked::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 30%;
    width: 25%;
    height: 50%;
    border: solid white !important;
    border-width: 0 2px 2px 0 !important;
    transform: rotate(45deg);
    background: transparent !important;
}

/* Override any conflicting styles */
@supports (-webkit-appearance: none) or (-moz-appearance: none) {
    .checklist-item input[type="checkbox"]:after {
        display: none !important;
        border: none !important;
    }
}

.checklist-item input[type="checkbox"]:hover {
    transform: scale(1.05);
    transition: all 0.2s ease;
}

.checklist-item label {
    cursor: pointer;
    margin: 0;
    line-height: 1.4;
    user-select: none;
    flex: 1;
}

.checklist-item:hover label {
    opacity: 0.8;
}

/* Relayout Checklist Section States */
.relayout_checklist {
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.relayout_checklist.disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(0.3);
}

.relayout_checklist.enabled {
    opacity: 1;
    pointer-events: auto;
    filter: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .checklist-item {
        gap: 8px;
    }
    
    .checklist-item input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }
}

/* Accessibility Improvements */
.checklist-item input[type="checkbox"]:focus {
    outline: 2px solid #005cee;
    outline-offset: 2px;
}

.checklist-item label:focus-within {
    outline: 2px solid #005cee;
    outline-offset: 2px;
    border-radius: 3px;
}

/* Animation for state changes */
.relayout_checklist {
    transform-origin: center;
}

.relayout_checklist.disabled {
    animation: disableSection 0.3s ease-out;
}

.relayout_checklist.enabled {
    animation: enableSection 0.3s ease-out;
}

@keyframes disableSection {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        transform: scale(0.98);
    }
    100% {
        opacity: 0.5;
        transform: scale(1);
    }
}

@keyframes enableSection {
    0% {
        opacity: 0.5;
        transform: scale(0.98);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
