/* Trikkis Calculators - follows the Woodmart theme (colours, fonts, fields, buttons) */
.tkc {
	--tkc-primary: var(--wd-primary-color, #E87524);
	--tkc-primary-soft: rgba(232, 117, 36, .08);
	--tkc-text: var(--wd-text-color, #767676);
	--tkc-title: var(--wd-title-color, #242424);
	--tkc-border: var(--brdcolor-gray-300, rgba(0, 0, 0, .1));
	--tkc-radius: 8px;
	--tkc-field-radius: 5px;
	width: 100%;
	margin: 0;
	color: var(--tkc-text);
}
.tkc *, .tkc *::before, .tkc *::after { box-sizing: border-box; }

/* progress */
.tkc-steps { display: flex; align-items: stretch; gap: 8px; list-style: none; margin: 0 0 28px !important; padding: 0 !important; counter-reset: s; }
.tkc-step { flex: 1 1 0; margin: 0 !important; list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--tkc-radius); background: #f7f7f7; color: var(--tkc-text); font-size: 14px; line-height: 1.3; min-width: 0; }
.tkc-steps__n { flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--tkc-border); font-weight: 600; color: var(--tkc-title); }
.tkc-step.is-current { background: var(--tkc-primary-soft); color: var(--tkc-title); font-weight: 600; }
.tkc-step.is-current .tkc-steps__n { background: var(--tkc-primary); border-color: var(--tkc-primary); color: #fff; }
.tkc-step.is-done .tkc-steps__n { background: var(--tkc-primary); border-color: var(--tkc-primary); color: #fff; font-size: 0; }
.tkc-step.is-done .tkc-steps__n::after { content: "✓"; font-size: 14px; }

/* cards */
.tkc-card { background: #fff; border: 1px solid var(--tkc-border); border-radius: var(--tkc-radius); padding: clamp(20px, 3vw, 36px); box-shadow: 0 6px 24px rgba(0, 0, 0, .04); }
.tkc-card + .tkc-actions, .tkc-card + .tkc-card { margin-top: 20px; }
.tkc-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.tkc-card__title { margin: 0 0 14px; font-size: 22px; color: var(--tkc-title); }
.tkc-card__head .tkc-card__title { margin: 0; }
.tkc h4 { margin: 22px 0 10px; font-size: 16px; color: var(--tkc-title); }
.tkc-lead { margin: 0 0 20px; }
.tkc-center { text-align: center; }

/* fields (inputs keep the theme's own look) */
.tkc-field { margin: 0 0 18px; min-width: 0; }
.tkc-field > label, .tkc-field > legend, .tkc-dims legend { display: block; margin-bottom: 8px; font-weight: 600; color: var(--tkc-title); font-size: 14px; padding: 0; }
.tkc fieldset { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.tkc input[type="number"], .tkc input[type="text"], .tkc input[type="email"], .tkc input[type="tel"], .tkc select, .tkc textarea { width: 100%; }
.tkc-dims label span, .tkc-vol label span { display: block; font-size: 13px; margin-bottom: 6px; }
.tkc-dims label, .tkc-vol label { display: block; margin: 0; font-weight: 400; }
.tkc .required { color: var(--tkc-primary); border: 0; text-decoration: none; }
.tkc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.tkc-grid { display: grid; gap: 0 20px; }
.tkc-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tkc-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tkc-grid--vol { grid-template-columns: minmax(0, 1fr) auto minmax(0, 3fr); align-items: end; }
.tkc-or { display: flex; align-items: center; justify-content: center; height: var(--wd-form-height, 42px); margin-bottom: 18px; padding: 0 4px; }
.tkc-or span { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--tkc-text); }

/* pill radios */
.tkc-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.tkc-pill { position: relative; cursor: pointer; margin: 0; }
.tkc-pill input { position: absolute; opacity: 0; pointer-events: none; }
.tkc-pill span { display: inline-block; padding: 10px 20px; border: 2px solid var(--tkc-border); border-radius: var(--tkc-field-radius); font-weight: 600; color: var(--tkc-title); transition: .2s; }
.tkc-pill input:checked + span { border-color: var(--tkc-primary); background: var(--tkc-primary); color: #fff; }
.tkc-pill input:focus-visible + span { outline: 2px solid var(--tkc-primary); outline-offset: 2px; }

/* buttons */
.tkc-actions { display: flex; justify-content: flex-start; align-items: center; gap: 12px; flex-wrap: wrap; margin: 24px 0 0; }
.tkc .tkc-btn { min-width: 200px; }
.tkc-link { background: none; border: 0; padding: 0; color: var(--tkc-primary); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* alerts */
.tkc-alert { margin: 0 0 18px; padding: 14px 18px; border-radius: var(--tkc-radius); background: #fff4ec; border-left: 4px solid var(--tkc-primary); color: var(--tkc-title); }

/* KPIs */
.tkc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 0 0 8px; }
.tkc-kpi { background: var(--tkc-primary-soft); border-radius: var(--tkc-radius); padding: 16px 18px; }
.tkc-kpi__v { display: block; font-size: 22px; font-weight: 700; color: var(--tkc-title); line-height: 1.2; }
.tkc-kpi__l { display: block; font-size: 13px; margin-top: 4px; }

.tkc-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; }
.tkc-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; }
.tkc-dl dt { font-weight: 600; color: var(--tkc-title); }
.tkc-dl dd { margin: 0; }
.tkc-list { margin: 0; padding-left: 18px; }
.tkc-list li { margin-bottom: 4px; }

/* tables */
.tkc-table-wrap { overflow-x: auto; border: 1px solid var(--tkc-border); border-radius: var(--tkc-radius); }
.tkc-table { width: 100%; margin: 0; border-collapse: collapse; font-size: 14px; }
.tkc-table th, .tkc-table td { padding: 10px 12px; border-bottom: 1px solid var(--tkc-border); text-align: left; vertical-align: middle; }
.tkc-table thead th { background: #f7f7f7; color: var(--tkc-title); font-weight: 600; white-space: nowrap; }
.tkc-table tbody th { font-weight: 500; color: var(--tkc-title); }
.tkc-table tr:last-child > * { border-bottom: 0; }
.tkc-months td { text-align: right; white-space: nowrap; }
.tkc-months .c-used { color: #1e73be; } .tkc-months .c-avail { color: var(--tkc-primary); } .tkc-months .c-excess { color: #2e8b57; }
.tkc-months .is-neg { color: #c0392b; font-weight: 600; }
.tkc-appliances td { width: 1%; }
.tkc-appliances td input, .tkc-appliances td select { min-width: 84px; max-width: 120px; }
.tkc-appliances tr.is-active { background: var(--tkc-primary-soft); }
.tkc-appliances tr.is-active th { font-weight: 700; }
.tkc-fixed { display: inline-block; min-width: 84px; padding: 0 8px; color: var(--tkc-title); }

.tkc-years { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.tkc-year { border: 1px solid var(--tkc-border); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.tkc-year span { display: block; }
.tkc-year strong { color: var(--tkc-title); }
.tkc-year.is-payback { border-color: var(--tkc-primary); background: var(--tkc-primary-soft); }

.tkc-note { margin: 22px 0 0; font-size: 13px; font-style: italic; }

/* thank you */
.tkc-done { text-align: center; }
.tkc-done__icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--tkc-primary); color: #fff; font-size: 30px; }

/* responsive */
@media (max-width: 900px) {
	.tkc-cols { grid-template-columns: 1fr; }
	.tkc-steps__l { display: none; }
	.tkc-step.is-current .tkc-steps__l { display: inline; }
	.tkc-step { flex: 0 0 auto; }
	.tkc-step.is-current { flex: 1; }
}
@media (max-width: 768px) {
	.tkc-grid--2, .tkc-grid--3, .tkc-grid--vol { grid-template-columns: 1fr; }
	.tkc-or { height: auto; margin: 0 0 12px; justify-content: flex-start; }
	/* appliance table -> cards */
	.tkc-appliances thead { display: none; }
	.tkc-appliances, .tkc-appliances tbody, .tkc-appliances tr { display: block; }
	.tkc-appliances tr { border-bottom: 1px solid var(--tkc-border); padding: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
	.tkc-appliances tr > th { grid-column: 1 / -1; border: 0; padding: 0; font-weight: 700; }
	.tkc-appliances td { display: block; width: auto; border: 0; padding: 0; }
	.tkc-appliances td::before { content: attr(data-label); display: block; font-size: 12px; margin-bottom: 4px; }
	.tkc-appliances td input, .tkc-appliances td select { max-width: none; }
	.tkc .tkc-btn { min-width: 0; width: 100%; }
}

/* print: only the results card */
@media print {
	body * { visibility: hidden !important; }
	#tkc-print, #tkc-print * { visibility: visible !important; }
	#tkc-print { position: absolute; left: 0; top: 0; width: 100%; border: 0; box-shadow: none; padding: 0; }
	[data-tkc-print] { display: none !important; }
	.tkc-cols { grid-template-columns: 1fr 1fr; }
}

/* match the site's Woodmart "rounded" fields and buttons */
.tkc input[type="number"], .tkc input[type="text"], .tkc input[type="email"], .tkc input[type="tel"], .tkc select, .tkc textarea {
	border-radius: var(--tkc-field-radius) !important; text-align: left;
}
.tkc input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.tkc input[type="number"]::-webkit-outer-spin-button, .tkc input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tkc .btn, .tkc a.btn, .tkc button.btn { border-radius: var(--tkc-field-radius) !important; }
.tkc-pill span { border-radius: var(--tkc-field-radius); }
.tkc .tkc-appliances thead th:not(:first-child), .tkc .tkc-appliances td { text-align: center; }
.tkc .tkc-appliances td input, .tkc .tkc-appliances td select {
	text-align: center; text-align-last: center; padding: 0 12px !important; width: 100%; min-width: 84px; max-width: 120px; margin: 0 auto; display: block;
}
.tkc .tkc-appliances td select { padding-right: 28px !important; background-position: right 10px center; }
.tkc .tkc-appliances .tkc-fixed { display: block; min-width: 84px; max-width: 120px; margin: 0 auto; padding: 0; text-align: center; }
@media (max-width: 768px) {
	.tkc .tkc-appliances td { text-align: left; }
	.tkc .tkc-appliances td input, .tkc .tkc-appliances td select, .tkc .tkc-appliances .tkc-fixed { max-width: none; margin: 0; text-align: left; text-align-last: left; }
}
