/* Banner de consentimento de cookies (LGPD) — lgpd/lgpd.php */
.lgpd {
    position: fixed;
    left: 16px;
    bottom: 16px;
    width: 420px;
    max-width: calc(100% - 32px);
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    z-index: 2147483000; /* acima do botão flutuante do WhatsApp enquanto o aviso estiver aberto */
    box-shadow: 0 10px 40px rgba(0, 20, 70, .22);
}

.lgpd[hidden] {
    display: none;
}

@media (max-width: 767.98px) {
    .lgpd {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        max-width: none;
        padding: 16px;
    }
}

.lgpd .lgpd-title {
    display: block;
    margin-bottom: 8px;
    color: #03124b;
    font-weight: 700;
    font-size: 1.05rem;
}

.lgpd .lgpd-title i {
    margin-right: 8px;
    color: #0061ff;
}

.lgpd .lgpd-txt p {
    color: #333;
    font-size: .85rem;
    line-height: 1.55;
    margin-bottom: 0;
}

.lgpd .lgpd-txt p a {
    color: #0061ff;
    text-decoration: underline;
}

.lgpd .lgpd-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.lgpd .lgpd-buttons .lgpd-btn--primary,
.lgpd .lgpd-buttons .lgpd-btn--outline {
    flex: 1 1 0;
}

.lgpd .lgpd-buttons .lgpd-btn--link {
    flex: 1 1 100%;
}

/* Botões compartilhados entre banner e modal */
.lgpd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .2s, color .2s, border-color .2s;
}

.lgpd-btn--primary {
    background: #0a4b7c;
    border-color: #0a4b7c;
    color: #fff;
}

.lgpd-btn--primary:hover {
    background: #083d66;
    border-color: #083d66;
}

/* Mesmo peso visual do "Aceitar": recusar deve ser tão fácil quanto aceitar */
.lgpd-btn--outline {
    background: #fff;
    border-color: #03124b;
    color: #03124b;
}

.lgpd-btn--outline:hover {
    background: #03124b;
    color: #fff;
}

.lgpd-btn--link {
    background: none;
    min-height: auto;
    padding: 4px 0;
    color: #333;
    text-decoration: underline;
}

.lgpd-btn--link:hover {
    color: #0061ff;
}

.lgpd-btn:focus-visible,
.lgpd-modal-close:focus-visible {
    outline: 2px solid #0061ff;
    outline-offset: 2px;
}

/* Modal de preferências */
.lgpd-modal {
    margin: auto; /* o reset global tira a centralização nativa do <dialog> */
    width: 560px;
    max-width: calc(100% - 24px);
    max-height: calc(100% - 24px);
    padding: 0;
    border: none;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 20, 70, .3);
}

.lgpd-modal::backdrop {
    background: rgba(0, 20, 70, .55);
}

.lgpd-modal .lgpd-modal-inner {
    padding: 24px;
}

@media (max-width: 767.98px) {
    .lgpd-modal .lgpd-modal-inner {
        padding: 18px;
    }
}

.lgpd-modal .lgpd-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.lgpd-modal .lgpd-modal-head h2 {
    font-size: 1.3rem;
    margin: 0;
}

.lgpd-modal .lgpd-modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #333;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.lgpd-modal .lgpd-modal-close:hover {
    background: #f1f5f9;
}

.lgpd-modal .lgpd-modal-intro {
    font-size: .9rem;
    margin-bottom: 16px;
}

.lgpd-modal .lgpd-category {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.lgpd-modal .lgpd-category p {
    font-size: .82rem;
    line-height: 1.5;
    margin: 6px 0 0;
}

.lgpd-modal .lgpd-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    cursor: pointer;
}

.lgpd-modal .lgpd-category-head strong {
    color: #03124b;
    font-size: .95rem;
}

.lgpd-modal .lgpd-always {
    font-size: .75rem;
    font-weight: 600;
    color: #0061ff;
    white-space: nowrap;
}

.lgpd-modal .lgpd-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.lgpd-modal .lgpd-modal-actions .lgpd-btn {
    flex: 1 1 0;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .lgpd-modal .lgpd-modal-actions {
        flex-direction: column;
    }
}

/* Interruptor (checkbox estilizado) */
.lgpd-switch {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    width: 44px;
    height: 24px;
}

.lgpd-switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.lgpd-switch .lgpd-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 24px;
    transition: background .2s;
}

.lgpd-switch .lgpd-slider::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
}

.lgpd-switch input:checked + .lgpd-slider {
    background: #0a4b7c;
}

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

.lgpd-switch input:focus-visible + .lgpd-slider {
    outline: 2px solid #0061ff;
    outline-offset: 2px;
}
