/* =============================================================
   BANNER DE COOKIES (LGPD) — inc/cookie-consent.php + assets/js/cookie-consent.js
============================================================= */
.nsl-cookie {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 10000001; /* acima do mini-player e do modal de saída */
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 24px;
    background: #fff;
    color: #151613;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .22), 0 0 0 1px rgba(0, 0, 0, .06);
    font-family: var(--font-general, inherit);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .25s ease, transform .25s ease;
}
.nsl-cookie[hidden] {
    display: none;
}
.nsl-cookie.is-visivel {
    opacity: 1;
    transform: none;
}

.nsl-cookie__resumo {
    display: flex;
    align-items: center;
    gap: 24px;
}
.nsl-cookie__texto {
    flex: 1 1 auto;
    min-width: 0;
}
.nsl-cookie__titulo {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 800;
    color: #151613;
}
.nsl-cookie p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #4a4d52;
}
.nsl-cookie a {
    color: var(--color-primary, #295ff2);
    text-decoration: underline;
    border: 0;
}

/* Recusar e Aceitar com o mesmo tamanho e peso visual (ANPD) */
.nsl-cookie__acoes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}
.nsl-cookie__btn {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}
.nsl-cookie__btn--pri {
    background: var(--color-primary, #295ff2);
    border: 1.5px solid var(--color-primary, #295ff2);
    color: #fff;
}
.nsl-cookie__btn--pri:hover {
    background: var(--color-other, #203c64);
    border-color: var(--color-other, #203c64);
}
.nsl-cookie__btn--sec {
    background: #fff;
    border: 1.5px solid #c4c7cc;
    color: #151613;
}
.nsl-cookie__btn--sec:hover {
    border-color: #151613;
}
.nsl-cookie__link {
    padding: 8px 6px;
    border: 0;
    background: none;
    color: var(--color-primary, #295ff2);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}
.nsl-cookie__btn:focus-visible,
.nsl-cookie__link:focus-visible,
.nsl-cookie__switch:focus-visible,
.nsl-cookie a:focus-visible {
    outline: 2px solid var(--color-primary, #295ff2);
    outline-offset: 2px;
}

/* ---------- Preferências ---------- */
.nsl-cookie.is-prefs .nsl-cookie__link {
    text-decoration: none;
}
.nsl-cookie__prefs {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e9e9e9;
}
.nsl-cookie__prefs[hidden] {
    display: none;
}
.nsl-cookie.is-prefs .nsl-cookie__resumo .nsl-cookie__btn {
    display: none; /* com o painel aberto, as ações ficam embaixo */
}
.nsl-cookie__categorias {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    max-height: 45vh;
    overflow-y: auto;
}
.nsl-cookie__categoria {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
}
.nsl-cookie__categoria + .nsl-cookie__categoria {
    border-top: 1px solid #f0f0f0;
}
.nsl-cookie__categoria strong {
    display: block;
    margin-bottom: 2px;
    font-size: 15px;
}
.nsl-cookie__prefs .nsl-cookie__acoes {
    justify-content: flex-end;
}
.nsl-cookie p.nsl-cookie__codigo {
    margin: 0 0 14px;
    font-size: 12px;
    color: #6b6e74;
}
.nsl-cookie__codigo[hidden] {
    display: none;
}
.nsl-cookie__codigo code {
    font-size: 12px;
    color: #151613;
    background: #f1f2f4;
    padding: 1px 6px;
    border-radius: 4px;
    word-break: break-all;
}

/* Interruptor (checkbox com role="switch") */
.nsl-cookie__switch {
    flex: 0 0 auto;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 44px;
    height: 26px;
    margin: 2px 0 0;
    border-radius: 999px;
    background: #c4c7cc;
    cursor: pointer;
    transition: background-color .2s ease;
}
.nsl-cookie__switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .2s ease;
}
.nsl-cookie__switch:checked {
    background: var(--color-primary, #295ff2);
}
.nsl-cookie__switch:checked::after {
    transform: translateX(18px);
}
.nsl-cookie__switch:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* ---------- Celular: folha presa ao rodapé ---------- */
@media (max-width: 767px) {
    .nsl-cookie {
        left: 0;
        right: 0;
        bottom: 0;
        padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
        border-radius: 16px 16px 0 0;
        max-height: 90vh;
        overflow-y: auto;
    }
    .nsl-cookie__resumo {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    .nsl-cookie__acoes {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .nsl-cookie__link {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nsl-cookie,
    .nsl-cookie__switch,
    .nsl-cookie__switch::after { transition: none; }
}
