/* Active Checkbox Styling */
input[name="is_active"],
input[name="active"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    width: 18px !important;
    height: 18px !important;
    cursor: pointer !important;
    border: 2px solid #6b7280 !important;
    border-radius: 4px !important;
    background-color: #f3f4f6 !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
}

input[name="is_active"]:hover,
input[name="active"]:hover {
    border-color: #374151 !important;
}

input[name="is_active"]:checked,
input[name="active"]:checked {
    background-color: #1e3a8a !important;
    border-color: #0c2340 !important;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1) !important;
}

input[name="is_active"]:checked::after,
input[name="active"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

input[name="is_active"]:disabled,
input[name="active"]:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Label styling for is_active and active checkbox */
label:has(input[name="is_active"]),
label:has(input[name="active"]) {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: all 0.3s ease !important;
}

input[name="is_active"]:checked + span,
input[name="active"]:checked + span {
    color: #1e3a8a !important;
    font-weight: 600 !important;
}

/* Focus state for accessibility */
input[name="is_active"]:focus,
input[name="active"]:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.2), 0 0 0 2px #1e3a8a !important;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    input[name="is_active"],
    input[name="active"] {
        background-color: #374151 !important;
        border-color: #6b7280 !important;
    }

    input[name="is_active"]:hover,
    input[name="active"]:hover {
        border-color: #9ca3af !important;
    }

    input[name="is_active"]:checked,
    input[name="active"]:checked {
        background-color: #1e3a8a !important;
        border-color: #0c2340 !important;
    }
}
