/**
 * Estilos do Sistema de Cookies - 101 Notícias
 * Compatível com tema dark/light
 */

/* ===== BANNER DE COOKIES ===== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #FFFFFF;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    z-index: 9999;
    display: none;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.cookie-banner-text {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
}

.cookie-icon {
    font-size: 2rem;
    color: #6C43E7;
    margin-top: 0.25rem;
}

.cookie-banner-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1E1E1E;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 0.9rem;
    color: #666666;
    line-height: 1.5;
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* ===== MODAL DE CONFIGURAÇÕES ===== */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.cookie-modal-content {
    background: #FFFFFF;
    border-radius: 16px;
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #E7E6E6;
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1E1E1E;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-modal-header i {
    color: #6C43E7;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.cookie-modal-close:hover {
    background: #F3F3F3;
    color: #1E1E1E;
}

.cookie-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-intro {
    margin: 0 0 1.5rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(108, 67, 231, 0.1), rgba(139, 92, 246, 0.1));
    border-left: 4px solid #6C43E7;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #333333;
    line-height: 1.6;
}

/* ===== CATEGORIAS DE COOKIES ===== */
.cookie-category {
    background: #F8F8F8;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 2px solid #E7E6E6;
    transition: all 0.3s ease;
}

.cookie-category:hover {
    border-color: #6C43E7;
    box-shadow: 0 4px 12px rgba(108, 67, 231, 0.1);
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.cookie-category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-category-title i {
    font-size: 1.25rem;
    color: #6C43E7;
}

.cookie-category-title h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1E1E1E;
}

.cookie-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-badge.required {
    background: linear-gradient(45deg, #6C43E7, #8B5CF6);
    color: white;
}

.cookie-category-desc {
    margin: 0;
    font-size: 0.875rem;
    color: #666666;
    line-height: 1.6;
}

/* ===== SWITCH TOGGLE ===== */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #CCCCCC;
    transition: 0.3s;
    border-radius: 34px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-switch input:checked + .cookie-slider {
    background: linear-gradient(45deg, #6C43E7, #8B5CF6);
}

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

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

/* ===== BOTÕES ===== */
.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: linear-gradient(45deg, #6C43E7, #8B5CF6);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 67, 231, 0.3);
}

.cookie-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 67, 231, 0.4);
}

.cookie-btn-secondary {
    background: #F3F3F3;
    color: #1E1E1E;
    border: 2px solid #E7E6E6;
}

.cookie-btn-secondary:hover {
    background: #E7E6E6;
    border-color: #D4D4D4;
}

.cookie-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #E7E6E6;
}

/* ===== POLÍTICA DE PRIVACIDADE ===== */
.cookie-policy-link {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #FFF9E6;
    border-left: 4px solid #F59E0B;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.cookie-policy-link i {
    color: #F59E0B;
    font-size: 1.1rem;
    margin-top: 0.1rem;
}

.cookie-policy-link p {
    margin: 0;
    font-size: 0.875rem;
    color: #333333;
    line-height: 1.6;
}

.cookie-policy-link a {
    color: #6C43E7;
    text-decoration: underline;
    font-weight: 600;
}

.cookie-policy-link a:hover {
    color: #8B5CF6;
}

/* ===== BOTÃO DE GERENCIAR (FIXO) ===== */
.cookie-manage-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(45deg, #6C43E7, #8B5CF6);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(108, 67, 231, 0.3);
    transition: all 0.3s ease;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-manage-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 20px rgba(108, 67, 231, 0.5);
}

/* ===== NOTIFICAÇÃO ===== */
.cookie-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10B981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10001;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
}

.cookie-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.cookie-notification i {
    font-size: 1.25rem;
}

/* ===== TEMA DARK ===== */
.dark-theme .cookie-banner {
    background: #2A2A2A;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.dark-theme .cookie-banner-text h3 {
    color: #E7E6E6;
}

.dark-theme .cookie-banner-text p {
    color: #CCCCCC;
}

.dark-theme .cookie-modal-content {
    background: #2A2A2A;
}

.dark-theme .cookie-modal-header {
    border-bottom-color: #444444;
}

.dark-theme .cookie-modal-header h2 {
    color: #E7E6E6;
}

.dark-theme .cookie-modal-close {
    color: #CCCCCC;
}

.dark-theme .cookie-modal-close:hover {
    background: #3A3A3A;
    color: #E7E6E6;
}

.dark-theme .cookie-intro {
    background: rgba(108, 67, 231, 0.2);
    color: #E7E6E6;
}

.dark-theme .cookie-category {
    background: #1E1E1E;
    border-color: #444444;
}

.dark-theme .cookie-category-title h3 {
    color: #E7E6E6;
}

.dark-theme .cookie-category-desc {
    color: #CCCCCC;
}

.dark-theme .cookie-btn-secondary {
    background: #3A3A3A;
    color: #E7E6E6;
    border-color: #444444;
}

.dark-theme .cookie-btn-secondary:hover {
    background: #444444;
    border-color: #555555;
}

.dark-theme .cookie-modal-footer {
    border-top-color: #444444;
}

.dark-theme .cookie-policy-link {
    background: rgba(245, 158, 11, 0.15);
}

.dark-theme .cookie-policy-link p {
    color: #E7E6E6;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .cookie-banner-text {
        flex-direction: column;
        gap: 0.75rem;
    }

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

    .cookie-btn {
        width: 100%;
        justify-content: center;
    }

    .cookie-modal-content {
        max-height: 95vh;
    }

    .cookie-modal-header h2 {
        font-size: 1.25rem;
    }

    .cookie-modal-footer {
        flex-direction: column-reverse;
    }

    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }

    .cookie-manage-btn {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
        bottom: 80px; /* Acima do botão de voltar ao topo se existir */
    }

    .cookie-notification {
        left: 10px;
        right: 10px;
        top: 10px;
    }
}

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

    .cookie-icon {
        font-size: 1.5rem;
    }

    .cookie-banner-text h3 {
        font-size: 1rem;
    }

    .cookie-banner-text p {
        font-size: 0.85rem;
    }

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

    .cookie-modal-body {
        padding: 1rem;
    }

    .cookie-category {
        padding: 1rem;
    }
}
