/*
 * Tuottolaskuri Core – Lainan ja korkojen vertailulaskuri.
 * Loaded only with this calculator, after the shared tabbed-calculator styles.
 */

.tlc-loan .tlc-loan-hero .tlc-hero__img { object-position: right 45%; }

/* Three tabs: one row on wide screens, 2 + 1 on narrow ones (labels stay readable). */
.tlc-loan .tlc-loan-tabs { flex-wrap: wrap; row-gap: .5rem; }
.tlc-loan .tlc-loan-tabs .tlc-ir-tab svg { width: 20px; height: 20px; flex: none; }

@container tlc (max-width: 640px) {
	.tlc-loan .tlc-loan-tabs .tlc-ir-tab { flex: 1 1 calc(50% - .5rem); min-width: 0; }
	.tlc-loan .tlc-loan-tabs .tlc-ir-tab:last-child { flex-basis: 100%; grid-column: 1 / -1; }
}

/* Loan offers */
.tlc-loan .tlc-loan-offer {
	margin: 0 0 1rem;
	padding: 0 1rem 1rem;
	border: 1px solid #dbe6f5;
	border-radius: 14px;
	background: #fbfdff;
	min-width: 0;
}

.tlc-loan .tlc-loan-offer__title {
	display: flex;
	align-items: center;
	gap: .5rem;
	width: calc(100% + 2rem);
	margin: 0 -1rem .85rem;
	padding: .6rem 1rem;
	border-radius: 13px 13px 0 0;
	background: #e9f1fd;
	font-size: 1.0625rem;
	font-weight: 700;
	color: var(--tlc-navy);
}

.tlc-loan .tlc-loan-offer--a .tlc-loan-offer__title svg { color: var(--tlc-primary); }
.tlc-loan .tlc-loan-offer--b .tlc-loan-offer__title { background: #e5f5f0; }
.tlc-loan .tlc-loan-offer--b .tlc-loan-offer__title svg { color: var(--tlc-positive-text); }
.tlc-loan .tlc-loan-offer__grid { display: grid; gap: .75rem 1rem; }

@container tlc-settings (min-width: 400px) {
	.tlc-loan .tlc-loan-offer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container tlc-settings (min-width: 600px) {
	.tlc-loan .tlc-loan-offer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.tlc-loan .tlc-mach-select { width: 100%; }

/* A vs B pairs */
.tlc-loan .tlc-loan-pairs { display: grid; gap: .6rem; margin-top: 1rem; }

@container tlc-results (min-width: 420px) {
	.tlc-loan .tlc-loan-pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.tlc-loan .tlc-loan-pair__vals { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .35rem; }
.tlc-loan .tlc-loan-pair__vals p { margin: 0; }
.tlc-loan .tlc-loan-pair__vals p + p { padding-left: .6rem; border-left: 1px solid #dbe6f5; }
.tlc-loan .tlc-loan-pair__vals span { display: block; font-size: .75rem; color: var(--tlc-muted); }
.tlc-loan .tlc-loan-pair__vals b { font-size: 1.125rem; color: var(--tlc-navy); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tlc-loan .tlc-loan-pair__vals b.is-positive { color: var(--tlc-positive-text); }

.tlc-loan .tlc-ir-highlight.is-neutral { background: #f1f5fb; border-color: #dbe6f5; }
.tlc-loan .tlc-ir-highlight.is-neutral .tlc-ir-highlight__value { color: var(--tlc-navy); }
.tlc-loan .tlc-loan-chart { margin-top: 1.25rem; }
