/*
 * /css/cookie-consent.css
 *
 * Folha de estilo para o banner de consentimento de cookies e o modal de personalização.
 * REVISADO: Seletores renomeados para nomes genéricos para evitar bloqueadores de anúncios.
 * Cores principais:
 * - Laranja: #ff8200
 * - Laranja Hover: #e67500
 * - Texto Principal: #1d1d1b (preto)
 * - Texto Secundário: #616160 (cinza)
 * - Fundo: #ffffff (branco)
 * - Overlay: rgba(0, 0, 0, 0.6)
 */

/* --- Estilo do Banner Principal --- */
#site-notice-banner {
    /* Posicionamento fixo na parte inferior, centralizado horizontalmente */
    position: fixed;
    bottom: 5.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(200%); /* Animação inicial */
    
    width: calc(100% - 3rem);
    max-width: 64rem;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    padding: 1.5rem;
    z-index: 9999;
    transition: transform 0.5s ease-in-out;
    font-family: 'Novatura', sans-serif;
    
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    text-align: left;
}

/* Estado visível do banner */
#site-notice-banner.visible {
    transform: translateX(-50%) translateY(0);
}

/* Ajustes para o texto e botões dentro do banner */
#site-notice-banner h3 {
    width: 100%;
    text-align: left;
    margin-bottom: 0.5rem;
}

#site-notice-banner p {
    flex-grow: 1;
    margin-right: 1rem;
    margin-bottom: 1.5rem;
}

#site-notice-banner .flex-col {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-left: auto;
}

/* --- Estilo do Modal de Personalização --- */
#site-prefs-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    
    display: none; /* Alterado por JS para 'flex' */
    justify-content: center;
    align-items: center;
    
    z-index: 99999;
    transition: none;
}

/* Estado visível do modal */
#site-prefs-modal.visible {
    display: flex;
}

/* Caixa de conteúdo do modal */
.prefs-modal-content {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 90%;
    max-width: 42rem;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    font-family: 'Novatura', sans-serif;
}

/* Cabeçalho do modal */
.prefs-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Corpo do modal (com scroll) */
.prefs-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

/* Rodapé do modal com os botões */
.prefs-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* --- Estilos de Botões --- */
.notice-btn {
    border: none;
    border-radius: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    font-size: 0.875rem;
    text-align: center;
}

/* Botão Primário (Aceitar) */
.notice-btn-primary {
    background-color: #ff8200;
    color: #ffffff;
}
.notice-btn-primary:hover,
.notice-btn-primary:focus,
.notice-btn-primary:active {
    background-color: #e67500;
    box-shadow: 0 4px 14px 0 rgba(255, 130, 0, 0.39);
    outline: none;
}

/* Botão Secundário (Rejeitar, Salvar, Personalizar) */
.notice-btn-secondary {
    background-color: #d1d5db;
    color: #374151;
}
.notice-btn-secondary:hover,
.notice-btn-secondary:focus,
.notice-btn-secondary:active {
    background-color: #9ca3af;
    outline: none;
}

/* Botão de Texto (Fechar modal) */
.notice-btn-link {
    background-color: transparent;
    color: #616160;
    text-decoration: none;
    padding: 0; /* Ajustado para ícone de fechar */
}
.notice-btn-link:hover,
.notice-btn-link:focus,
.notice-btn-link:active {
    color: #1d1d1b;
    outline: none;
}

/* --- Estilos do Switch de Preferências --- */
.prefs-item {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s ease;
}
.prefs-item:hover {
    box-shadow: 0 0 0 2px #fde6cf;
}

.prefs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.prefs-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    margin-top: 0;
}

.prefs-details p {
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
    margin-top: 0.75rem;
}

.prefs-item.open .prefs-details {
    max-height: 200px;
}

/* Estilo do Switch (toggle) */
.prefs-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.prefs-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.prefs-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.prefs-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .prefs-slider {
    background-color: #ff8200;
}

input:disabled + .prefs-slider {
    background-color: #9ca3af;
    cursor: not-allowed;
}

input:checked + .prefs-slider:before {
    transform: translateX(20px);
}

/* --- Responsividade --- */
@media (max-width: 768px) {
    #site-notice-banner {
        width: auto;
        max-width: 500px;
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        margin-left: auto;
        margin-right: auto;
        transform: translateY(200%);
        border-radius: 0.75rem;
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
    }

    #site-notice-banner.visible {
        transform: translateY(0);
    }

    #site-notice-banner p {
        margin-right: 0;
        margin-bottom: 1.5rem;
    }

    #site-notice-banner .flex-col {
        flex-direction: column;
        width: 100%;
    }

    .notice-btn {
        width: 100%;
    }
}
