/*
 * RoofCostChecker.com - Roofing Material Comparison (TCO) styles
 * File: estimator/assets/rcc-tco.css
 * Depends on rcc-core.css for tokens. Scoped under .rcc-est--tco. Matte only:
 * no glows, no shadows, no gradients.
 *
 * v0.6.1: rewritten for the dark hero. The previous sheet predated the
 * v0.3.0 redesign and used retired light-theme tokens (near-white borders,
 * transparent best-row highlight). The injected table now sits in the
 * flagship's dark panel with hero hairlines and the amber best-row accent.
 */

/* Panel around the injected table (mirrors .rcc-est__breakdown in core). */
.rcc-hero .rcc-est--tco__table {
	margin: 14px 14px 6px;
	background: var(--rcc-hero-2);
	border: 1px solid var(--rcc-hero-line);
	border-radius: 12px;
	padding: 4px 16px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.rcc-hero .rcc-est--tco__table:empty { display: none; }

.rcc-tco__table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rcc-tco__table th,
.rcc-tco__table td {
	text-align: left;
	padding: 10px 10px;
	border-bottom: 1px solid var(--rcc-hero-line);
	font-variant-numeric: tabular-nums;
	color: var(--rcc-hero-mute);
}
.rcc-tco__table tr:last-child td { border-bottom: 0; }
.rcc-tco__table th {
	color: var(--rcc-hero-faint);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.rcc-tco__table td:first-child { color: var(--rcc-hero-fg); font-weight: 600; }
.rcc-tco__table tr.is-best td {
	background: var(--rcc-hero-3);
	color: var(--rcc-hero-fg);
	font-weight: 700;
}
.rcc-tco__table tr.is-best td:first-child {
	border-left: 3px solid var(--rcc-amber);
	padding-left: 7px;
}

/* The one-line conclusion under the table reads at body prominence. */
.rcc-est--tco .rcc-calc__output > .rcc-note[data-rcc="takeaway"] {
	color: var(--rcc-hero-mute);
	font-size: 13.5px;
	margin: 10px 26px 0;
}

/* The lede above the table reads as its caption, not fine print. */
.rcc-est--tco .rcc-calc__output > .rcc-note[data-rcc="caption"] {
	color: var(--rcc-hero-mute);
	font-size: 13px;
	margin: 2px 26px 0;
}

@media (max-width: 560px) {
	.rcc-tco__table th, .rcc-tco__table td { padding: 9px 7px; }
	/* Phones drop the "over N years" column; install, life, and cost/year
	 * carry the ranking, and the takeaway line states the conclusion. */
	.rcc-tco__table th:nth-child(5), .rcc-tco__table td:nth-child(5) { display: none; }
}
