/*
 * 1.26.5: [tcl_price_calculator]. Loaded only where the calculator is. Colours come from the site's --pv-* variables
 * when it has them (psvault.co.uk, hgvault.co.uk), with the same values as fallbacks; the font is the theme's.
 * Everything is scoped under .tcl-calc, a little heavier where a theme styles every input and button.
 */
.tcl-calc {
	--calc-ink: var(--pv-ink, #0B1015);
	--calc-amber: var(--pv-amber, #FFB000);
	--calc-amber-hover: #FFC94D;
	--calc-ink-hover: #2A333C;
	--calc-slate: var(--pv-slate, #424B55);
	--calc-muted: var(--pv-muted, #5B6570);
	--calc-line: var(--pv-line, #E3E6E9);
	--calc-line2: var(--pv-line2, #EEF0F2);
	--calc-mist: var(--pv-mist, #F4F5F6);
	--calc-field: #D5DADF;
	container-type: inline-size;
	container-name: tclcalc;
	box-sizing: border-box;
	width: 100%;
	color: var(--calc-slate);
	font-size: 16px;
	line-height: 1.55;
	text-align: left;
}
.tcl-calc *, .tcl-calc *::before, .tcl-calc *::after { box-sizing: border-box; }
.tcl-calc p { margin: 0; }
.tcl-calc .tcl-calc-vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* One card in two halves: what you run on the left, the price on the right (stacked on a phone). */
.tcl-calc .tcl-calc-card {
	display: grid; grid-template-columns: 1fr;
	margin: 0; padding: 0;
	background: #fff; border: 1px solid var(--calc-line); border-radius: 14px; overflow: hidden;
}
.tcl-calc .tcl-calc-in { padding: 28px 24px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.tcl-calc .tcl-calc-out { padding: 28px 24px; background: var(--calc-mist); border-top: 1px solid var(--calc-line); display: flex; flex-direction: column; min-width: 0; }
@container tclcalc (min-width: 760px) {
	.tcl-calc .tcl-calc-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.tcl-calc .tcl-calc-in { padding: 36px; }
	.tcl-calc .tcl-calc-out { padding: 36px; border-top: 0; border-left: 1px solid var(--calc-line); }
}

.tcl-calc h2.tcl-calc-h { margin: 0; padding: 0; font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -.015em; color: var(--calc-ink); text-transform: none; }
.tcl-calc .tcl-calc-lede { margin-top: -12px; color: var(--calc-muted); font-size: 15.5px; max-width: 46ch; }

/* Fields: label above, 48px input, room for a thumb. */
.tcl-calc .tcl-calc-field { display: flex; flex-direction: column; gap: 6px; }
.tcl-calc .tcl-calc-label { display: block; margin: 0; font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--calc-ink); }
.tcl-calc .tcl-calc-hint { font-size: 14px; color: var(--calc-muted); line-height: 1.45; }
.tcl-calc .tcl-calc-num { display: flex; align-items: stretch; gap: 8px; max-width: 280px; }
.tcl-calc .tcl-calc-num input.tcl-calc-input {
	flex: 1 1 auto; width: 100%; min-width: 0; height: 48px; margin: 0; padding: 0 14px;
	font: inherit; font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--calc-ink);
	background: #fff; border: 1px solid var(--calc-field); border-radius: 8px; box-shadow: none; appearance: textfield; -moz-appearance: textfield;
}
.tcl-calc .tcl-calc-num input.tcl-calc-input::-webkit-outer-spin-button,
.tcl-calc .tcl-calc-num input.tcl-calc-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tcl-calc .tcl-calc-num input.tcl-calc-input:hover { border-color: #B9C0C7; }
.tcl-calc .tcl-calc-num input.tcl-calc-input:focus { outline: none; border-color: var(--calc-ink); box-shadow: 0 0 0 1px var(--calc-ink); }
.tcl-calc .tcl-calc-num button.tcl-calc-step {
	flex: none; width: 48px; height: auto; min-height: 48px; margin: 0; padding: 0;
	display: inline-flex; align-items: center; justify-content: center;
	background: #fff; color: var(--calc-ink); border: 1px solid var(--calc-field); border-radius: 8px;
	font: inherit; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: none; text-transform: none; letter-spacing: 0;
}
.tcl-calc .tcl-calc-num button.tcl-calc-step:hover { background: var(--calc-mist); border-color: #B9C0C7; color: var(--calc-ink); }
.tcl-calc .tcl-calc-num button.tcl-calc-step:focus-visible,
.tcl-calc a:focus-visible, .tcl-calc button:focus-visible, .tcl-calc input.tcl-calc-box:focus-visible { outline: 2px solid var(--calc-ink); outline-offset: 2px; }
.tcl-calc .tcl-calc-clamp { font-size: 14px; color: var(--calc-muted); }

/* The DVLA extra: a tick, its hint, then the drivers. */
.tcl-calc .tcl-calc-extra { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 1px solid var(--calc-line2); }
.tcl-calc .tcl-calc-tick { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 0; font-size: 15px; font-weight: 500; color: var(--calc-ink); cursor: pointer; }
.tcl-calc .tcl-calc-tick input.tcl-calc-box {
	flex: none; width: 22px; height: 22px; margin: 0; padding: 0;
	appearance: none; -webkit-appearance: none; background: #fff; border: 1.5px solid #8A939C; border-radius: 5px; cursor: pointer;
	display: inline-grid; place-content: center;
}
.tcl-calc .tcl-calc-tick input.tcl-calc-box:checked { background: var(--calc-ink); border-color: var(--calc-ink); }
.tcl-calc .tcl-calc-tick input.tcl-calc-box:checked::after { content: ''; width: 11px; height: 6px; margin-top: -3px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.tcl-calc .tcl-calc-drivers { padding-top: 6px; }
.tcl-calc.is-js .tcl-calc-drivers[data-off] { display: none; }
.tcl-calc.is-js [data-calc-nojs] { display: none; }

/* The price. */
.tcl-calc .tcl-calc-k { font-size: 14px; font-weight: 500; color: var(--calc-muted); margin-bottom: 8px; }
.tcl-calc .tcl-calc-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.tcl-calc .tcl-calc-ex { font-size: clamp(36px, 7cqi, 46px); font-weight: 600; letter-spacing: -.035em; line-height: 1; color: var(--calc-ink); font-variant-numeric: tabular-nums; }
.tcl-calc .tcl-calc-per { font-size: 15px; color: var(--calc-muted); }
.tcl-calc .tcl-calc-inc { margin-top: 8px; font-size: 15px; color: var(--calc-slate); font-variant-numeric: tabular-nums; }
.tcl-calc .tcl-calc-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0 0; padding: 0; }
.tcl-calc .tcl-calc-facts > div { padding: 12px 14px; background: #fff; border: 1px solid var(--calc-line); border-radius: 10px; }
.tcl-calc .tcl-calc-facts dt { font-size: 13px; color: var(--calc-muted); margin: 0; }
.tcl-calc .tcl-calc-facts dd { margin: 2px 0 0; font-size: 20px; font-weight: 600; letter-spacing: -.02em; color: var(--calc-ink); font-variant-numeric: tabular-nums; }
.tcl-calc ul.tcl-calc-lines { list-style: none; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--calc-line); }
.tcl-calc ul.tcl-calc-lines li { display: flex; justify-content: space-between; gap: 16px; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--calc-line); font-size: 15px; color: var(--calc-slate); }
.tcl-calc ul.tcl-calc-lines li::before { content: none; }
.tcl-calc ul.tcl-calc-lines li span:last-child { color: var(--calc-ink); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tcl-calc .tcl-calc-act { margin-top: 24px; }
.tcl-calc .tcl-calc-fine { margin-top: 10px; font-size: 13.5px; color: var(--calc-muted); }

/* Buttons. */
.tcl-calc .tcl-calc-btn, .tcl-calc button.tcl-calc-btn[type=submit] {
	display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; margin: 0;
	border: 0; border-radius: 8px; font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2; letter-spacing: 0;
	text-decoration: none; text-transform: none; cursor: pointer; box-shadow: none;
}
.tcl-calc a.tcl-calc-btn--amber, .tcl-calc a.tcl-calc-btn--amber:visited { width: 100%; background: var(--calc-amber); color: var(--calc-ink); text-decoration: none; }
.tcl-calc a.tcl-calc-btn--amber:hover { background: var(--calc-amber-hover); color: var(--calc-ink); }
.tcl-calc button.tcl-calc-btn--ink[type=submit] { background: var(--calc-ink); color: #fff; }
.tcl-calc button.tcl-calc-btn--ink[type=submit]:hover { background: var(--calc-ink-hover); color: #fff; }

/* The bands, always there (and all there is to read with JavaScript off). */
.tcl-calc .tcl-calc-bands { margin-top: 28px; }
.tcl-calc table.tcl-calc-table { width: 100%; max-width: 560px; margin: 0; border-collapse: collapse; border: 0; font-size: 15px; }
.tcl-calc table.tcl-calc-table caption { caption-side: top; text-align: left; padding: 0 0 10px; font-size: 16px; font-weight: 600; color: var(--calc-ink); }
.tcl-calc table.tcl-calc-table th, .tcl-calc table.tcl-calc-table td { padding: 10px 0; border: 0; border-bottom: 1px solid var(--calc-line); text-align: left; background: none; font-variant-numeric: tabular-nums; }
.tcl-calc table.tcl-calc-table thead th { font-size: 13px; font-weight: 500; color: var(--calc-muted); }
.tcl-calc table.tcl-calc-table tbody th { font-weight: 500; color: var(--calc-ink); width: 45%; }
.tcl-calc table.tcl-calc-table td { color: var(--calc-slate); }
.tcl-calc .tcl-calc-bands .tcl-calc-fine { max-width: 62ch; }

@container tclcalc (max-width: 420px) {
	.tcl-calc .tcl-calc-num { max-width: none; }
	.tcl-calc .tcl-calc-facts dd { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
	.tcl-calc * { transition: none !important; }
}
