/**
 * Demo form page styles — Figma node 2988:16903.
 * A full-bleed accent band (breaks out of the 1168px .site-content wrapper)
 * holding a 1120px two-column inner: intro (544px) + form card (448px).
 *
 * This stylesheet loads only on the Demo template, so page-scoped rules (e.g.
 * hiding the footer) are safe here.
 */

/* The Figma demo screen has no footer. wp_footer() still runs (it carries the
   enqueued scripts) — we just hide the visual footer. */
.gh-footer {
	display: none;
}

/* The [hidden] attribute must win over our display rules (e.g. the success
   block sets display:flex, the form display:flex) so they stay hidden until JS
   reveals them. */
[hidden] {
	display: none !important;
}

.gh-demo {
	/* Full-bleed: escape the .site-content gutter like the subject testimonial. */
	position: relative;
	left: 50%;
	width: 100vw;
	margin-left: -50vw;
	background: var(--gh-accent);
	padding: 96px 24px;
}

.gh-demo__inner {
	max-width: 1120px;
	margin: 0 auto;
	display: flex;
	gap: 128px;
	align-items: flex-start;
}

/* ===================== Left: intro ===================== */
/* Per-section spacing (not a uniform gap): heading→stats is tight (24px) and
   the larger 80px gap sits before the "Trusted by" block, matching Figma. */
.gh-demo__intro {
	flex: 1 1 544px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.gh-demo__head {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.gh-demo__title {
	margin: 0;
	font-family: 'schibsted_grotesk_demi', Arial, sans-serif;
	font-weight: normal;
	font-size: 40px;
	line-height: 48px;
	color: var(--gh-text-primary);
}

.gh-demo__subtitle {
	margin: 0;
	max-width: 352px;
	font-family: 'avenir_next_worldmedium', 'Verdana';
	font-weight: normal;
	font-size: 14px;
	line-height: 24px;
	color: var(--gh-text-secondary);
}

/* ---- Stat cards (2×2) ---- */
.gh-demo__stats {
	list-style: none;
	margin: 24px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

.gh-demo__stat {
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: flex-end;
	padding: 16px;
	border-radius: 8px;
	color: var(--gh-text-primary);
}

.gh-demo__stat-num {
	font-family: 'schibsted_grotesk_demi', Arial, sans-serif;
	font-weight: normal;
	font-size: 20px;
	line-height: 24px;
	align-self: stretch;
}

.gh-demo__stat-label {
	font-family: 'avenir_next_worldmedium', 'Verdana';
	font-weight: normal;
	font-size: 12px;
	line-height: 20px;
	align-self: stretch;
}

.gh-demo__stat--1 {
	background: linear-gradient(167.63deg, rgb(192, 243, 233) 4.41%, rgb(200, 228, 135) 89.86%);
}
.gh-demo__stat--2 {
	background: linear-gradient(167.63deg, rgb(227, 227, 255) 4.41%, rgb(127, 234, 246) 89.86%);
}
.gh-demo__stat--3 {
	background: linear-gradient(167.63deg, rgb(226, 185, 246) 4.41%, rgb(195, 195, 255) 89.86%);
}
.gh-demo__stat--4 {
	background: linear-gradient(167.63deg, rgb(255, 218, 228) 4.41%, rgb(255, 219, 127) 89.86%);
}

/* ---- Trusted-by logos ---- */
.gh-demo__trust {
	margin-top: 80px;
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.gh-demo__trust-title {
	margin: 0;
	font-family: 'schibsted_grotesk_demi', Arial, sans-serif;
	font-weight: normal;
	font-size: 16px;
	line-height: 24px;
	color: var(--gh-text-primary);
}

/* 5 logos per row (2 rows of 10), each 79.333×56, with a 1px divider between
   logos in a row — matching the Figma logo grid. */
.gh-demo__logos {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
}

.gh-demo__logo {
	flex: 0 0 79.333px;
	width: 79.333px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.gh-demo__logo img {
	width: 79.333px;
	height: 56px;
	object-fit: contain;
}

.gh-demo__logo-sep {
	flex: 0 0 1px;
	width: 1px;
	height: 56px;
	background: #e6e6e6;
}

/* ===================== Right: form card ===================== */
.gh-demo__form-card {
	flex: 0 0 448px;
	max-width: 448px;
	background: var(--gh-white);
	border: 1px solid #e6e6e6;
	border-radius: 16px;
	padding: 40px;
}

.gh-demo__form {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.gh-demo__fields {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.gh-demo__field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.gh-demo__row {
	display: flex;
	gap: 16px;
}

.gh-demo__col {
	flex: 1 1 0;
	min-width: 0;
}

.gh-demo__input {
	width: 100%;
	height: 48px;
	box-sizing: border-box;
	padding: 14px 16px;
	border: 1px solid #e6e6e6;
	border-radius: 8px;
	background: var(--gh-white);
	font-family: 'avenir_next_worldmedium', 'Verdana';
	font-weight: normal;
	font-size: 12px;
	line-height: 20px;
	color: var(--gh-text-primary);
}

.gh-demo__input::placeholder {
	color: var(--gh-text-secondary);
}

.gh-demo__input:focus {
	outline: none;
	border-color: var(--gh-green);
	box-shadow: 0 0 0 2px rgba(0, 100, 77, 0.15);
}

/* ---- Phone (intlTelInput) ---- */
.iti {
	width: 100%;
}

.gh-demo__input--phone {
	width: 100%;
}

/* The Figma phone field is one seamless white box; intlTelInput's
   separate-dial-code mode adds a grey fill behind the flag/dial code — remove it. */
.gh-demo__field .iti--separate-dial-code .iti__selected-flag {
	background-color: transparent;
	font-size: 12px;
	line-height: 20px;
}
.gh-demo__field  .selectize-dropdown .selected{
	background-color: #f2f9fc;
}
.gh-demo__field .iti--separate-dial-code .iti__selected-flag:hover,
.gh-demo__field .iti--separate-dial-code .iti__selected-flag:focus {
	background-color: rgba(0, 0, 0, 0.03);
}

/* ---- Selectize (role / school / state) — styling ported from the reference ---- */
.gh-demo__field .selectize-control {
	width: 100%;
}

.gh-demo__field .selectize-control.single .selectize-input {
	display: flex;
	align-items: center;
	min-height: 48px;
	box-sizing: border-box;
	padding: 12px 17px;
	border: 1px solid #e6e6e6;
	border-radius: 8px;
	background: var(--gh-white);
	box-shadow: none;
	cursor: pointer;
	font-family: 'avenir_next_worldmedium', 'Verdana';
	font-size: 12px;
	line-height: 20px;
	color: var(--gh-text-primary);
	word-break: break-word;
}

.gh-demo__field .selectize-input.focus {
	border-color: var(--gh-green);
	box-shadow: 0 0 0 2px rgba(0, 100, 77, 0.15);
}

.gh-demo__field .selectize-input input,
.gh-demo__field .selectize-input input::placeholder {
	font-family: 'avenir_next_worldmedium', 'Verdana';
	font-size: 12px !important;
	line-height: 20px;
	color: var(--gh-text-secondary);
}

.gh-demo__field .selectize-input > .placeholder {
	color: var(--gh-text-secondary);
}

.gh-demo__field .selectize-input .item {
	color: var(--gh-text-primary);
}

/* CSS-triangle dropdown arrow (reference style), flips when open. */
.gh-demo__field .selectize-control.single .selectize-input:after {
	content: '';
	display: block;
	position: absolute;
	top: 50%;
	right: 17px;
	margin-top: -3px;
	width: 0;
	height: 0;
	border: 6px solid transparent;
	border-color: #999 transparent transparent transparent;
}

.gh-demo__field .selectize-control.single .selectize-input.dropdown-active:after {
	margin-top: -9px;
	border-color: transparent transparent #999 transparent;
}

/* Dropdown list. */
.gh-demo__field .selectize-dropdown {
	z-index: 1000;
	margin-top: 2px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 8px;
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
	background: #fff;
	overflow: hidden;
}

.gh-demo__field .selectize-dropdown-content {
	max-height: 230px;
	overflow-y: auto;
	padding: 0;
}

.gh-demo__field .selectize-dropdown [data-selectable].option {
	padding: 15px 13px;
	min-height: 24px;
	font-family: 'avenir_next_worldmedium', 'Verdana';
	font-size: 12px;
	line-height: 20px;
	color: var(--gh-text-primary);
	word-break: break-word;
	cursor: pointer;
}

.gh-demo__field .selectize-dropdown .active {
	background-color: #f2f9fc;
	color: var(--gh-text-primary);
}

/* "Add your …" create row, with a + icon (reference uses a hosted PNG). */
.gh-demo__field .selectize-dropdown .create {
	display: flex;
	align-items: center;
	padding: 15px 13px 15px 36px;
	font-family: 'avenir_next_worldmedium', 'Verdana';
	font-size: 13px;
	color: var(--gh-text-secondary);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 5v14M5 12h14' stroke='%23707070' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 15px center;
	background-size: 14px;
}

.gh-demo__field.is-invalid-wrap .selectize-input {
	border-color: #d92d20;
}

/* Error states. */
.gh-demo__error {
	margin: 0;
	font-family: 'avenir_next_worldmedium', 'Verdana';
	font-weight: normal;
	font-size: 11px;
	line-height: 16px;
	color: #d92d20;
}

.gh-demo__input.is-invalid {
	border-color: #d92d20;
}

/* Consent. */
.gh-demo__field--consent {
	gap: 8px;
}

.gh-demo__consent {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	cursor: pointer;
}

/* Custom checkbox — design ported from the reference (square, filled + white
   tick when checked). */
.gh-demo__checkbox {
	flex: 0 0 auto;
	width: 21px;
	height: 21px;
	margin: 0;
	appearance: none;
	-webkit-appearance: none;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: var(--gh-white);
	cursor: pointer;
	position: relative;
}

.gh-demo__checkbox:checked {
	background-color: var(--gh-green);
	border-color: var(--gh-green);
}

.gh-demo__checkbox:checked::after {
	content: '';
	position: absolute;
	inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 13px;
}

.gh-demo__checkbox:focus-visible {
	outline: none;
	box-shadow: 0 0 0 2px rgba(0, 100, 77, 0.25);
}

.gh-demo__consent-text {
	font-family: 'avenir_next_worldmedium', 'Verdana';
	font-weight: normal;
	font-size: 12px;
	line-height: 20px;
	color: var(--gh-text-secondary);
}

.gh-demo__consent-text a {
	color: #008768;
	text-decoration: underline;
}

.gh-demo__req {
	color: #008768;
}

/* Honeypot — kept in the DOM, hidden from people. */
.gh-demo__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Hidden HubSpot form we relay into — kept in the DOM (off-screen) so it can be
   filled + submitted programmatically and RevenueHero can hook its submit. */
.gh-demo__hubspot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}


/* Submit. */
.gh-demo__submit {
	width: 100%;
	height: 48px;
	border: none;
	border-radius: 8px;
	background: var(--gh-green);
	color: var(--gh-white);
	font-family: 'avenir_next_worlddemi', 'Verdana';
	font-weight: normal;
	font-size: 16px;
	line-height: 24px;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.gh-demo__submit:hover {
	background: var(--gh-green-dark);
}

.gh-demo__submit:disabled {
	opacity: 0.6;
	cursor: default;
}

.gh-demo__form-error {
	margin: 0;
	font-family: 'avenir_next_worldmedium', 'Verdana';
	font-size: 13px;
	line-height: 20px;
	color: #d92d20;
	text-align: center;
}

/* Success state (replaces the form). */
.gh-demo__success {
	display: flex;
	flex-direction: column;
	gap: 12px;
	text-align: center;
	padding: 24px 0;
}

.gh-demo__success-title {
	margin: 0;
	font-family: 'schibsted_grotesk_demi', Arial, sans-serif;
	font-weight: normal;
	font-size: 24px;
	line-height: 32px;
	color: var(--gh-text-primary);
}

.gh-demo__success-text {
	margin: 0;
	font-family: 'avenir_next_worldmedium', 'Verdana';
	font-weight: normal;
	font-size: 14px;
	line-height: 24px;
	color: var(--gh-text-secondary);
}

/* ===================== Responsive ===================== */
/* Below the desktop's comfortable two-column width (intro 544 + gap 128 + form
   448 + padding = ~1168px) the intro column narrows and the fixed 5-up flex +
   1px sep dividers wrap unevenly. Swap them for a fluid grid that stays tidy at
   any column count (≈4-up at 1024, 5-up near 1167). The vertical dividers are a
   box-shadow that overflow:hidden clips at the grid's right edge. */
@media (max-width: 1167px) {
	.gh-demo__logos {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(79.333px, 1fr));
		gap: 16px;
		overflow: hidden;
	}

	.gh-demo__logo-sep {
		display: none;
	}

	.gh-demo__logo {
		flex: initial;
		width: auto;
		height: auto;
		min-height: 72px;
		box-shadow: 1px 0 0 #e6e6e6;
	}
}

@media (max-width: 980px) {
	.gh-demo {
		padding: 64px 24px;
	}

	/* Stack into one column and move the trusted-by logos below the form card
	   (same order as mobile). The logos live inside .gh-demo__intro, so we
	   flatten the intro with display:contents to lift head/stats/trust into the
	   inner flex container alongside the form card, then reorder them. Spacing is
	   driven by per-child margins (not a uniform gap): 24px head→stats and 48px
	   around the form card. */
	.gh-demo__inner {
		flex-direction: column;
		gap: 0;
	}

	.gh-demo__intro {
		display: contents;
	}

	.gh-demo__head {
		order: 1;
		width: 100%;
	}

	.gh-demo__stats {
		order: 2;
		width: 100%;
		margin: 24px 0 0;
	}

	.gh-demo__form-card {
		order: 3;
		width: 100%;
		max-width: 100%;
		margin-top: 48px;
	}

	.gh-demo__trust {
		order: 4;
		width: 100%;
		margin-top: 48px;
	}

	.gh-demo__subtitle {
		max-width: none;
	}
	.gh-demo__title{
		font-size: 32px;
        line-height: 40px;
	}
}

@media (max-width: 480px) {
	.gh-demo {
		padding: 48px 16px;
	}

	/* The one-column reorder (heading → stats → form → logos) is inherited from
	   the ≤980 block; phones only adjust the stats, form padding and logo grid. */
	.gh-demo__stats {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.gh-demo__form-card {
		padding: 24px 16px;
	}

	/* Stat cards become horizontal bars (number + label inline) on mobile. */
	.gh-demo__stat {
		flex-direction: row;
		align-items: center;
		gap: 4px;
		padding: 12px;
		border-radius: 4px;
	}

	.gh-demo__stat-num {
		flex: 0 0 auto;
		align-self: auto;
		font-size: 18px;
	}

	.gh-demo__stat-label {
		align-self: auto;
	}

	/* Pin phones to a 3-up grid (the fluid grid above would allow 4 columns on
	   larger phones); the grid/divider styling is inherited from the ≤1167 block. */
	.gh-demo__logos {
		grid-template-columns: repeat(3, 1fr);
	}
}
