/* ClutchPost Leads — front-end form
   Visual language mirrors the PDF guide: deep green field, cream card,
   an orange rule as the single accent, generous type. */

.cpl-form {
	--cpl-cream: #faf8f2;
	--cpl-ink: #1c211e;
	--cpl-grey: #6c736e;
	--cpl-line: #dce2d8;

	box-sizing: border-box;
	margin: 2.6em 0;
	background: var(--cpl-cream);
	border: 1px solid var(--cpl-line);
	border-radius: 14px;
	overflow: hidden;
	position: relative;
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	float: none !important;
}

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

/* Reset every element inside the widget so parent themes/page builders
   cannot stretch fields with global height/flex rules. */
.cpl-form div,
.cpl-form p,
.cpl-form form,
.cpl-form label,
.cpl-form input,
.cpl-form button {
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	float: none !important;
}

.cpl-form::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 5px;
	background: var(--cpl-accent, #2e6b3a);
}

.cpl-form__body {
	padding: 30px 32px 28px 34px;
	display: block !important;
}

.cpl-form__eyebrow {
	margin: 0 0 10px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--cpl-accent-2, #f26b21);
}

.cpl-form__headline {
	margin: 0 0 8px;
	font-size: 1.45em;
	line-height: 1.25;
	color: var(--cpl-ink);
}

.cpl-form__subhead {
	margin: 0 0 20px;
	font-size: 0.95em;
	line-height: 1.6;
	color: var(--cpl-grey);
	max-width: 52ch;
}

/* Honeypot — visually gone, still reachable by bots. */
.cpl-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.cpl-form .cpl-form__form {
	display: block !important;
}

.cpl-form .cpl-fields {
	display: flex !important;
	flex-direction: column !important;
	flex-wrap: nowrap !important;
	align-items: stretch !important;
	gap: 12px !important;
	width: 100% !important;
}

.cpl-form .cpl-field {
	flex: none !important;
	flex-grow: 0 !important;
	flex-shrink: 0 !important;
	flex-basis: auto !important;
	width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	margin: 0 !important;
	min-width: 0 !important;
	display: block !important;
}

.cpl-form .cpl-field--email {
	flex: none !important;
}

.cpl-form input[type="text"],
.cpl-form input[type="email"] {
	display: block !important;
	width: 100% !important;
	padding: 13px 15px !important;
	font-size: 15px;
	line-height: 1.3;
	color: var(--cpl-ink);
	background: #fff;
	border: 1.5px solid var(--cpl-line);
	border-radius: 8px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	appearance: none;
	-webkit-appearance: none;
}

.cpl-form input[type="text"]:focus,
.cpl-form input[type="email"]:focus {
	outline: none;
	border-color: var(--cpl-accent, #2e6b3a);
	box-shadow: 0 0 0 3px rgba(46, 107, 58, 0.14);
}

.cpl-form .cpl-btn {
	flex: none !important;
	width: 100% !important;
	position: relative;
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 26px !important;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: #fff;
	background: var(--cpl-accent, #2e6b3a);
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	transition: transform 0.12s ease, filter 0.15s ease;
	margin-top: 2px;
}

.cpl-btn:hover {
	filter: brightness(1.08);
}

.cpl-btn:active {
	transform: translateY(1px);
}

.cpl-btn:focus-visible {
	outline: 3px solid var(--cpl-accent-2, #f26b21);
	outline-offset: 2px;
}

.cpl-btn[disabled] {
	opacity: 0.65;
	cursor: default;
}

.cpl-btn__spinner {
	display: none;
	width: 15px;
	height: 15px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: cpl-spin 0.7s linear infinite;
}

.cpl-form.is-loading .cpl-btn__spinner {
	display: inline-block;
}

@keyframes cpl-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.cpl-btn__spinner {
		animation-duration: 2s;
	}

	.cpl-modal__panel {
		animation: none !important;
	}
}

.cpl-consent {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin: 15px 0 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--cpl-grey);
	cursor: pointer;
}

.cpl-consent input {
	margin: 2px 0 0;
	flex: 0 0 auto;
	accent-color: var(--cpl-accent, #2e6b3a);
}

.cpl-message {
	margin: 14px 0 0;
	font-size: 14px;
	line-height: 1.55;
	min-height: 0;
}

.cpl-message:empty {
	display: none;
}

.cpl-form.is-error .cpl-message {
	color: #a5372c;
}

.cpl-form.is-success .cpl-message {
	color: var(--cpl-accent, #2e6b3a);
	font-weight: 600;
}

.cpl-form.is-success .cpl-form__form .cpl-fields,
.cpl-form.is-success .cpl-consent {
	display: none;
}

/* End-of-post variant: darker, harder to scroll past. */
.cpl-form--wide {
	background: var(--cpl-accent, #2e6b3a);
	border-color: transparent;
}

.cpl-form--wide::before {
	background: var(--cpl-accent-2, #f26b21);
}

.cpl-form--wide .cpl-form__headline {
	color: #fff;
}

.cpl-form--wide .cpl-form__subhead {
	color: rgba(255, 255, 255, 0.8);
}

.cpl-form--wide .cpl-form__eyebrow {
	color: #f6b48a;
}

.cpl-form--wide .cpl-consent {
	color: rgba(255, 255, 255, 0.78);
}

.cpl-form--wide .cpl-btn {
	background: var(--cpl-accent-2, #f26b21);
}

.cpl-form--wide.is-success .cpl-message {
	color: #fff;
}

/* Popup */
.cpl-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.cpl-modal[hidden] {
	display: none;
}

.cpl-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 22, 17, 0.62);
}

.cpl-modal__panel {
	position: relative;
	width: 100%;
	max-width: 540px;
	max-height: 90vh;
	overflow-y: auto;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
	animation: cpl-rise 0.22s ease-out;
}

@keyframes cpl-rise {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
}

.cpl-modal .cpl-form {
	margin: 0;
	border: 0;
	border-radius: 16px;
}

.cpl-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	z-index: 2;
	width: 34px;
	height: 34px;
	font-size: 24px;
	line-height: 1;
	color: var(--cpl-grey, #6c736e);
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.cpl-modal__close:hover {
	background: rgba(0, 0, 0, 0.06);
}

@media (max-width: 600px) {
	.cpl-form__body {
		padding: 24px 20px 22px 22px;
	}
}

/* Some themes do not ship this class; the labels rely on it. */
.cpl-form .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
