/**
 * HES Finance Calculator — mobile-first styles.
 *
 * Matched to the Home Energy Save GB site's design language: full-bleed
 * dark-green panels with white labels (like their "Request a FREE Survey"
 * form), plain white boxy inputs, thick borders, and a full-width solid
 * orange button. Brand colours arrive as CSS custom properties (inlined by
 * the plugin from the settings); the values below are fallbacks matching
 * the site's Elementor globals.
 */

.hes-fc {
	--hes-fc-primary: #4a8d00;
	--hes-fc-secondary: #366700;
	--hes-fc-deep: #273617;
	--hes-fc-accent: #f18503;
	--hes-fc-tint: #e6edde;
	--hes-fc-tint-light: #f8faf4;
	--hes-fc-text: #1e1e1e;

	box-sizing: border-box;
	color: var(--hes-fc-text);
	font-family: "Poppins", sans-serif;
	line-height: 1.5;
	max-width: 60rem;
	margin: 0 auto;
}

.hes-fc *,
.hes-fc *::before,
.hes-fc *::after {
	box-sizing: inherit;
}

.hes-fc__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
}

/* ---- Inputs: white-on-dark-green, like the site's survey form ---- */

.hes-fc__inputs {
	background: var(--hes-fc-secondary);
	border-radius: 5px 5px 0 0;
	padding: 1.5rem 1.25rem;
}

.hes-fc__field + .hes-fc__field {
	margin-top: 1.375rem;
}

.hes-fc__label {
	display: block;
	font-weight: 600;
	font-size: 1.0625rem;
	color: #fff;
	margin-bottom: 0.5rem;
}

.hes-fc__input-wrap {
	position: relative;
}

.hes-fc__prefix {
	position: absolute;
	left: 0.875rem;
	top: 50%;
	transform: translateY(-50%);
	font-weight: 700;
	color: var(--hes-fc-secondary);
	pointer-events: none;
}

.hes-fc__input {
	width: 100%;
	font-size: 1rem; /* ≥16px prevents iOS zoom-on-focus */
	font-family: inherit;
	font-weight: 600;
	color: var(--hes-fc-deep);
	background: #fff;
	border: 2px solid #fff;
	border-radius: 4px;
	padding: 0.75rem 0.875rem;
	min-height: 50px;
	appearance: none;
	-webkit-appearance: none;
}

.hes-fc__input-wrap .hes-fc__input {
	padding-left: 2rem;
}

.hes-fc__input:focus {
	outline: 3px solid var(--hes-fc-accent);
	outline-offset: 0;
	border-color: var(--hes-fc-accent);
}

.hes-fc__input[aria-invalid="true"] {
	border-color: #e53935;
}

select.hes-fc__input {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23273617' stroke-width='2.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.875rem center;
	padding-right: 2.375rem;
}

.hes-fc__hint {
	font-size: 0.8125rem;
	font-weight: 400;
	color: #fff;
	margin: 0.4375rem 0 0;
}

.hes-fc__msg {
	font-size: 0.875rem;
	font-weight: 700;
	color: #ffd6a0;
	margin: 0.4375rem 0 0;
}

/* ---- Term slider ---- */

.hes-fc__slider-wrap {
	margin-top: 1.125rem;
	padding: 0 0.375rem;
}

.hes-fc__term-slider {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 8px;
	background: rgba(255, 255, 255, 0.4);
	border-radius: 4px;
	outline: none;
	cursor: pointer;
	margin: 0.5rem 0 0.375rem;
}

.hes-fc__term-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--hes-fc-accent);
	border: 3px solid #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
	cursor: grab;
}

.hes-fc__term-slider::-moz-range-thumb {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--hes-fc-accent);
	border: 3px solid #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
	cursor: grab;
}

.hes-fc__term-slider:focus-visible {
	outline: 3px solid var(--hes-fc-accent);
	outline-offset: 4px;
}

.hes-fc__slider-labels {
	display: flex;
	justify-content: space-between;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #fff;
}

.hes-fc__slider-labels span {
	flex: 1;
	text-align: center;
}

.hes-fc__slider-labels span:first-child {
	text-align: left;
}

.hes-fc__slider-labels span:last-child {
	text-align: right;
}

/* ---- Results: light tint panel with a heavy green frame ---- */

.hes-fc__results {
	background: var(--hes-fc-tint);
	border: 3px solid var(--hes-fc-secondary);
	border-top: 0;
	border-radius: 0 0 5px 5px;
	padding: 1.25rem;
}

.hes-fc__figures {
	margin: 0;
}

.hes-fc__figure {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding: 0.6875rem 0;
	border-bottom: 2px solid rgba(39, 54, 23, 0.18);
}

.hes-fc__figure:last-child {
	border-bottom: 0;
}

.hes-fc__figure dt {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--hes-fc-deep);
	margin: 0;
}

.hes-fc__figure dd {
	font-weight: 700;
	font-size: 1.125rem;
	color: var(--hes-fc-deep);
	margin: 0;
	white-space: nowrap;
}

.hes-fc__figure--monthly {
	background: #fff;
	border: 2px solid var(--hes-fc-primary);
	border-radius: 4px;
	padding: 0.75rem 0.875rem;
	margin: 0.5rem 0;
	align-items: center;
}

.hes-fc__figure--monthly dt {
	font-weight: 700;
	color: var(--hes-fc-deep);
}

.hes-fc__figure--monthly dd {
	font-size: 1.875rem;
	line-height: 1.1;
	color: var(--hes-fc-secondary);
}

/* ---- CTA: full-width solid orange bar, like the site's Send button ---- */

.hes-fc__cta-wrap {
	margin: 1.125rem 0 0;
}

.hes-fc__cta {
	display: block;
	width: 100%;
	background: var(--hes-fc-accent);
	color: #fff;
	font-weight: 700;
	font-size: 1rem;
	text-align: center;
	text-decoration: none;
	text-transform: capitalize;
	border-radius: 4px;
	padding: 0.9375rem 1.5625rem;
	min-height: 50px;
	transition: background-color 0.15s ease;
}

.hes-fc__cta:hover,
.hes-fc__cta:focus {
	color: #fff;
	background: #d87400;
	text-decoration: none;
}

/* ---- Legal ---- */

.hes-fc__legal {
	margin-top: 1.25rem;
	font-size: 0.8125rem;
	font-weight: 300;
	color: var(--hes-fc-deep);
}

.hes-fc__legal p {
	margin: 0 0 0.625rem;
}

.hes-fc__repex strong {
	color: var(--hes-fc-deep);
}

.hes-fc__broker {
	font-style: italic;
}

/* ---- Desktop ---- */

@media (min-width: 768px) {
	.hes-fc__grid {
		grid-template-columns: 1fr 1fr;
		align-items: stretch;
	}

	.hes-fc__inputs {
		border-radius: 5px 0 0 5px;
		padding: 1.875rem 1.75rem;
	}

	.hes-fc__results {
		border: 3px solid var(--hes-fc-secondary);
		border-left: 0;
		border-radius: 0 5px 5px 0;
		padding: 1.875rem 1.75rem;
	}

	.hes-fc__figure--monthly dd {
		font-size: 2.125rem;
	}
}
