/* Estilos modernos para checkboxes customizados */

/* Container dos checkboxes */
.modern-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

/* Label como card clicável */
.modern-checkbox-label {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-height: 52px;
}

/* Dark mode */
.dark .modern-checkbox-label {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.6) 0%, rgba(30, 41, 59, 0.6) 100%);
    border-color: rgba(71, 85, 105, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Hover effect */
.modern-checkbox-label:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.dark .modern-checkbox-label:hover {
    border-color: #60a5fa;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* Checkbox oculto */
.modern-checkbox-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Estado checked */
.modern-checkbox-input:checked + .modern-checkbox-label {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #2563eb;
    color: white;
    font-weight: 600;
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

.dark .modern-checkbox-input:checked + .modern-checkbox-label {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-color: #1d4ed8;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.45);
}

/* Texto do label */
.modern-checkbox-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
    transition: color 0.3s ease;
    text-align: center;
}

.dark .modern-checkbox-text {
    color: #e2e8f0;
}

.modern-checkbox-input:checked + .modern-checkbox-label .modern-checkbox-text {
    color: white;
}

/* Ícone de check */
.modern-checkbox-label::before {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    background-color: white;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.25s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modern-checkbox-input:checked + .modern-checkbox-label::before {
    opacity: 1;
    transform: scale(1);
}

.modern-checkbox-label::after {
    content: '✓';
    position: absolute;
    top: 7px;
    right: 11px;
    font-size: 12px;
    color: #2563eb;
    font-weight: 700;
    opacity: 0;
    transform: scale(0);
    transition: all 0.25s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modern-checkbox-input:checked + .modern-checkbox-label::after {
    opacity: 1;
    transform: scale(1);
}

/* Focus state para acessibilidade */
.modern-checkbox-input:focus + .modern-checkbox-label {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Animação de pulso no click */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.98);
    }
}

.modern-checkbox-input:active + .modern-checkbox-label {
    animation: pulse 0.2s ease-in-out;
}

/* Responsividade */
@media (max-width: 640px) {
    .modern-checkbox-group {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }
    
    .modern-checkbox-label {
        padding: 0.75rem 0.625rem;
        min-height: 48px;
    }
    
    .modern-checkbox-text {
        font-size: 0.875rem;
    }
}

@media (min-width: 768px) {
    .modern-checkbox-group {
        grid-template-columns: repeat(3, 1fr);
    }
}
