/* Visor de FatturaPA y .p7m (herramientas/fatturapa.js, build/herramientas/fatturapa.it.html): hoja propia (meta «css: fatturapa»), tras
   herramientas.css; clases fh-fp-*. */
.fh-fp-zona { text-align: center; border: 2px dashed var(--ft-line-strong, #CBD5E1); padding: 28px 20px; position: relative; }
.fh-fp-zona.fh-fp-sopra { border-color: #2563EB; background: #EFF6FF; }
.fh-fp-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.fh-fp-zona label.fh-btn { display: inline-block; color: #fff; margin: 0; }
.fh-fp-input:focus-visible + label { outline: 3px solid #2563EB; outline-offset: 2px; }
.fh-fp-zona-t { margin: .6rem 0 0; font-weight: 600; color: var(--ft-ink, #0C0D14); }
.fh-fp-zona .fh-priv, .fh-fp-zona .fh-nota { margin-left: auto; margin-right: auto; }
.fh-fp-zona .fh-priv { text-align: left; }
.fh-fp-out:focus { outline: none; }
.fh-fp-azioni { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 .8rem; }
.fh-fp-btn { display: inline-block; background: #fff; color: #1D4ED8; border: 1.5px solid #2563EB; border-radius: 8px; padding: .65rem 1.1rem;
  font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none; }
.fh-fp-btn:hover { background: #EFF6FF; }
.fh-fp-btn:focus-visible { outline: 3px solid #2563EB; outline-offset: 2px; }
.fh-fp-info { font-size: .93rem; margin: 0 0 1rem; color: var(--ft-muted, #79808F); }
.fh-fp-doc { border-top: 1px solid var(--ft-line, #E6E9F0); padding-top: .8rem; }
.fh-fp-testa { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ft-muted, #79808F); margin: 0 0 .6rem; }
.fh-fp-parti { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.fh-fp-blocco { margin: 1.1rem 0 0; }
.fh-fp-parti .fh-fp-blocco { margin: 0; border: 1px solid var(--ft-line, #E6E9F0); border-radius: 10px; padding: 12px 14px; }
.fh .fh-fp-blocco h3 { font-size: 1rem; color: var(--ft-ink, #0C0D14); margin: 0 0 .4rem; }
.fh-fp-doc .fh-datos { grid-template-columns: minmax(9rem, 15rem) minmax(0, 1fr); }
.fh-fp-parti .fh-datos { grid-template-columns: minmax(7rem, 40%) minmax(0, 1fr); }
.fh-fp-sub { border-top: 1px solid var(--ft-line, #E6E9F0); margin-top: .7rem; padding-top: .5rem; }
.fh-fp-nome { font-weight: 700; font-size: 1.08rem; color: var(--ft-ink, #0C0D14); margin: 0 0 .3rem; }
.fh-fp-doc .fh-datos dd { font-family: inherit; }
.fh-fp-nota { display: block; font-size: .85rem; color: var(--ft-muted, #79808F); }
.fh-fp-corpo { border-top: 2px solid var(--ft-ink, #0C0D14); margin-top: 1.4rem; padding-top: .6rem; }
.fh-fp-lotto { font-size: .9rem; font-weight: 600; margin: 0; color: var(--ft-muted, #79808F); }
.fh .fh-fp-titolo { margin: .2rem 0 .6rem; font-size: 1.25rem; }
.fh-fp-tab td { white-space: normal; vertical-align: top; }
.fh-fp-linee td:nth-child(2) { white-space: pre-line; min-width: 14rem; }
.fh-fp-linee td:nth-child(3), .fh-fp-linee td:nth-child(4), .fh-fp-linee td:nth-child(6), .fh-fp-riep td:nth-child(2), .fh-fp-riep td:nth-child(3),
.fh-fp-linee th:nth-child(3), .fh-fp-linee th:nth-child(4), .fh-fp-linee th:nth-child(6), .fh-fp-riep th:nth-child(2), .fh-fp-riep th:nth-child(3) { text-align: right; white-space: nowrap; }
.fh-fp-linee td:nth-child(5), .fh-fp-linee td:nth-child(7) { min-width: 7rem; }
.fh-fp-totali dd { font-weight: 700; }
.fh-fp-rata { border-left: 3px solid var(--ft-line, #E6E9F0); padding-left: .8rem; }
.fh-fp-allegati { list-style: none; padding: 0; margin: .4rem 0; }
.fh-fp-allegati li { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; padding: .5rem 0; border-top: 1px solid var(--ft-line, #E6E9F0); }
.fh-fp-allegati span { font-size: .9rem; }
.fh-fp-piede { font-size: .8rem; color: var(--ft-muted, #79808F); margin: 1.4rem 0 0; }
@media (max-width: 560px) {
  .fh-fp-tab table, .fh-fp-tab tbody, .fh-fp-tab tr, .fh-fp-tab td { display: block; width: auto; }
  .fh-fp-tab thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .fh-fp-tab tr { border-top: 1px solid var(--ft-line, #E6E9F0); padding: .4rem 0; }
  .fh-fp-tab td { border: 0; padding: .15rem 12px; text-align: left !important; white-space: normal !important; min-width: 0 !important; }
  .fh-fp-tab td::before { content: attr(data-l) ": "; font-weight: 600; color: var(--ft-ink, #0C0D14); }
  .fh-fp-linee td:nth-child(2) { white-space: pre-line !important; }
  .fh-fp-tab td:empty { display: none; }
  .fh-fp-tab caption { display: block; }
  .fh-fp-doc .fh-datos, .fh-fp-parti .fh-datos { grid-template-columns: 1fr; }
}
@media print {
  html.fh-fp-stampa body > :not(main), html.fh-fp-stampa .fh-wrap > :not(.fh-fp-out), html.fh-fp-stampa .fh-fp-out > :not(.fh-fp-doc) { display: none !important; }
  html.fh-fp-stampa .fh { padding: 0; color: #000; }
  html.fh-fp-stampa .fh-fp-out { border: 0; padding: 0; margin: 0; }
  html.fh-fp-stampa .fh-fp-doc { border: 0; padding: 0; font-size: 10pt; }
  html.fh-fp-stampa .fh-tabla { overflow: visible; border: 0; }
  html.fh-fp-stampa .fh-fp-tab tr, html.fh-fp-stampa .fh-fp-blocco dl { break-inside: avoid; }
  html.fh-fp-stampa .fh-fp-btn { display: none; }
  html.fh-fp-stampa .fh-fp-corpo { break-before: auto; }
}
