/* ============================================================================
   Documenti legali (informativa privacy, termini del servizio)
   ----------------------------------------------------------------------------
   I documenti arrivano da S3 come frammenti HTML generati dal tool di
   documentazione (classi table/entry/row/ph) e vengono mostrati in un iframe
   con srcdoc: dentro l'iframe non vale nessun CSS della pagina, quindi la
   cornice (Views/Account/Terms.cshtml e Policy.cshtml) collega questo foglio.
   Stesse famiglie e colori del sito pubblico.
   ============================================================================ */
body {
    margin: 0;
    padding: 1.5rem 1.75rem 2rem;
    color: #1f2933;
    background: #ffffff;
    font-family: "Inter", "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}
h1 { margin: 0 0 1rem; font-family: "Barlow", "Segoe UI", Arial, sans-serif; font-size: 1.9rem; line-height: 1.15; color: #111f45; }
h2, h3 { font-family: "Barlow", "Segoe UI", Arial, sans-serif; color: #1f4e5f; margin: 1.6rem 0 .5rem; }
p { margin: 0 0 .7rem; }
p:empty { margin: 0; height: .5rem; }
strong { color: #111f45; }
ol, ul { margin: .4rem 0 1rem; padding-left: 1.4rem; }
li { margin-bottom: .4rem; }
a { color: #1f4e5f; }

/* Tabelle: bordi leggeri, intestazione evidenziata, celle allineate in alto. */
table {
    width: 100%;
    margin: .8rem 0 1.4rem;
    border-collapse: collapse;
    border: 1px solid #d3d8de;
    font-size: 14px;
}
caption:empty { display: none; }
th, td {
    padding: .6rem .75rem;
    border: 1px solid #d3d8de;
    vertical-align: top !important;
    text-align: left;
}
th {
    background: #eef3f5;
    color: #1f4e5f;
    font-weight: 700;
}
tr:nth-child(even) td { background: #fafbfc; }

/* Colonna "Obbligatorio per l'erogazione del servizio": valori brevi (Si / No)
   sotto un'intestazione lunga. Centrati e in grassetto si leggono a colpo d'occhio. */
table th:nth-child(4), table td:nth-child(4) { text-align: center !important; }
table td:nth-child(4) { font-weight: 700; color: #1f4e5f; white-space: nowrap; }

/* Larghezze delle tabelle a quattro colonne: il documento le fissa al 25% ciascuna con uno
   stile inline sui <col>; qui si stringe la colonna Obbligatorio e si allarga Note.
   L'intestazione lunga della quarta colonna va a capo da sola. */
table col:first-child:nth-last-child(4) { width: 20% !important; }
table col:nth-child(2):nth-last-child(3) { width: 26% !important; }
table col:nth-child(3):nth-last-child(2) { width: 42% !important; }
table col:nth-child(4):last-child { width: 12% !important; }

/* Tabelle a due colonne (dati del titolare): prima colonna come etichetta. */
table td:first-child:nth-last-child(2) { color: #6b7280; width: 32%; }

@media (max-width: 640px) {
    body { padding: 1rem; font-size: 14px; }
    table { font-size: 13px; }
    th, td { padding: .45rem .5rem; }
}
