:root {
    --pegaconsent-bg: #ffffff;
    --pegaconsent-text: #333333;
    --pegaconsent-primary: #0073aa;
    --pegaconsent-secondary: #f1f1f1;
}

/* Base Wrapper */
.pegaconsent-wrapper {
    position: fixed;
    z-index: 999999;
    font-family: sans-serif;
    background-color: var(--pegaconsent-bg);
    color: var(--pegaconsent-text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.pegaconsent-wrapper.show {
    opacity: 1;
    visibility: visible;
}

/* --- Layout: Banner (Default) --- */
.pegaconsent-layout-banner-bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 16px 22px;
}

.pegaconsent-layout-banner-bottom .pegaconsent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

/* Title Styling for Banner */
.pegaconsent-layout-banner-bottom .pegaconsent-title {
    width: 100%;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
    text-align: left;
}

/* --- Layout: Popup (Box) --- */
.pegaconsent-popup {
    width: 90%;
    max-width: 400px;
    padding: 16px 22px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pegaconsent-popup .pegaconsent-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Title Styling for Popup */
.pegaconsent-popup .pegaconsent-title {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
    text-align: center;
    width: 100%;
    display: block;
}

.pegaconsent-popup .pegaconsent-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.pegaconsent-popup .pegaconsent-actions .pegaconsent-btn {
    width: 100%;
    text-align: center;
}

/* Popup Positions */
.pegaconsent-layout-popup-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pegaconsent-layout-popup-bottom-left {
    bottom: 20px;
    left: 20px;
}

.pegaconsent-layout-popup-bottom-right {
    bottom: 20px;
    right: 20px;
}

.pegaconsent-layout-popup-bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

/* Common Text Styles */
/* Common Text Styles */
.pegaconsent-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 600;
}

/* ... existing code ... */



.pegaconsent-content a {
    color: inherit;
    text-decoration: underline;
}

/* Buttons */
.pegaconsent-btn {
    padding: 10px 16px;
    min-width: 70px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: opacity 0.2s;
    text-decoration: none;
    display: inline-block;
}

.pegaconsent-btn:hover {
    opacity: 0.9;
}

.pegaconsent-btn-primary {
    background-color: var(--pegaconsent-primary);
    color: var(--pegaconsent-primary-text, #ffffff);
}

/*
 * Anti dark-pattern (Google CMP + LGPD ANPD Resolução 2/2022):
 * Botão Rejeitar tem o mesmo peso visual que Aceitar —
 * mesmo tamanho, mesmo padding, apenas estilo outline para diferenciação.
 */
.pegaconsent-btn-reject {
    background-color: transparent;
    color: var(--pegaconsent-primary);
    border: 2px solid var(--pegaconsent-primary);
    padding: 8px 16px;
    /* compensa a borda de 2px */
}

.pegaconsent-btn-reject:hover {
    background-color: var(--pegaconsent-primary);
    color: var(--pegaconsent-primary-text, #ffffff);
    opacity: 1;
}

/* Botão Configurar — discreto mas acessível */
.pegaconsent-btn-settings {
    background-color: var(--pegaconsent-secondary);
    color: var(--pegaconsent-secondary-text, #333333);
}

/* Legado — mantido para não quebrar personalizações de temas */
.pegaconsent-btn-secondary {
    background-color: var(--pegaconsent-secondary);
    color: var(--pegaconsent-secondary-text, #333333);
}

/* Modal Settings */
.pegaconsent-modal {
    display: none;
    position: fixed;
    z-index: 1000000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.pegaconsent-modal-content {
    background-color: #fefefe;
    margin: 20px;
    padding: 20px;
    border: 1px solid #888;
    width: 100%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pegaconsent-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.pegaconsent-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.pegaconsent-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.pegaconsent-close:hover {
    color: black;
}

.pegaconsent-option {
    margin-bottom: 15px;
    border-bottom: 1px solid #f9f9f9;
    padding-bottom: 10px;
}

.pegaconsent-option:last-child {
    border-bottom: none;
}

.pegaconsent-option label {
    font-weight: bold;
    margin-left: 5px;
    font-size: 16px;
    cursor: pointer;
}

.pegaconsent-option p.small {
    margin: 5px 0 0 25px;
    font-size: 12px;
    color: #666;
}


.pegaconsent-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

/* Cabeçalho de cada opção — checkbox + label alinhados */
.pegaconsent-option-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.pegaconsent-option-header label {
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    margin-left: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Badge "Sempre ativos" para cookies necessários */
.pegaconsent-always-on {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background-color: #5cb85c;
    border-radius: 20px;
    padding: 2px 8px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Identificação do Controlador de Dados (LGPD Art. 5º, VI) */
.pegaconsent-controller {
    font-size: 12px;
    color: var(--pegaconsent-text);
    opacity: 0.75;
    margin: 4px 0 0;
    padding: 0;
}

.pegaconsent-modal-controller {
    font-size: 12px;
    color: #555;
    margin: 0 0 14px;
    padding: 8px 12px;
    background: #f8f8f8;
    border-left: 3px solid var(--pegaconsent-primary, #0073aa);
    border-radius: 2px;
}

/* Botão de Revogação — sempre visível no canto inferior esquerdo */
.pegaconsent-revoke-wrapper {
    position: fixed;
    bottom: 12px;
    left: 12px;
    z-index: 99998;
}

.pegaconsent-revoke-btn {
    background-color: var(--pegaconsent-bg, #fff);
    color: var(--pegaconsent-text, #333);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.2s, opacity 0.2s;
    white-space: nowrap;
}

.pegaconsent-revoke-btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    opacity: 0.95;
}

/* --- Layout: Floating Footer (Rodapé Suspenso) --- */
.pegaconsent-layout-banner-float-bottom {
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    padding: 16px 22px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.pegaconsent-layout-banner-float-bottom .pegaconsent-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.pegaconsent-layout-banner-float-bottom .pegaconsent-title {
    width: 100%;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
    text-align: left;
}

/* Mobile adjustments */
@media (max-width: 768px) {

    /* Floating Banner */
    .pegaconsent-layout-banner-float-bottom {
        bottom: 80px;
        left: 20px;
        right: 20px;
        width: auto;
        border-radius: 12px;
        -webkit-transform: none;
        transform: none;
    }

    .pegaconsent-layout-banner-float-bottom .pegaconsent-content {
        flex-direction: column;
        text-align: center;
    }

    .pegaconsent-layout-banner-float-bottom .pegaconsent-title {
        text-align: center;
    }

    .pegaconsent-layout-banner-float-bottom .pegaconsent-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
        justify-content: center;
    }

    .pegaconsent-layout-banner-float-bottom .pegaconsent-btn {
        width: 100%;
        margin: 0;
    }

    /* Popups - Center them on mobile */
    .pegaconsent-popup {
        width: 90% !important;
        left: 50% !important;
        right: auto !important;
        bottom: 20px !important;
        top: auto !important;
        -webkit-transform: translateX(-50%) !important;
        transform: translateX(-50%) !important;
        max-width: none;
    }

    .pegaconsent-layout-popup-center {
        top: 50% !important;
        -webkit-transform: translate(-50%, -50%) !important;
        transform: translate(-50%, -50%) !important;
    }
}