/* Páginas legais (termos, aviso legal, privacidade, cookies): botão do PDF, caixa de resumo,
   índice e listas. Sem barras laterais coloridas: contornos finos e tons suaves
   (docs/escrita-e-design.md). O PDF é feito por components/pdf-documento.js. */

/* Cabeçalho: título, data e botão à esquerda; o Tostão à direita */
.privacy-header.doc-cabecalho {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    text-align: left;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e8e8ea;
}
.doc-cabecalho-texto { min-width: 0; flex: 1; padding-bottom: 0.25rem; }
.privacy-header.doc-cabecalho h1 { text-align: left; line-height: 1.1; margin-bottom: 0.9rem; text-wrap: balance; }
.privacy-header.doc-cabecalho .last-update { color: #6e6e73; font-weight: 500; margin: 0; }
.doc-tostao { flex: none; width: auto; height: 176px; margin-bottom: -0.35rem; }

.doc-acoes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.9rem;
    margin-top: 1.4rem;
}

/* Texto alinhado à esquerda (pedido do dono, 14-11-2026), nunca justificado */
.privacy-section p { text-align: left; line-height: 1.75; }
.privacy-section h2 { line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 1.1rem; }
.doc-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.1rem;
    background: #fff;
    color: #1d1d1f;
    border: 1px solid #e0e0e6;
    border-radius: 10px;
    font-family: 'Geist', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.doc-pdf-btn svg { flex: none; color: #5753E2; }
.doc-pdf-btn:hover { border-color: #b4b2f0; color: #5753E2; background: #fbfbff; }
.doc-pdf-btn:focus-visible { outline: 2px solid #5753E2; outline-offset: 2px; }
.doc-pdf-btn:disabled { cursor: progress; color: #6e6e73; border-color: #e8e8ea; background: #fafafa; }
.doc-pdf-estado { min-height: 1.2em; font-size: 0.8125rem; color: #6e6e73; }

/* Caixa «O essencial» */
.doc-resumo {
    background: #f7f6fe;
    border: 1px solid #dddcf2;
    border-radius: 14px;
    padding: 1.5rem 1.75rem 1.35rem;
    margin: 0 0 3rem;
}
.doc-resumo h2 {
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #5753E2;
    margin: 0 0 0.85rem;
}
.doc-resumo ul { margin: 0; padding-left: 1.15rem; }
.doc-resumo li {
    color: #3c3c43;
    line-height: 1.65;
    margin-bottom: 0.5rem;
    font-size: 0.97rem;
}
.doc-resumo li:last-child { margin-bottom: 0; }
.doc-resumo li::marker { color: #5753E2; }
.doc-resumo p { color: #3c3c43; line-height: 1.65; font-size: 0.97rem; margin: 0 0 0.6rem; text-align: left; }
.doc-resumo p:last-child { margin-bottom: 0; }
.doc-resumo a { color: var(--primary); font-weight: 600; }

/* Índice */
.doc-indice {
    border: 1px solid #e8e8ea;
    border-radius: 14px;
    padding: 1.25rem 1.75rem 1.1rem;
    margin: 0 0 3.5rem;
}
.doc-indice h2 {
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #6e6e73;
    margin: 0 0 0.75rem;
}
.doc-indice ol {
    margin: 0;
    padding: 0;
    list-style: none;
    columns: 2;
    column-gap: 2.5rem;
}
.doc-indice li { break-inside: avoid; margin-bottom: 0.4rem; font-size: 0.94rem; line-height: 1.45; }
.doc-indice a { color: #3c3c43; font-weight: 500; }
.doc-indice a:hover { color: #5753E2; }

/* Títulos com âncora: o cabeçalho fixo não os tapa */
.privacy-section h2[id], .privacy-section[id] { scroll-margin-top: 92px; }
.privacy-section h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); margin: 1.75rem 0 0.85rem; }

/* Listas dentro das secções */
.privacy-section ul, .privacy-section ol { margin: 0 0 1.2rem; padding-left: 1.35rem; }
.privacy-section li {
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 0.55rem;
    font-size: 1rem;
}
.privacy-section li::marker { color: #8e8e98; }
.privacy-section li > ul, .privacy-section li > ol { margin: 0.5rem 0 0; }
.privacy-section strong { color: var(--text-primary); font-weight: 600; }

@media (max-width: 768px) {
    /* margens do telemóvel: a coluna de texto usa a largura do ecrã */
    .privacy-container:has(.doc-cabecalho) { margin-top: 0; padding: 2rem 1.25rem 3rem; }
    .privacy-container:has(.doc-cabecalho) .privacy-content { padding: 0; }
    .privacy-header.doc-cabecalho { gap: 0.75rem; margin-bottom: 2.25rem; padding-bottom: 1.5rem; }
    .privacy-header.doc-cabecalho h1 { font-size: 1.85rem; }
    .doc-tostao { height: 112px; }
    .privacy-section { margin-bottom: 2.5rem; }
    .privacy-section h2 { font-size: 1.3rem; }
    .doc-resumo, .doc-indice { padding: 1.15rem 1.15rem 1rem; }
    .doc-indice ol { columns: 1; }
}

/* Tabelas das políticas (as mesmas regras que a Política de Cookies já tinha no <head>):
   contorno fino, cabeçalho suave, deslocação horizontal em ecrãs estreitos */
.cookie-table-wrap {
    overflow-x: auto;
    margin: 0 0 1.4rem;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
}
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    min-width: 560px;
}
.cookie-table th,
.cookie-table td {
    text-align: left;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: top;
    line-height: 1.5;
    color: var(--text-body);
}
.cookie-table thead th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8125rem;
    white-space: nowrap;
}
.cookie-table tbody tr:last-child td { border-bottom: 0; }
.cookie-table code,
.privacy-section code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82em;
    background: var(--gray-100);
    padding: 0.12em 0.42em;
    border-radius: 5px;
    color: var(--gray-800);
}
.cookie-table code { white-space: nowrap; }
