/* Paginas legais (Politica de Cookies) e aviso de cookies.
   Usa os tokens --bns-* do custom.css; a landing nao carrega o custom.css,
   por isso cada regra traz o valor de reserva. */

/* ---------- Aviso de cookies ---------- */
.cookie-notice {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 560px;
    margin: 0 auto;
    padding: 14px 16px;
    background: var(--bns-surface, #15171e);
    color: var(--bns-text, #f3f4f6);
    border: 1px solid var(--bns-border, rgba(255, 255, 255, 0.07));
    border-radius: var(--bns-radius-sm, 10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    font-family: var(--bns-font, "Plus Jakarta Sans", system-ui, sans-serif);
    font-size: 0.875rem;
    line-height: 1.45;
}

.cookie-notice[hidden] {
    display: none;
}

.cookie-notice p {
    margin: 0;
}

.cookie-notice a {
    color: rgb(var(--bns-accent-rgb, 255, 90, 6));
    text-decoration: underline;
}

.cookie-notice__ok {
    align-self: flex-end;
    min-height: 40px;
    padding: 0 20px;
    border: 0;
    border-radius: 8px;
    background: rgb(var(--bns-accent-rgb, 255, 90, 6));
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.cookie-notice__ok:hover,
.cookie-notice__ok:focus-visible {
    filter: brightness(1.12);
}

@media (min-width: 640px) {
    .cookie-notice {
        flex-direction: row;
        align-items: center;
    }

    .cookie-notice__ok {
        align-self: center;
        flex-shrink: 0;
    }
}

/* ---------- Pagina da politica ---------- */
.legal-page {
    min-height: 100vh;
    max-width: 820px;
    margin: 0 auto;
    padding: 16px 16px 32px;
    color: var(--bns-text, #f3f4f6);
    font-family: var(--bns-font, "Plus Jakarta Sans", system-ui, sans-serif);
}

.legal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bns-border, rgba(255, 255, 255, 0.07));
}

.legal-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.legal-brand img {
    width: 36px;
    height: 36px;
}

.legal-cta {
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(var(--bns-accent-rgb, 255, 90, 6), 0.15);
    color: rgb(var(--bns-accent-rgb, 255, 90, 6));
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    white-space: nowrap;
}

.legal-doc h1 {
    margin: 24px 0 4px;
    font-size: 1.75rem;
    font-weight: 700;
}

.legal-doc h2 {
    margin: 28px 0 8px;
    font-size: 1.15rem;
    font-weight: 700;
}

.legal-doc p,
.legal-doc li {
    color: var(--bns-text-muted, #9ca3af);
    line-height: 1.65;
}

.legal-doc strong {
    color: var(--bns-text, #f3f4f6);
}

.legal-doc a {
    color: rgb(var(--bns-accent-rgb, 255, 90, 6));
}

.legal-doc code {
    color: var(--bns-text, #f3f4f6);
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    word-break: break-all;
}

.legal-meta {
    margin: 0 0 16px;
    font-size: 0.85rem;
}

.legal-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--bns-border, rgba(255, 255, 255, 0.07));
    border-radius: var(--bns-radius-sm, 10px);
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.legal-table th,
.legal-table td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--bns-border, rgba(255, 255, 255, 0.07));
}

.legal-table th {
    color: var(--bns-text, #f3f4f6);
    background: var(--bns-surface, #15171e);
    font-weight: 600;
}

.legal-table td {
    color: var(--bns-text-muted, #9ca3af);
}

.legal-table tr:last-child td {
    border-bottom: 0;
}

/* Celular: tabela vira cartoes empilhados, sem rolagem lateral */
@media (max-width: 599px) {
    .legal-table thead {
        display: none;
    }

    .legal-table,
    .legal-table tbody,
    .legal-table tr,
    .legal-table td {
        display: block;
        width: 100%;
    }

    .legal-table tr {
        padding: 8px 0;
        border-bottom: 1px solid var(--bns-border, rgba(255, 255, 255, 0.07));
    }

    .legal-table tr:last-child {
        border-bottom: 0;
    }

    .legal-table td {
        padding: 4px 12px;
        border-bottom: 0;
    }
}

.legal-foot {
    margin-top: 40px;
    color: var(--bns-text-muted, #9ca3af);
    font-size: 0.8rem;
    text-align: center;
}

/* Link da politica no rodape do login e da landing */
.auth-portal__footer a,
.lp-foot a {
    color: inherit;
    text-decoration: underline;
}

.site-footer__cnpj a {
    color: inherit;
    text-decoration: underline;
}
