/* Rendiconto premio nella scheda Liquidazioni del contratto (web/js/views/settlements/premium-summary.js). Usa i token di app.css. */

.ps-card .card-header { align-items: center; }
.ps-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ps-hint { margin: -6px 0 12px; color: var(--muted); font-size: 12.5px; }
.ps-period { min-width: 150px; padding: 5px 10px; }

.ps-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ps-table th,
.ps-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ps-table thead th { position: static; text-align: right; white-space: normal; vertical-align: bottom; }
.ps-table thead th:first-child { text-align: left; }
.ps-table thead th small { display: block; max-width: 17ch; margin-left: auto; margin-top: 1px; color: var(--faint); font-size: 11px; font-weight: 450; }
.ps-table tbody th.ps-name { background: none; position: static; font-weight: 550; color: var(--text); text-align: left; font-size: 13px; }
.ps-table tbody tr:last-child th,
.ps-table tbody tr:last-child td { border-bottom: none; }

.ps-sub { display: block; max-width: 19ch; margin-left: auto; color: var(--muted); font-size: 11.5px; font-weight: 450; line-height: 1.35; white-space: normal; }
.ps-rate { font-weight: 650; }
.ps-excl { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.ps-premium { font-weight: 700; font-size: 14px; color: var(--text); }

.ps-table tbody tr.ps-total th.ps-name,
.ps-table tbody tr.ps-total td { background: var(--accent-soft); }
.ps-table tbody tr.ps-total th.ps-name { font-weight: 700; }
.ps-row.ps-total .ps-premium { font-size: 20px; font-weight: 750; letter-spacing: -0.01em; }
.ps-table tbody tr.ps-zero th.ps-name { color: var(--muted); font-weight: 450; }

.ps-note { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; }
.ps-details { margin-top: 10px; }
.ps-details summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.ps-detail { margin: 8px 0 0 4px; font-size: 13px; }
.ps-detail ul { margin: 4px 0 0; padding-left: 18px; color: var(--muted); }
.ps-detail li { margin: 2px 0; }
.ps-detail li .ps-excl { color: inherit; }

.ps-val { display: block; }

/* Scheda stretta (PDF e assistente affiancati, telefono): ogni società diventa un blocco con le sue voci in colonna. */
.ps-card { container-type: inline-size; }
@container (max-width: 780px) {
  .ps-table,
  .ps-table tbody,
  .ps-table tr { display: block; }
  .ps-table thead { display: none; }
  .ps-table tbody tr { padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .ps-table tbody tr:last-child { border-bottom: none; }
  .ps-table tbody th.ps-name { display: block; max-width: none; padding: 0 0 6px; border: none; font-size: 13.5px; }
  .ps-table tbody tr.ps-total { background: var(--accent-soft); }
  .ps-table tbody tr.ps-total th.ps-name,
  .ps-table tbody tr.ps-total td { background: none; }
  .ps-table tbody tr.ps-zero td { display: none; }
  .ps-table tbody tr.ps-zero td.ps-premium { display: flex; }
  .ps-table tbody td { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 2px 0; border: none; white-space: normal; }
  .ps-table tbody td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 450; }
  .ps-table tbody td .ps-val { text-align: right; }
  .ps-table tbody td.ps-premium { margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--border); }
  .ps-table tbody td.ps-premium::before { color: var(--text); font-weight: 550; }
  .ps-sub { max-width: none; margin-left: 0; }
  .ps-row.ps-total .ps-premium { font-size: 18px; }
}
