/* Pagine dei rendimenti dei titoli di Stato (rendimenti-btp.html, btp.html).
   Si appoggia a calc-style.css (layout dei calcolatori); qui solo tabella, filtri e schede. */

.btp-aggiornamento { margin-top: 10px; font-size: 13px; color: #64748b; }
.btp-aggiornamento i { margin-right: 4px; }
.btp-h2 { font-size: 22px; font-weight: 800; color: #1e2a4f; margin: 0 0 6px; }
.btp-nota { font-size: 13px; color: #64748b; margin: 6px 0 14px; line-height: 1.5; }

/* I migliori per durata */
.btp-migliori { margin: 0 0 28px; }
.btp-migliori-griglia { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.btp-migliori-card { background: #fff; border: 1px solid #e3e8f0; border-radius: 14px; padding: 14px 16px; }
.btp-migliori-card h3 { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #00a845; margin: 0 0 8px; }
.btp-migliori-card ol { margin: 0; padding: 0; list-style: none; counter-reset: btp; }
.btp-migliori-card li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid #f1f5f9; font-size: 14px; counter-increment: btp; }
.btp-migliori-card li:first-child { border-top: 0; }
.btp-migliori-card li a { color: #1e2a4f; font-weight: 600; text-decoration: none; }
.btp-migliori-card li a::before { content: counter(btp) ". "; color: #94a3b8; }
.btp-migliori-card li a:hover { text-decoration: underline; }
.btp-migliori-rend { font-weight: 800; color: #00a845; white-space: nowrap; }

/* Filtri */
.btp-tabella-card { display: block; }
.btp-filtri { margin: 10px 0 8px; }
.btp-tipi { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.btp-chip { border: 1px solid #d5dce6; background: #fff; color: #334155; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btp-chip:hover { border-color: #00c951; }
.btp-chip.attivo { background: #1e2a4f; border-color: #1e2a4f; color: #fff; }
.btp-chip-pref i { color: #e11d48; }
.btp-chip-pref.attivo i { color: #fff; }
.btp-filtri-riga { display: grid; grid-template-columns: 220px 1fr; gap: 10px; }
.btp-filtri-riga .input-field { margin: 0; }
.btp-conteggio { font-size: 13px; color: #64748b; margin: 8px 0 0; }

/* Tabella */
.btp-tabella-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
.btp-tabella { width: 100%; border-collapse: collapse; font-size: 14px; }
.btp-tabella th { position: sticky; top: 0; background: #f4f7fb; color: #475569; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; text-align: left; padding: 10px 8px; border-bottom: 2px solid #e3e8f0; white-space: nowrap; }
.btp-tabella th[data-ordina] { cursor: pointer; user-select: none; }
.btp-tabella th[data-ordina]::after { content: " \2195"; color: #cbd5e1; font-weight: 400; }
.btp-tabella th[aria-sort="ascending"]::after { content: " \2191"; color: #1e2a4f; }
.btp-tabella th[aria-sort="descending"]::after { content: " \2193"; color: #1e2a4f; }
.btp-tabella td { padding: 9px 8px; border-bottom: 1px solid #eef1f6; vertical-align: top; }
.btp-tabella tr:hover td { background: #fafcff; }
.btp-tabella tr.btp-preferito td { background: #fff7f9; }
.btp-tabella .btp-num { text-align: right; white-space: nowrap; }
.btp-tabella td small { display: block; font-size: 11px; color: #94a3b8; font-weight: 400; }
.btp-titolo a { color: #1e2a4f; font-weight: 700; text-decoration: none; }
.btp-titolo a:hover { text-decoration: underline; }
.btp-netto { font-weight: 800; color: #00a845; }
.btp-col-pref { width: 34px; padding-left: 2px !important; padding-right: 0 !important; }
.btp-cuore { border: 0; background: none; cursor: pointer; color: #e11d48; font-size: 16px; padding: 2px 4px; }
.btp-tabella tr[hidden] { display: none; }

@media (max-width: 1023px) { .btp-col-lg { display: none; } }
@media (max-width: 767px) {
	.btp-col-md { display: none; }
	.btp-filtri-riga { grid-template-columns: 1fr; }
	.btp-tabella { font-size: 13px; }
	.btp-tabella td, .btp-tabella th { padding: 8px 5px; }
}

/* Scheda del titolo */
.btp-dati { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 24px; }
.btp-dato { background: #fff; border: 1px solid #e3e8f0; border-radius: 12px; padding: 12px 14px; }
.btp-dato span { display: block; font-size: 12px; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.btp-dato strong { display: block; font-size: 20px; color: #1e2a4f; margin-top: 4px; }
.btp-dato.evidenza { border-color: #00c951; background: #f2fcf6; }
.btp-dato.evidenza strong { color: #00a845; }
.btp-dato small { display: block; font-size: 12px; color: #94a3b8; margin-top: 2px; }
.btp-grafico { width: 100%; height: 220px; }
.btp-grafico svg { width: 100%; height: 100%; display: block; }
.btp-cedole { width: 100%; border-collapse: collapse; font-size: 14px; }
.btp-cedole th, .btp-cedole td { padding: 8px; border-bottom: 1px solid #eef1f6; text-align: right; }
.btp-cedole th:first-child, .btp-cedole td:first-child { text-align: left; }
.btp-simili { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 0; }
.btp-simili a { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid #e3e8f0; border-radius: 10px; color: #1e2a4f; font-weight: 600; text-decoration: none; font-size: 14px; }
.btp-simili a:hover { border-color: #00c951; }
.btp-simili a span { color: #00a845; font-weight: 800; white-space: nowrap; }

/* Nel layout dei calcolatori (flex/grid) gli elementi non si restringono sotto il contenuto:
   senza questo la tabella e la select del calcolatore allargano la pagina su mobile. */
.calc-body .calc-container,
.calculator-card > *,
.content-row > * { min-width: 0; }
.calculator-card select.input-field { max-width: 100%; text-overflow: ellipsis; }
@media (max-width: 600px) {
	#calcolatore .estimation-details { grid-template-columns: 1fr; }
}

/* Calcolatore: 6 risultati (il layout base dei calcolatori ne prevede 2) */
#calcolatore .estimation-details { column-gap: 20px; }
#calcolatore .detail-item { display: flex; flex-direction: column; padding: 8px 0; }
#calcolatore .detail-item:last-child { padding-left: 0; border-left: 0; }
#calcolatore .detail-label { margin-bottom: 2px; font-size: 13px; }
#calcolatore .detail-value { font-size: 20px; }
#calcolatore .estimation-note { color: #ffffffd9; font-size: 13px; margin-top: 12px; }
.btp-tabella td.btp-nd { color: #94a3b8; font-weight: 600; cursor: help; }
@media (max-width: 479px) { .btp-col-sm { display: none; } }
