/* Custom Checkbox Component */
.custom-checkbox {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 8px;
}

/* Ensure label elements work properly */
label.custom-checkbox {
    margin: 0;
    padding: 0;
}

.custom-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
    margin: 0;
    padding: 0;
}

.custom-checkbox .checkmark {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.custom-checkbox:hover .checkmark {
    border-color: var(--color-secondary);
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: var(--color-secondary);;
    border-color: var(--color-secondary);;
}

.custom-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

/* Animation for smooth transition */
.custom-checkbox .checkmark {
    animation: none;
}

.custom-checkbox input:checked ~ .checkmark {
    animation: checkboxCheck 0.3s ease-in-out;
}

@keyframes checkboxCheck {
    0% {
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Checkbox label styling */
.custom-checkbox .checkbox-label {
    margin-left: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    user-select: none;
}

/* Disabled state */
.custom-checkbox.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.custom-checkbox.disabled .checkmark {
    background-color: #f5f5f5;
    border-color: #d0d0d0;
    cursor: not-allowed;
}

.custom-checkbox.disabled .checkbox-label {
    color: #999;
    cursor: not-allowed;
}

/* Focus state for accessibility */
.custom-checkbox input:focus ~ .checkmark {
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3);
    outline: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .custom-checkbox .checkmark {
        width: 18px;
        height: 18px;
    }
    
    .custom-checkbox .checkmark:after {
        left: 5px;
        top: 1px;
        width: 5px;
        height: 9px;
    }
    
    .custom-checkbox .checkbox-label {
        font-size: 13px;
    }
}