/* css/cookie-consent.css */

/* -- Container Principal do Banner -- */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(28, 28, 30, 0.95); /* Cor escura padrão */
    color: #f5f5f7;
    padding: 20px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
    z-index: 1050;
    display: none; /* Começa escondido */
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* -- Conteúdo de Texto do Banner -- */
.cookie-consent-banner-text {
    font-size: 15px;
    line-height: 1.5;
    flex-grow: 1;
}
.cookie-consent-banner-text a {
    color: #58a6ff;
    text-decoration: underline;
}

/* -- Botões do Banner -- */
.cookie-consent-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.cookie-consent-btn {
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.cookie-consent-btn:hover {
    transform: translateY(-2px);
}
.cookie-consent-btn.primary {
    background-color: #007AFF;
    color: white;
}
.cookie-consent-btn.secondary {
    background-color: #555;
    color: white;
}
.cookie-consent-btn.tertiary {
    background: none;
    color: #f5f5f7;
    text-decoration: underline;
    padding: 10px;
}

/* -- Estilos para o modo claro -- */
body:not(.dark-mode) .cookie-consent-banner {
    background-color: rgba(255, 255, 255, 0.95);
    color: #1d1d1f;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
}
body:not(.dark-mode) .cookie-consent-banner-text a {
    color: #007AFF;
}
body:not(.dark-mode) .cookie-consent-btn.secondary {
    background-color: #e5e5e7;
    color: #1d1d1f;
}
body:not(.dark-mode) .cookie-consent-btn.tertiary {
    color: #333;
}


/* -- Fundo do Modal (Backdrop) -- */
.cookie-preferences-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1060;
    display: none; /* Começa escondido */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* -- Conteúdo do Modal -- */
.cookie-preferences-modal-content {
    background-color: #1c1c1e;
    color: #f5f5f7;
    width: 90%;
    max-width: 550px;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}
.cookie-preferences-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #3a3a3c;
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.cookie-preferences-modal-header h3 {
    margin: 0;
    font-size: 20px;
}
.cookie-preferences-modal-body {
    overflow-y: auto;
    padding-right: 10px; /* Espaço para a barra de rolagem */
    margin-right: -10px;
}
.cookie-preferences-modal-footer {
    border-top: 1px solid #3a3a3c;
    padding-top: 20px;
    margin-top: 20px;
    text-align: right;
}

/* -- Estilos do Modal para Modo Claro -- */
body:not(.dark-mode) .cookie-preferences-modal-content {
    background-color: #ffffff;
    color: #1d1d1f;
}
body:not(.dark-mode) .cookie-preferences-modal-header {
    border-bottom-color: #e5e7eb;
}
body:not(.dark-mode) .cookie-preferences-modal-footer {
    border-top-color: #e5e7eb;
}

/* -- Categoria de Cookie (Dentro do Modal) -- */
.cookie-category {
    padding: 15px 0;
    border-bottom: 1px solid #3a3a3c;
}
.cookie-category:last-child {
    border-bottom: none;
}
body:not(.dark-mode) .cookie-category {
    border-bottom-color: #e5e7eb;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}
.cookie-category-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.cookie-category-description {
    font-size: 14px;
    color: #a1a1a6;
    margin-top: 8px;
    line-height: 1.6;
}
body:not(.dark-mode) .cookie-category-description {
    color: #555;
}

/* -- Toggle Switch (Interruptor) -- */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
    margin-left: 15px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: .4s;
    border-radius: 28px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #007AFF;
}
input:checked + .slider:before {
    transform: translateX(22px);
}
input:disabled + .slider {
    background-color: #555;
    cursor: not-allowed;
}
input:disabled + .slider:before {
    background-color: #aaa;
}
body:not(.dark-mode) .slider {
    background-color: #ccc;
}


/* -- Responsividade -- */
@media (max-width: 768px) {
    .cookie-consent-banner {
        flex-direction: column;
        text-align: center;
        padding-bottom: 20px;
    }
    .cookie-consent-banner-actions {
        width: 100%;
        justify-content: center;
        margin-top: 15px;
    }
    .cookie-consent-btn {
        flex-grow: 1;
        text-align: center;
    }
}