/* Tepelná kalkulačka – frontend */

.tck {
	--tck-radius: 0;
	--tck-border: #E4E7EB;
	--tck-text: inherit;
	--tck-muted: #4B5A62;
	--tck-bg: #fff;
	--tck-gap: 24px;
	--tck-ink: #05172D;
	--tck-cta: #ED1C24;
	--tck-savings: #ED1C24;
	--tck-accent: #0066A0;

	max-width: 100%;
	margin: 0 auto;
	color: var(--tck-text);
	text-align: center;
}

.tck *,
.tck *::before,
.tck *::after {
	box-sizing: border-box;
}

/* ---------- Kroky ---------- */

/* Odsazení pro odskok na krok – kvůli sticky menu nad obsahem. */
.tck-step,
.tck-results-wrap {
	scroll-margin-top: var(--tck-scroll-offset, 100px);
}

.tck-step {
	padding: 39px 0;
}

.tck-step:first-child {
	border-top: 0;
	padding-top: 8px;
}

.tck-step.is-hidden {
	display: none;
}

.tck-step__head {
	margin-bottom: 32px;
}

.tck-step__counter {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 2px;
	margin: 0;
	font-size: 1.125rem;
	line-height: 1;
	color: var(--tck-ink);
}

.tck-step__counter-current {
	font-weight: 700;
	color: var(--tck-accent);
}

.tck-step__counter-total {
	color: var(--tck-ink);
}

.tck-step__title {
	margin: 0;
	font-size: 24px;
	line-height: 1.25;
	font-weight: 700;
}

.tck-step__subtitle {
	margin: 32px auto 0;
	max-width: 727px;
	color: var(--tck-muted);
	line-height: 1.44;
	font-size: 18px;
	letter-spacing: -0.5px;
	font-weight: 300;
}

/* ---------- Dlaždice ---------- */

.tck-tiles {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	gap: var(--tck-gap);
}

/* Dlaždice má vždy čtvrtinovou šířku containeru – nezávisle na tom,
   kolik jich v kroku je. Odečítá se podíl mezer čtyřsloupcového řádku. */
.tck-tile {
	--tck-tile-cols: 4;
	flex: 0 0 calc(
		(100% - (var(--tck-gap) * (var(--tck-tile-cols) - 1))) / var(--tck-tile-cols)
	);
	max-width: calc(
		(100% - (var(--tck-gap) * (var(--tck-tile-cols) - 1))) / var(--tck-tile-cols)
	);
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 16px;
	padding: 48px 18px;
	background: var(--tck-bg);
	border: 1px solid var(--tck-border);
	border-radius: var(--tck-radius);
	cursor: pointer;
	font: inherit;
	color: inherit;
	text-align: center;
	transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

/*.tck-tile:hover {
	border-color: var(--tck-accent);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}*/

/*.tck-tile:focus-visible {
	outline: 2px solid var(--tck-accent);
	outline-offset: 3px;
}*/

.tck-tile.is-selected {
	background: var(--tck-accent);
}

.tck-tile.is-selected .tck-tile__label {
	color: var(--tck-bg);
}

.tck-tile__icon {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
}

.tck-tile__icon-default,
.tck-tile__icon-active {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

/* Druhá ikona se ukáže až u vybrané dlaždice. */
.tck-tile__icon-active {
	display: none;
}

.tck-tile.has-active-icon.is-selected .tck-tile__icon-default {
	display: none;
}

.tck-tile.has-active-icon.is-selected .tck-tile__icon-active {
	display: flex;
}

.tck-tile__icon img,
.tck-tile__svg {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.tck-tile__label {
	font-weight: 700;
	color: #ED1C24;
	font-size: 16px;
	line-height: 1.25;
}

.tck-tile__note {
	font-weight: 400;
	font-size: 12px;
}

/* ---------- Navigace ---------- */

.tck-nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 28px;
}

/* Tlačítka patří jen k poslednímu zobrazenému kroku. */
.tck-step:not(.is-current) .tck-nav {
	display: none;
}

.tck-btn {
	appearance: none;
	font: inherit;
	font-weight: 700;
	padding: 12px 14px;
	border-radius: 0;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tck-btn:focus-visible {
	outline: 2px solid var(--tck-accent);
	outline-offset: 3px;
}

.tck-btn--primary {
	background: #ED1C24;
	color: #fff;
	border-radius: 0;
	font-size: 14px;
	font-weight: 700;
	padding: 12px 34px 12px 14px;
	transition: ease all 0.2s;
	position: relative;
}

.tck-btn--primary::after,
.tck-btn--ghost::before {
	content: "";
    display: inline-block;
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
    background-color: #FAA3A3;
    width: 16px;
    height: 16px;
    mask-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2020%2020%22%20version%3D%221.1%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%0D%0A%20%20%20%20%3Cpath%20d%3D%22M11.894%2C3.896L11.311%2C4.479L15.997%2C9.165L0.828%2C9.165L0.828%2C10.836L15.997%2C10.836L11.311%2C15.522L11.894%2C16.105C12.215%2C16.426%2012.487%2C16.689%2012.499%2C16.689C12.511%2C16.689%2014.026%2C15.184%2015.865%2C13.345L19.209%2C10.001L15.865%2C6.657C14.026%2C4.817%2012.511%2C3.313%2012.499%2C3.313C12.487%2C3.313%2012.215%2C3.575%2011.894%2C3.896Z%22%20style%3D%22fill%3Awhite%3B%22%2F%3E%0D%0A%3C%2Fsvg%3E);
    mask-position: 0 0;
    mask-size: 100% 100%;
    mask-repeat: no-repeat;
    -webkit-mask-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2020%2020%22%20version%3D%221.1%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%0D%0A%20%20%20%20%3Cpath%20d%3D%22M11.894%2C3.896L11.311%2C4.479L15.997%2C9.165L0.828%2C9.165L0.828%2C10.836L15.997%2C10.836L11.311%2C15.522L11.894%2C16.105C12.215%2C16.426%2012.487%2C16.689%2012.499%2C16.689C12.511%2C16.689%2014.026%2C15.184%2015.865%2C13.345L19.209%2C10.001L15.865%2C6.657C14.026%2C4.817%2012.511%2C3.313%2012.499%2C3.313C12.487%2C3.313%2012.215%2C3.575%2011.894%2C3.896Z%22%20style%3D%22fill%3Awhite%3B%22%2F%3E%0D%0A%3C%2Fsvg%3E);
    -webkit-mask-position: 0 0;
    -webkit-mask-size: 100% 100%;
    transition-timing-function: ease-in-out;
    transition-property: all;
    transition-duration: 0.25s;
}

.tck-btn--ghost::before {
	left: 12px;
	right: auto;
	background-color: #ED1C24;
	transform: rotate(180deg) translateY(-50%);
	transform-origin: center 0px;
}

.tck-btn--ghost:hover::after {
	left: 10px;
}

.tck-btn--primary:hover::after {
	right: 10px;
}

.tck-btn--primary:hover {
	background: #b9191f;
}

.tck-btn--primary[disabled] {
	opacity: 0.6;
	cursor: default;
	filter: none;
}

.tck-btn--ghost {
	background: transparent;
	color: #ED1C24;
	padding-left: 34px;
	position: relative;
}

.tck-btn--ghost:hover {
	color: #b9191f;
}

/* ---------- Formulář ---------- */

.tck-form-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	text-align: left;
	max-width: 982px;
	margin: 0 auto;
}

.tck-field__label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.875rem;
	font-weight: 700;
	color: #05172D;
}

.tck-req {
	color: var(--tck-accent);
}

.tck-field__input {
	width: 100%;
	padding: 12px 16px;
	font: inherit;
	color: #05172D;
	background: var(--tck-bg);
	border: 1px solid #9AA6B0;
	border-radius: 0;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
	box-shadow: 0px -4px 12px 0px #00243914 inset;
}

.tck-field__input:focus {
	border-color: var(--tck-accent);
	outline: none;
	box-shadow: 0 0 0 3px var(--tck-accent-soft);
}

.tck-field__input.has-error {
	border-color: #d63638;
}

.tck-nav--submit .tck-btn--primary {
	font-size: 18px;
	line-height: 1.11;
	padding: 22px 58px 22px 32px;
}

.tck-nav--submit .tck-btn--primary::after {
	width: 20px;
	height: 20px;
	right: 28px;
}

.tck-nav--submit .tck-btn--primary:hover::after {
	right: 24px;
}

.tck-gdpr {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 10px;
	margin-top: 22px;
	text-align: left;
	font-size: 14px;
	font-weight: 300;
	color: var(--tck-muted);
	cursor: pointer;
}


.tck-gdpr input {
	flex: 0 0 auto;
	width: 20px;
    height: 20px;
	margin-top: 1px;
    border-radius: 0 !important;
    border: 1px solid #D4D4D4;
    background-color: #fff;
	appearance: none;
    display: inline-block;
    padding: 0;
    vertical-align: middle;
    background-origin: border-box;
    user-select: none;
    cursor: pointer;
    opacity: 1;
}

.tck-gdpr input:checked {
    border-color: transparent;
    background-color: currentColor;
    background-size: 100% 100%;
    background-position: center;
	background-color: #ED1C24 !important;
    background-repeat: no-repeat;
	background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}

.tck-gdpr input:focus {
	outline: 2px solid #0066A0 !important;;
    border: 1px solid #D4D4D4 !important;;
    outline-offset: 2px;
    box-shadow: none;
}

.tck-gdpr input:checked:focus {
    border: 1px solid #ED1C24 !important;;
}


.tck-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.tck-step__error {
	margin: 16px 0 0;
	min-height: 0;
	color: #d63638;
	font-size: 0.9375rem;
}

.tck-step__error:not(.is-visible) {
	display: none;
}

/* ---------- Výsledky ---------- */

.tck-results {
	padding: 138px 0 8px;
}

.tck-results__title {
	margin: 0 0 8px;
	font-size: 24px;
	letter-spacing: -0.5px;
	color: #05172d;
	font-weight: 700;
	position: relative;
}

.tck-results__title::before {
	content: "";
	position: absolute;
	top: -60px;
	left: 50%;
	transform: translateX(-50%);
	width: 48px;
	height: 48px;
	display: block;
	background: url("/wp-content/uploads/2026/08/check.svg") center center no-repeat;
	background-size: contain;
}


.tck-results__summary {
	display: none;
}

.tck-results__note {
	margin-top: 20px;
	color: var(--tck-muted);
	font-size: 16px;
	font-weight: 300;
}

.tck-results__empty {
	color: var(--tck-muted);
}

.tck-results__footnote {
	margin: 92px auto 0;
	font-size: 16px;
	line-height: 1.6;
	color: #05172d;
	font-weight: 300;
}

/* Blok = řádek produktů + navázaný pruh s úsporami.
   Šířka je vždy násobek 25 %, takže jeden produkt zůstane ve čtvrtině. */

.tck-block {
	--tck-cols: 4;
	margin-top: 56px;
}

.tck-block + .tck-block {
	margin-top: 72px;
}

.tck-products,
.tck-savings__values,
.tck-savings__rules {
	display: grid;
	grid-template-columns: repeat(var(--tck-cols), minmax(0, 1fr));
	gap: 28px;
	width: calc(var(--tck-cols) * 25%);
	margin-inline: auto;
}

/* ---------- Karta produktu ---------- */

.tck-product {
	position: relative;
	display: flex;
	flex-direction: column;
	margin-top: 90px;
	padding: 96px 20px 34px;
	border: 1px solid #e4e7eb;
	background: #fbfcfd;
	text-align: center;
	color: var(--tck-ink);
}

.tck-product__media {
	position: absolute;
	top: -120px;
	left: 50%;
	transform: translateX(-50%);
	width: 76%;
	height: 200px;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

.tck-product__img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

.tck-product__body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: auto;
}

.tck-product__spec {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.4;
	font-weight: 300;
}

.tck-product__spec strong {
	font-weight: 700;
}

.tck-product__title {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.tck-product__subtitle {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.4;
}

.tck-product__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 12px;
	font-weight: 700;
	color: var(--tck-cta);
	text-decoration: none;
	border: 0;
}

.tck-product__link:hover span {
	text-decoration: underline;
	color: var(--tck-cta);
}

.tck-product__link:hover .tck-product__arrow {
	transform: translateX(4px);
	color: var(--tck-cta);
}

.tck-product__arrow {
	width: 22px;
	height: 22px;
	flex: 0 0 22px;
	transition: transform 0.18s ease;
}

/* Úspora uvnitř karty – používá se tam, kde se řádek produktů zalomí
   a samostatný pruh s čarami by ztratil vazbu na svůj produkt. */
.tck-product__saving {
	display: none;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid var(--tck-border);
	text-align: center;
}

.tck-product__saving-caption {
	font-size: 0.9375rem;
	color: var(--tck-ink);
}

.tck-product__saving-value {
	font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
	font-weight: 800;
	line-height: 1.15;
	color: var(--tck-savings);
}

.tck-product__saving-value--long {
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.45;
}

/* ---------- Pruh s úsporami ---------- */

.tck-savings {
	margin-top: 34px;
}

/* Svislé čáry leží ve stejné mřížce jako produkty i procenta,
   takže míří přesně ze středu boxu do středu čísla pod ním. */
.tck-savings__rules {
	position: relative;
	margin-bottom: 18px;
}

.tck-savings__rule {
	display: block;
	width: 2px;
	height: 39px;
	margin-inline: auto;
	background: var(--tck-savings);
}

/* Sloupec bez vyplněné úspory – buňka zůstává kvůli zarovnání, čára ne. */
.tck-savings__rule.is-empty {
	background: none;
}

.tck-savings__caption {
	margin: 0;
	font-size: 20px;
	line-height: 1.4;
	color: #05172D;
	text-align: center;
}

/* Dva produkty: popisek mezi čárami. */
.tck-savings__caption--between {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	max-width: calc(50% - 32px);
	background: var(--tck-bg);
	padding: 0 8px;
}

/* Jeden produkt: popisek na místě čáry. */
.tck-savings__caption--above {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	margin-bottom: 18px;
}

/* Tři a více produktů: popisek pod čísly. */
.tck-savings__caption--below {
	margin-top: 18px;
}

.tck-saving {
	margin: 0;
	font-size: clamp(1.5rem, 1rem + 1.6vw, 2.5rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--tck-savings);
	text-align: center;
}

.tck-saving--long {
	font-size: clamp(0.9375rem, 0.85rem + 0.4vw, 1.0625rem);
	font-weight: 600;
	line-height: 1.45;
}

.tck-saving__mark {
	font-size: 0.5em;
	font-weight: 600;
	vertical-align: super;
	margin-left: 4px;
}

/* ---------- Responsivita ---------- */

/*
 * Produkty drží čtvrtinovou šířku, dokud se jich vejde vedle sebe rozumný počet.
 * Jakmile se počet sloupců sníží pod počet produktů, řádek se zalomí – pruh
 * s čarami by pak mířil jinam, takže se schová a úspora se přesune do karty.
 */

@media (max-width: 1280px) {
	.tck-block--cols-4 .tck-products,
	.tck-block--cols-4 .tck-savings__values,
	.tck-block--cols-4 .tck-savings__rules {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		width: 100%;
	}

	.tck-block--cols-4 .tck-savings {
		display: none;
	}

	.tck-block--cols-4 .tck-product__saving {
		display: flex;
	}
}

@media (max-width: 1024px) {
	/* Tablet: čtvrtina je už moc úzká, produkty dostanou třetinu až polovinu. */
	.tck-block--cols-3 .tck-products,
	.tck-block--cols-3 .tck-savings__values,
	.tck-block--cols-3 .tck-savings__rules,
	.tck-block--cols-4 .tck-products,
	.tck-block--cols-4 .tck-savings__values,
	.tck-block--cols-4 .tck-savings__rules {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		width: 100%;
	}

	.tck-block--cols-2 .tck-products,
	.tck-block--cols-2 .tck-savings__values,
	.tck-block--cols-2 .tck-savings__rules {
		width: 100%;
	}

	.tck-block--cols-1 .tck-products,
	.tck-block--cols-1 .tck-savings__values,
	.tck-block--cols-1 .tck-savings__rules {
		width: 50%;
	}

	.tck-block--cols-3 .tck-savings {
		display: none;
	}

	.tck-block--cols-3 .tck-product__saving {
		display: flex;
	}

	.tck-tile {
		--tck-tile-cols: 3;
	}
}

@media (max-width: 860px) {
	.tck-tile {
		--tck-tile-cols: 2;
	}

	.tck-form-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.tck-tile {
		--tck-tile-cols: 1;
		flex: 0 0 100%;
		max-width: 100%;
		flex-direction: row;
		justify-content: flex-start;
		text-align: left;
		padding: 16px;
	}

	.tck-tile__icon {
		width: 40px;
		height: 40px;
		flex: 0 0 40px;
	}

	.tck-form-grid {
		grid-template-columns: 1fr;
	}

	.tck-nav .tck-btn {
		flex: 1 1 100%;
	}

	.tck-products,
	.tck-savings__values,
	.tck-savings__rules {
		grid-template-columns: 1fr;
		width: 100%;
		gap: 16px;
	}

	/* Na mobilu je úspora vždy hned pod svým produktem. */
	.tck-savings {
		display: none;
	}

	.tck-product__saving {
		display: flex;
	}

	.tck-product {
		margin-top: 70px;
		padding: 74px 18px 26px;
	}

	.tck-product__media {
		top: -80px;
		height: 150px;
	}

	.tck-product__saving {
		margin-top: 16px;
		padding-top: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tck * {
		transition: none !important;
	}
}
