/* Banner de Cookies */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 20px rgba(63, 72, 204, 0.1);
    padding: 1.5rem;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.cookie-text {
    flex: 1;
}

.cookie-title {
    color: #3f48cc;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-description {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Botões */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-accept {
    background: linear-gradient(135deg, #3f48cc 0%, #5b63d3 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(63, 72, 204, 0.3);
}

.btn-accept:hover {
    background: linear-gradient(135deg, #2d35a0 0%, #4a52c7 100%);
    box-shadow: 0 4px 12px rgba(63, 72, 204, 0.4);
    transform: translateY(-1px);
}

.btn-reject {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-reject:hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateY(-1px);
}

.btn-customize {
    background: transparent;
    color: #3f48cc;
    border: 1px solid #3f48cc;
}

.btn-customize:hover {
    background: #3f48cc;
    color: white;
    transform: translateY(-1px);
}

/* Botão de fechar */
.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f1f5f9;
    color: #64748b;
}

/* Modal de personalização */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.modal-header h3 {
    color: #3f48cc;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.modal-body {
    padding: 1.5rem 2rem;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.cookie-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Switch personalizado */
.cookie-switch {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    position: relative;
}

.cookie-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    width: 48px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 24px;
    position: relative;
    transition: background 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cookie-switch input:checked + .slider {
    background: #3f48cc;
}

.cookie-switch input:checked + .slider::before {
    transform: translateX(24px);
}

.cookie-switch input:disabled + .slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-info {
    flex: 1;
}

.cookie-info strong {
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.cookie-info p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    text-align: center;
}

/* Responsividade */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .cookie-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        min-width: auto;
    }

    .close-btn {
        top: 0.5rem;
        right: 0.5rem;
    }

    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .cookie-switch {
        flex-direction: column;
        gap: 0.75rem;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 1rem;
    }

    .cookie-actions {
        gap: 0.5rem;
    }

    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }
}

/* Animações de entrada */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner.animate-in {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Estados de foco para acessibilidade */
.btn:focus,
.close-btn:focus,
.cookie-switch:focus-within .slider {
    outline: 2px solid #3f48cc;
    outline-offset: 2px;
}

/* Modo escuro (opcional) */
@media (prefers-color-scheme: dark) {
    .cookie-banner {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        border-top-color: #334155;
    }

    .cookie-title {
        color: #818cf8;
    }

    .cookie-description {
        color: #cbd5e1;
    }

    .modal-content {
        background: #1e293b;
    }

    .modal-header {
        border-bottom-color: #334155;
    }

    .modal-header h3 {
        color: #818cf8;
    }

    .cookie-category {
        border-bottom-color: #334155;
    }

    .cookie-info strong {
        color: #f1f5f9;
    }

    .cookie-info p {
        color: #cbd5e1;
    }
}

