/* ===== COOKIE CONSENT STYLES - sky THEME ===== */

/* Estilos base para o overlay */
.cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.4s ease-out;
    visibility: hidden;
}

/* Estados especiais que não podem ser replicados com Tailwind */
.cookie-consent-modal.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
}

.cookie-consent-modal.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

.cookie-consent-overlay.visible {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Overlay bloqueante (impede interação com a página) */
.cookie-consent-overlay.cookie-consent-blocking {
    pointer-events: all;
    cursor: not-allowed;
}

/* Overlay não-bloqueante (permite interação com a página) */
.cookie-consent-overlay.non-blocking {
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Painel de preferências oculto */
.cookie-consent-preferences.hidden {
    max-height: 0 !important;
    opacity: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Estados especiais para botões */
.cookie-consent-btn-loading {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.cookie-consent-btn-loading::after {
    content: '' !important;
    position: absolute !important;
    width: 16px !important;
    height: 16px !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-top-color: white !important;
    border-radius: 50% !important;
    animation: spin 0.6s linear infinite !important;
}

.cookie-consent-btn.processing {
    pointer-events: none !important;
    opacity: 0.7 !important;
}

.cookie-consent-btn.processing::after {
    content: '' !important;
    position: absolute !important;
    width: 16px !important;
    height: 16px !important;
    margin: auto !important;
    border: 2px solid transparent !important;
    border-top-color: #ffffff !important;
    border-radius: 50% !important;
    animation: spin 1s linear infinite !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
}

.cookie-consent-btn-success {
    background: #059669 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-1px) !important;
}

/* Scrollbars customizadas com cor sky */
.cookie-consent-content::-webkit-scrollbar,
.cookie-consent-details-content::-webkit-scrollbar,
.cookie-categories-list::-webkit-scrollbar {
    width: 8px;
}

.cookie-consent-content::-webkit-scrollbar-track,
.cookie-consent-details-content::-webkit-scrollbar-track,
.cookie-categories-list::-webkit-scrollbar-track {
    background: rgba(229, 231, 235, 1);
    border-radius: 4px;
}

.cookie-consent-content::-webkit-scrollbar-thumb,
.cookie-consent-details-content::-webkit-scrollbar-thumb,
.cookie-categories-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.cookie-consent-content::-webkit-scrollbar-thumb:hover,
.cookie-consent-details-content::-webkit-scrollbar-thumb:hover,
.cookie-categories-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Efeito ripple nos botões */
.cookie-consent-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cookie-consent-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Animações (essenciais - não podem ser inline) */
@keyframes shake {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-8px) translateY(0);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(8px) translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes expandDetails {
    from {
        opacity: 0.8;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes checkboxPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Animação para detalhes expansíveis */
.cookie-consent-details[open] {
    animation: expandDetails 0.3s ease-out;
}

/* Animação para checkbox quando marcado */
.cookie-category input[type="checkbox"]:checked {
    animation: checkboxPulse 0.3s ease;
}

/* Efeitos hover especiais para checkbox com cor sky */
.cookie-category input[type="checkbox"]:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* Estilo especial para categoria essencial com cor sky */
.cookie-category-essential label i {
    filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.5));
}

/* Media queries para ajustes finos */
@media (max-width: 480px) {
    .cookie-consent-actions {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .cookie-consent-btn {
        width: 100% !important;
        min-width: auto !important;
    }
}

/* Estilos adicionais para checkboxes e cards */
.cookie-category input[type="checkbox"]:checked {
    background-color: #10b981;
    border-color: #10b981;
}

.cookie-category input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.cookie-category input[type="checkbox"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-category label {
    user-select: none;
}

.cookie-tool-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cookie-tool-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}