/**
 * Energy Solutions Leads — popup styles
 * Matches the approved locked design.
 * All rules scoped under .es-overlay / .es-component so nothing leaks.
 */

.es-overlay {
	--es-cyan: #10ABBB;
	--es-green: #2FBA90;
	--es-dark-teal: #073B4A;
	--es-dark-cyan: #0B6672;
	--es-pale-aqua: #E7F8FA;
	--es-pale-mint: #E7F8F3;
	--es-green-dark: #249b76;
	--es-ink: #0f2226;
	--es-muted: #5b7075;
	--es-line: #d5e6e8;
	--es-soft: #f4fafb;
	--es-white: #fff;
	--es-danger: #c62828;
	--es-warn-bg: #fef6e7;
	--es-warn-bd: #f2c879;
	--es-warn-tx: #7a4e00;
	--es-info-bg: #eaf4fb;
	--es-info-bd: #a8cfe8;
	--es-info-tx: #14527d;

	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(6, 42, 48, .72);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	overflow-y: auto;
}

.es-overlay *,
.es-component * {
	box-sizing: border-box;
}

.es-overlay[hidden],
.es-overlay [hidden] {
	display: none !important;
}

.es-modal {
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--es-ink);
	background: var(--es-white);
	width: 100%;
	max-width: 560px;
	border-radius: 20px;
	overflow: hidden;
	position: relative;
	box-shadow: 0 30px 80px rgba(6, 42, 48, .34);
	margin: auto;
}

.es-modal h2,
.es-modal h3 {
	margin: 0;
	font-family: inherit;
}

/* ---------- HEADER ---------- */
.es-head {
	padding: 24px 28px 20px;
	position: relative;
	color: #fff;
	background: linear-gradient(135deg, var(--es-dark-cyan), var(--es-dark-teal));
}

.es-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: rgba(255, 255, 255, .16);
	border: 1px solid rgba(255, 255, 255, .26);
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .09em;
	text-transform: uppercase;
	margin-bottom: 12px;
}

.es-head h2 {
	font-size: 24px;
	line-height: 1.18;
	letter-spacing: -.02em;
	margin-bottom: 8px;
	font-weight: 800;
}

.es-head p {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: #cfe9ec;
	max-width: 44ch;
}

.es-close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 5;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .28);
	background: rgba(255, 255, 255, .14);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	cursor: pointer;
	padding: 0;
}

.es-close:hover {
	background: rgba(255, 255, 255, .24);
}

.es-close:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

.es-close svg {
	width: 16px;
	height: 16px;
}

/* ---------- TRUST STRIP ---------- */
.es-trust {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 26px;
	height: 46px;
	background: var(--es-pale-aqua);
	border-bottom: 1px solid #cbe8ec;
	padding: 0 20px;
}

.es-trust span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--es-dark-cyan);
	white-space: nowrap;
}

.es-trust svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

/* ---------- BODY ---------- */
.es-body {
	padding: 22px 28px 26px;
}

.es-secrow {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 4px;
}

.es-sectitle {
	font-size: 18px;
	font-weight: 800;
	letter-spacing: -.01em;
}

.es-counter {
	font-size: 12.5px;
	font-weight: 800;
	color: var(--es-dark-cyan);
	white-space: nowrap;
}

.es-secsub {
	font-size: 13.5px;
	color: var(--es-muted);
	margin: 0 0 18px;
	line-height: 1.55;
}

.es-progress {
	height: 3px;
	background: var(--es-line);
	border-radius: 99px;
	margin-bottom: 18px;
	overflow: hidden;
}

.es-progress i {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--es-cyan), var(--es-green));
	border-radius: 99px;
	transition: width .3s;
}

/* ---------- FIELDS ---------- */
.es-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 16px;
}

.es-full {
	grid-column: 1 / -1;
}

.es-field {
	margin-bottom: 15px;
}

.es-lbl {
	display: block;
	font-size: 12.5px;
	font-weight: 800;
	margin: 0 0 6px;
}

.es-req {
	color: var(--es-danger);
}

.es-opt {
	color: var(--es-muted);
	font-weight: 600;
	font-size: 11.5px;
}

.es-overlay input[type="text"],
.es-overlay input[type="tel"],
.es-overlay input[type="email"],
.es-overlay select,
.es-component input[type="text"],
.es-component input[type="tel"],
.es-component input[type="email"],
.es-component select {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	font-size: 14.5px;
	border: 1.5px solid var(--es-line);
	border-radius: 10px;
	background: var(--es-white);
	color: var(--es-ink);
	font-family: inherit;
	margin: 0;
}

.es-overlay select,
.es-component select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	cursor: pointer;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b7075' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 38px;
}

.es-overlay input::placeholder,
.es-component input::placeholder {
	color: #9aabaf;
}

.es-overlay input:focus,
.es-overlay select:focus,
.es-component input:focus,
.es-component select:focus {
	outline: none;
	border-color: var(--es-cyan);
	box-shadow: 0 0 0 3px rgba(16, 171, 187, .16);
}

.es-overlay input[aria-invalid="true"],
.es-component input[aria-invalid="true"] {
	border-color: var(--es-danger);
	background: #fffafa;
}

/* ---------- ERRORS ---------- */
.es-err {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	font-size: 12px;
	color: var(--es-danger);
	margin-top: 6px;
	font-weight: 600;
	line-height: 1.45;
}

.es-err::before {
	content: "!";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--es-danger);
	color: #fff;
	font-size: 10px;
	font-weight: 800;
	flex-shrink: 0;
	margin-top: 1px;
}

.es-formerr {
	background: #fdecec;
	border: 1px solid #f3b9b9;
	color: #8c1f1f;
	border-radius: 11px;
	padding: 13px 15px;
	font-size: 13px;
	line-height: 1.5;
	margin-bottom: 16px;
	display: none;
}

.es-formerr.es-show {
	display: block;
}

.es-partial {
	display: flex;
	gap: 11px;
	align-items: flex-start;
	background: var(--es-info-bg);
	border: 1.5px solid var(--es-info-bd);
	color: var(--es-info-tx);
	border-radius: 11px;
	padding: 13px 15px;
	font-size: 13px;
	line-height: 1.55;
	margin-bottom: 16px;
}

/* ---------- UPLOAD ---------- */
.es-drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border: 1.5px dashed #b4cfd3;
	border-radius: 14px;
	padding: 24px 18px;
	cursor: pointer;
	background: var(--es-soft);
	transition: .18s;
	text-align: center;
	margin-bottom: 6px;
}

.es-drop:hover,
.es-drop.es-dragover {
	border-color: var(--es-cyan);
	background: var(--es-pale-aqua);
}

.es-drop .es-dico {
	width: 46px;
	height: 46px;
	border-radius: 14px;
	background: var(--es-pale-aqua);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 4px;
}

.es-drop .es-dico svg {
	width: 22px;
	height: 22px;
	color: var(--es-dark-cyan);
}

.es-drop b {
	font-size: 15.5px;
}

.es-rec {
	font-size: 11px;
	font-weight: 800;
	color: var(--es-green-dark);
	background: var(--es-pale-mint);
	padding: 3px 10px;
	border-radius: 999px;
}

.es-drop small {
	font-size: 11.5px;
	color: var(--es-muted);
}

.es-drophelp {
	font-size: 11.5px;
	color: var(--es-muted);
	text-align: center;
	margin: 0 0 16px;
	line-height: 1.5;
}

.es-attach {
	display: flex;
	align-items: center;
	gap: 11px;
	height: 46px;
	padding: 0 14px;
	cursor: pointer;
	border: 1.5px dashed #b4cfd3;
	border-radius: 10px;
	background: var(--es-soft);
	transition: .18s;
}

.es-attach:hover {
	border-color: var(--es-cyan);
	background: var(--es-pale-aqua);
}

.es-attach svg {
	width: 18px;
	height: 18px;
	color: var(--es-dark-cyan);
	flex-shrink: 0;
}

.es-attach span {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--es-muted);
}

.es-attach small {
	margin-left: auto;
	font-size: 11px;
	color: #94a7ab;
	white-space: nowrap;
}

.es-filesel {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--es-pale-mint);
	border: 1.5px solid #b6e6d5;
	margin-top: 8px;
}

.es-filesel .es-fico {
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: #fff;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.es-filesel .es-fico svg {
	width: 17px;
	height: 17px;
	color: var(--es-green-dark);
}

.es-filesel .es-fmeta {
	flex: 1;
	min-width: 0;
}

.es-filesel b {
	display: block;
	font-size: 13.5px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.es-filesel small {
	font-size: 11.5px;
	color: var(--es-muted);
}

.es-fileacts {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}

.es-fileacts button {
	border: 1px solid var(--es-line);
	background: #fff;
	border-radius: 8px;
	padding: 6px 11px;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
	color: var(--es-muted);
}

.es-fileacts button:hover {
	border-color: var(--es-cyan);
	color: var(--es-ink);
}

.es-fileacts button.es-rm {
	color: var(--es-danger);
}

/* ---------- PRIORITY NOTICES ---------- */
.es-note {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	border-radius: 10px;
	padding: 11px 13px;
	margin-top: -6px;
	margin-bottom: 15px;
	font-size: 12.5px;
	line-height: 1.5;
}

.es-note.high {
	background: var(--es-warn-bg);
	border: 1px solid var(--es-warn-bd);
	color: var(--es-warn-tx);
}

.es-note.med {
	background: var(--es-info-bg);
	border: 1px solid var(--es-info-bd);
	color: var(--es-info-tx);
}

.es-note b {
	flex-shrink: 0;
	font-size: 14px;
	line-height: 1.2;
}

/* ---------- PRIVACY ---------- */
.es-privacy {
	font-size: 11.5px;
	color: var(--es-muted);
	line-height: 1.55;
	margin: 4px 0 16px;
	padding: 12px 14px;
	background: var(--es-soft);
	border-radius: 10px;
	border: 1px solid var(--es-line);
}

.es-privacy a {
	color: var(--es-dark-cyan);
	font-weight: 800;
}

.es-turnstile:not(:empty) {
	margin-bottom: 16px;
}

/* ---------- BUTTONS ---------- */
.es-btn {
	border: 0;
	border-radius: 11px;
	min-height: 54px;
	padding: 15px 22px;
	font-weight: 800;
	font-size: 15.5px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	cursor: pointer;
	font-family: inherit;
	width: 100%;
	transition: .18s;
	color: #fff;
	background: linear-gradient(135deg, var(--es-cyan), var(--es-dark-cyan));
	box-shadow: 0 10px 26px rgba(16, 171, 187, .28);
}

.es-btn:hover:not(:disabled) {
	transform: translateY(-2px);
}

.es-btn:focus-visible {
	outline: 3px solid var(--es-dark-cyan);
	outline-offset: 3px;
}

.es-btn:disabled {
	opacity: .72;
	cursor: not-allowed;
	transform: none;
	background: linear-gradient(135deg, #7cc9d2, #5f97a1);
	box-shadow: none;
}

.es-btn svg {
	width: 17px;
	height: 17px;
}

.es-spin {
	width: 17px;
	height: 17px;
	border: 2.5px solid rgba(255, 255, 255, .4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: eslSpin .7s linear infinite;
	flex-shrink: 0;
}

@keyframes eslSpin {
	to {
		transform: rotate(360deg);
	}
}

.es-actions {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-direction: row-reverse;
}

.es-back {
	flex-shrink: 0;
	width: auto;
	min-height: 54px;
	padding: 15px 20px;
	border-radius: 11px;
	border: 1.5px solid var(--es-line);
	background: #fff;
	color: var(--es-muted);
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	font-family: inherit;
	display: flex;
	align-items: center;
	gap: 7px;
}

.es-back:hover {
	border-color: var(--es-cyan);
	color: var(--es-ink);
}

.es-back:focus-visible {
	outline: 3px solid var(--es-cyan);
	outline-offset: 2px;
}

.es-skip {
	background: none;
	border: 0;
	color: var(--es-muted);
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
	width: 100%;
	padding: 14px;
	margin-top: 4px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.es-skip:hover {
	color: var(--es-ink);
}

.es-skip:focus-visible {
	outline: 3px solid var(--es-cyan);
	outline-offset: 2px;
	border-radius: 8px;
}

/* ---------- SECONDARY CONTACT ---------- */
.es-orsep {
	display: flex;
	align-items: center;
	gap: 11px;
	margin: 20px 0 12px;
}

.es-orsep i {
	flex: 1;
	height: 1px;
	background: var(--es-line);
}

.es-orsep span {
	font-size: 11px;
	color: #94a7ab;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
}

.es-alt {
	display: flex;
	gap: 9px;
}

.es-alt a {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	text-decoration: none;
	border: 1px solid var(--es-line);
	border-radius: 9px;
	padding: 10px 8px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--es-muted);
	background: #fff;
	transition: .16s;
	text-align: center;
	line-height: 1.3;
}

.es-alt a:hover {
	border-color: var(--es-cyan);
	color: var(--es-ink);
}

.es-alt a:focus-visible {
	outline: 3px solid var(--es-cyan);
	outline-offset: 2px;
}

.es-alt svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

/* ---------- SUCCESS ---------- */
.es-success {
	text-align: center;
	padding: 42px 30px 44px;
}

.es-scheck {
	width: 62px;
	height: 62px;
	border-radius: 50%;
	background: var(--es-pale-mint);
	border: 2px solid #b6e6d5;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 18px;
}

.es-scheck svg {
	width: 30px;
	height: 30px;
	color: var(--es-green-dark);
}

.es-success h3 {
	font-size: 21px;
	font-weight: 800;
	margin-bottom: 10px;
}

.es-success h3:focus {
	outline: none;
}

.es-success p {
	font-size: 14.5px;
	color: var(--es-muted);
	margin: 0 auto;
	line-height: 1.62;
	max-width: 40ch;
}

.es-sref {
	display: inline-block;
	margin-top: 18px;
	padding: 7px 14px;
	border-radius: 8px;
	background: var(--es-soft);
	border: 1px solid var(--es-line);
	font-size: 12.5px;
	color: var(--es-muted);
}

.es-sref b {
	color: var(--es-ink);
	font-weight: 800;
}

.es-demotag {
	margin: 18px auto 0;
	max-width: 34ch;
	padding: 9px 14px;
	border-radius: 8px;
	background: #fef6e7;
	border: 1px solid #f2c879;
	color: #7a4e00;
	font-size: 12.5px;
	font-weight: 800;
}

/* ---------- HONEYPOT + SCREEN READER ---------- */
.es-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.es-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- MOBILE ---------- */
@media (max-width: 640px) {
	.es-overlay {
		padding: 0;
		align-items: flex-end;
	}

	.es-modal {
		max-width: 100%;
		border-radius: 20px 20px 0 0;
		max-height: 94vh;
		overflow-y: auto;
	}

	.es-trust {
		display: none;
	}

	.es-head {
		padding: 18px 20px 16px;
	}

	.es-head h2 {
		font-size: 19px;
		margin-bottom: 6px;
	}

	.es-head p {
		font-size: 13px;
	}

	.es-chip {
		margin-bottom: 9px;
		padding: 4px 10px;
		font-size: 10px;
	}

	.es-body {
		padding: 18px 20px 22px;
	}

	.es-grid {
		grid-template-columns: 1fr;
	}

	.es-drop {
		padding: 18px 14px;
	}

	.es-alt {
		flex-direction: column;
	}

	.es-actions {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.es-back {
		width: 100%;
		justify-content: center;
		min-height: 46px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.es-overlay *,
	.es-modal * {
		animation: none !important;
		transition: none !important;
	}
}

body.es-modal-open {
	overflow: hidden !important;
}

.es-demo-badge {
	display: inline-block;
	margin-top: 14px;
	padding: 7px 11px;
	border-radius: 999px;
	background: #fff7d9;
	color: #6c5a19;
	font-size: 11.5px;
	font-weight: 800;
}

.es-turnstile {
	min-height: 0;
}

.es-turnstile iframe {
	max-width: 100%;
}
