/* Custom Checkbox Solution - Complete replacement for Bootstrap checkbox */
.custom-checkbox-wrapper {
    position: relative;
    display: inline-block;
}

.custom-checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    color: var(--bs-body-color);
    font-weight: 500;
}

.custom-checkbox-box {
    width: 18px;
    height: 18px;
    border: 2px solid #0d6efd;
    border-radius: 4px;
    background-color: #343a40;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
}

.custom-checkbox-text {
    color: var(--bs-body-color);
    font-weight: 500;
}

/* Checked state */
.custom-checkbox-input:checked + .custom-checkbox-label .custom-checkbox-box {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.custom-checkbox-input:checked + .custom-checkbox-label .custom-checkbox-box::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

/* Hover state */
.custom-checkbox-label:hover .custom-checkbox-box {
    border-color: #0a58ca;
    filter: brightness(1.1);
}

.custom-checkbox-label:hover .custom-checkbox-text {
    color: #0d6efd;
}

.form-check-input:checked {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.form-check-input:checked::before {
    content: '✓' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: bold !important;
    line-height: 1 !important;
}

.form-check-input:focus {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

.form-check-label {
    color: var(--bs-body-color) !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    user-select: none !important;
}

.form-check {
    display: flex !important;
    align-items: center !important;
    padding-left: 0 !important;
}

/* Dark theme specific enhancements */
[data-bs-theme="dark"] .form-check-input {
    background-color: #343a40 !important;
    border-color: #6c757d !important;
}

[data-bs-theme="dark"] .form-check-input:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

/* Additional nuclear overrides to ensure box visibility */
input[type="checkbox"].form-check-input {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    border: 2px solid #0d6efd !important;
    background-color: #343a40 !important;
    border-radius: 4px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    position: relative !important;
    flex-shrink: 0 !important;
}

input[type="checkbox"].form-check-input:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

/* Hover effects for better UX */
.form-check-input:hover {
    border-color: var(--bs-primary) !important;
    filter: brightness(1.1) !important;
}

.form-check-label:hover {
    color: var(--bs-primary) !important;
}