/* Magic Checkbox Component Styles */
.magic-checkbox-container {
    position: relative;
    margin-bottom: 1rem;
}

.magic-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.magic-checkbox-wrapper:hover {
    transform: translateY(-1px);
}

.magic-checkbox-wrapper:hover .magic-checkbox-checkmark {
    border-color: rgba(var(--bs-primary-rgb), 0.7);
    box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.1);
}

.magic-checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.magic-checkbox-checkmark {
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(var(--bs-primary-rgb), 0.4);
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.magic-checkbox-checkmark::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-info));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.magic-checkbox-input:checked + .magic-checkbox-checkmark {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-info));
    border-color: transparent;
    transform: scale(1.05);
}

.magic-checkbox-input:checked + .magic-checkbox-checkmark::before {
    opacity: 1;
    animation: checkboxGlow 1.5s ease-in-out infinite alternate;
}

.magic-checkbox-icon {
    width: 0.875rem;
    height: 0.875rem;
    color: white;
    opacity: 0;
    transform: scale(0.3);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.magic-checkbox-input:checked + .magic-checkbox-checkmark .magic-checkbox-icon {
    opacity: 1;
    transform: scale(1);
}

.magic-checkbox-label {
    color: var(--bs-body-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.magic-checkbox-wrapper:hover .magic-checkbox-label {
    color: var(--bs-primary);
}

.magic-checkbox-input:checked ~ .magic-checkbox-label {
    color: var(--bs-primary);
}

.magic-checkbox-validation {
    color: var(--bs-danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.magic-checkbox-validation::before {
    content: "⚠";
    font-size: 1rem;
}

/* Focus state */
.magic-checkbox-input:focus + .magic-checkbox-checkmark {
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Disabled state */
.magic-checkbox-input:disabled + .magic-checkbox-checkmark {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
}

.magic-checkbox-input:disabled ~ .magic-checkbox-label {
    opacity: 0.5;
    cursor: not-allowed;
}

.magic-checkbox-wrapper:has(.magic-checkbox-input:disabled) {
    cursor: not-allowed;
}

.magic-checkbox-wrapper:has(.magic-checkbox-input:disabled):hover {
    transform: none;
}

/* Size variants */
.magic-checkbox-container.magic-checkbox-small .magic-checkbox-checkmark {
    width: 1rem;
    height: 1rem;
}

.magic-checkbox-container.magic-checkbox-small .magic-checkbox-icon {
    width: 0.75rem;
    height: 0.75rem;
}

.magic-checkbox-container.magic-checkbox-large .magic-checkbox-checkmark {
    width: 1.5rem;
    height: 1.5rem;
}

.magic-checkbox-container.magic-checkbox-large .magic-checkbox-icon {
    width: 1rem;
    height: 1rem;
}

/* Variant styles */
.magic-checkbox-container.magic-checkbox-success .magic-checkbox-input:checked + .magic-checkbox-checkmark {
    background: linear-gradient(135deg, var(--bs-success), #10d174);
}

.magic-checkbox-container.magic-checkbox-warning .magic-checkbox-input:checked + .magic-checkbox-checkmark {
    background: linear-gradient(135deg, var(--bs-warning), #f59e0b);
}

.magic-checkbox-container.magic-checkbox-error .magic-checkbox-input:checked + .magic-checkbox-checkmark {
    background: linear-gradient(135deg, var(--bs-danger), #ef4444);
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .magic-checkbox-checkmark {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(var(--bs-primary-rgb), 0.5);
}

[data-bs-theme="dark"] .magic-checkbox-input:disabled + .magic-checkbox-checkmark {
    background: rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes checkboxGlow {
    0% { 
        box-shadow: 0 0 5px rgba(var(--bs-primary-rgb), 0.5);
    }
    100% { 
        box-shadow: 0 0 15px rgba(var(--bs-primary-rgb), 0.8);
    }
}

/* Ripple effect */
.magic-checkbox-checkmark::after {
    content: '';
    position: absolute;
    inset: 50%;
    background: radial-gradient(circle, rgba(var(--bs-primary-rgb), 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.6s ease-out;
}

.magic-checkbox-input:checked + .magic-checkbox-checkmark::after {
    transform: scale(2);
} 