/**
 * Allium Housing - service feedback form.
 * Palette and type mirror the Elementor global kit so the form sits
 * inside the existing pages without looking bolted on.
 */

.af.af {
	--af-green: #2b8563;
	--af-green-dark: #182615;
	--af-green-soft: #42574f;
	--af-accent: #fac102;
	--af-cream: #f5f2ed;
	--af-sage: #e7ebde;
	--af-sage-dark: #e2e2d4;
	--af-text: #272727;
	--af-muted: #6b6f68;
	--af-error: #b3261e;
	--af-radius: 5px;

	max-width: 46rem;
	margin-inline: auto;
	color: var(--af-text);
	font-family: "proxima-nova", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 1rem;
	line-height: 1.55;
}

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

/* The theme sets `display` on button and label elements, which beats the
   browser's own [hidden] rule and leaves hidden controls on screen. This
   restores the attribute's meaning inside the form. */
.af.af [hidden] {
	display: none !important;
}

/* ------------------------------------------------------------------
 * Progressive enhancement
 *
 * Without JavaScript the form renders as one long page with a single
 * submit button, which still works. The .af--js class is added by an
 * inline script directly after the markup, so the wizard engages before
 * the browser paints and there is no flash of the full form.
 * --------------------------------------------------------------- */

.af .af-step .af-nav,
.af .af-step__count {
	display: none;
}

.af.af--js .af-progress {
	display: flex;
}

.af.af--js .af-step__count {
	display: block;
}

.af.af--js .af-step .af-nav {
	display: flex;
}

.af.af--js .af-step:not(.is-active) {
	display: none;
}

.af.af--js .af-nav--nojs {
	display: none;
}

.af .af-step + .af-step {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--af-sage-dark);
}

.af.af--js .af-step + .af-step {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

/* ------------------------------------------------------------------
 * Brand mark
 *
 * Only used on the standalone form page, which runs the blank Elementor
 * Canvas template and therefore has no site header of its own.
 * --------------------------------------------------------------- */

/* Blank template: nothing else on the page supplies gutters. */
.af.af--standalone {
	padding: 4.5rem 1.25rem 6rem;
}

@media (max-width: 600px) {
	.af.af--standalone {
		padding: 2.5rem 1rem 4rem;
	}
}

.af .af-brand {
	margin-bottom: 1.75rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--af-sage-dark);
	text-align: center;
}

.af .af-brand__link {
	display: inline-block;
	border: 0;
	text-decoration: none;
	box-shadow: none;
}

.af .af-brand__logo {
	display: block;
	width: auto;
	max-width: 200px;
	height: auto;
	margin: 0 auto;
}

.af .af-brand__name {
	font-family: "Libre Baskerville", Georgia, serif;
	font-size: 1.25rem;
	color: var(--af-green-dark);
}

/* ------------------------------------------------------------------
 * Thank you
 * --------------------------------------------------------------- */

.af.af--thanks {
	max-width: 34rem;
}

.af .af-thanks {
	padding: 2rem 1.5rem;
	border: 1px solid var(--af-sage-dark);
	border-radius: 8px;
	background: var(--af-cream);
	text-align: center;
}

.af .af-thanks:focus {
	outline: none;
}

.af .af-thanks__mark {
	display: inline-grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	margin-bottom: 0.85rem;
	border-radius: 50%;
	background: var(--af-green);
	color: #fff;
}

.af .af-thanks__title {
	margin: 0 0 0.4rem;
	font-family: "Libre Baskerville", Georgia, serif;
	font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem);
	line-height: 1.2;
	color: var(--af-green-dark);
}

.af .af-thanks__lead {
	margin: 0 0 0.6rem;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.5;
	color: var(--af-green-dark);
}

.af .af-thanks p {
	margin: 0 0 0.6rem;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: var(--af-green-soft);
}

.af .af-thanks p:last-of-type {
	margin-bottom: 0;
}

.af .af-thanks__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--af-sage-dark);
}

.af .af-thanks__actions .af-btn {
	text-decoration: none;
}

/* ------------------------------------------------------------------
 * Intro
 * --------------------------------------------------------------- */

.af .af-intro {
	margin-bottom: 1.5rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--af-sage-dark);
	font-size: 0.9375rem;
	color: var(--af-green-soft);
}

.af .af-intro p {
	margin: 0 0 0.75rem;
}

.af .af-intro p:last-child {
	margin-bottom: 0;
}

/* ------------------------------------------------------------------
 * Progress
 * --------------------------------------------------------------- */

/* Hidden by default and switched on by .af--js above: a step counter is
   meaningless when every step is on the page at once. */
.af .af-progress {
	display: none;
	flex-wrap: wrap;
	gap: 0.25rem 0.75rem;
	margin: 0 0 1.5rem;
	padding: 0 0 1rem;
	list-style: none;
	border-bottom: 1px solid var(--af-sage-dark);
}

.af .af-progress__item {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.8125rem;
	color: var(--af-muted);
}

.af .af-progress__item.is-done {
	cursor: pointer;
}

.af .af-progress__dot {
	display: grid;
	place-items: center;
	width: 1.4rem;
	height: 1.4rem;
	border-radius: 50%;
	background: var(--af-sage);
	color: var(--af-green-soft);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1;
	flex: 0 0 auto;
}

.af .af-progress__item.is-active .af-progress__dot {
	background: var(--af-green);
	color: #fff;
}

.af .af-progress__item.is-done .af-progress__dot {
	background: var(--af-green-soft);
	color: #fff;
}

.af .af-progress__item.is-active {
	color: var(--af-green-dark);
	font-weight: 600;
}

@media (max-width: 640px) {
	.af .af-progress__label {
		display: none;
	}

	.af .af-progress__item.is-active .af-progress__label {
		display: inline;
	}
}

/* ------------------------------------------------------------------
 * Steps
 * --------------------------------------------------------------- */

.af .af-step__count {
	margin: 0 0 0.25rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--af-green);
}

.af .af-step__title {
	margin: 0 0 0.35rem;
	font-family: "Libre Baskerville", Georgia, serif;
	font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
	line-height: 1.2;
	color: var(--af-green-dark);
}

.af .af-step__title:focus {
	outline: none;
}

.af .af-step__intro {
	margin: 0 0 1.5rem;
	color: var(--af-green-soft);
	font-size: 0.9375rem;
}

/* ------------------------------------------------------------------
 * Fields
 * --------------------------------------------------------------- */

.af .af-field {
	margin-bottom: 1.25rem;
}

.af .af-field:last-of-type {
	margin-bottom: 0;
}

.af .af-fieldset {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

/* line-height is stated explicitly because the theme resets `label` to 1,
   and an undeclared property is inherited from that reset regardless of
   how specific our own selector is. */
.af .af-label {
	display: block;
	margin-bottom: 0.3rem;
	padding: 0;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--af-green-dark);
}

.af .af-label--sm {
	font-size: 0.875rem;
	font-weight: 500;
}

.af .af-req {
	color: var(--af-error);
}

.af .af-opt {
	font-weight: 400;
	font-size: 0.8125rem;
	color: var(--af-muted);
}

.af .af-hint {
	margin: -0.1rem 0 0.4rem;
	font-size: 0.8125rem;
	color: var(--af-muted);
}

.af.af input[type="text"],
.af.af input[type="email"],
.af.af input[type="tel"],
.af.af textarea {
	width: 100%;
	padding: 0.5rem 0.65rem;
	border: 1px solid var(--af-sage-dark);
	border-radius: var(--af-radius);
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: 0.9375rem;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.af.af textarea {
	resize: vertical;
	min-height: 5.5rem;
}

.af.af input[type="text"]:focus,
.af.af input[type="email"]:focus,
.af.af input[type="tel"]:focus,
.af.af textarea:focus {
	outline: none;
	border-color: var(--af-green);
	box-shadow: 0 0 0 3px rgba(43, 133, 99, 0.15);
}

/* Choices ---------------------------------------------------------- */

.af .af-choices {
	display: grid;
	gap: 0.3rem;
}

.af .af-check {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	padding: 0.4rem 0.6rem;
	border: 1px solid var(--af-sage-dark);
	border-radius: var(--af-radius);
	background: #fff;
	font-size: 0.9375rem;
	line-height: 1.45;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.af .af-check:hover {
	border-color: var(--af-green);
}

.af .af-check input {
	margin: 0.28rem 0 0;
	accent-color: var(--af-green);
	flex: 0 0 auto;
}

.af .af-check:has(input:checked) {
	border-color: var(--af-green);
	background: var(--af-sage);
}

.af .af-check:has(input:focus-visible) {
	outline: 2px solid var(--af-green);
	outline-offset: 1px;
}

.af .af-check--consent {
	align-items: flex-start;
	padding: 0.65rem 0.75rem;
	background: var(--af-cream);
	font-size: 0.875rem;
	line-height: 1.5;
}

.af .af-other {
	margin-top: 0.5rem;
	padding-left: 0.6rem;
	border-left: 2px solid var(--af-sage-dark);
}

/* ------------------------------------------------------------------
 * Star ratings
 * --------------------------------------------------------------- */

.af .af-key {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem 1rem;
	margin: 0 0 1rem;
	padding: 0.6rem 0.75rem;
	border-radius: var(--af-radius);
	background: var(--af-cream);
	font-size: 0.75rem;
	color: var(--af-green-soft);
}

.af .af-key__item {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	white-space: nowrap;
}

.af .af-key__stars {
	color: var(--af-accent);
	letter-spacing: -0.06em;
	font-size: 0.8125rem;
}

.af .af-rating {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.35rem 0.75rem;
	margin: 0;
	padding: 0.35rem 0;
	border-top: 1px solid var(--af-sage);
	min-width: 0;
}

.af .af-rating:first-of-type {
	border-top: 0;
}

.af .af-rating__label {
	flex: 1 1 12rem;
	min-width: 0;
	font-size: 0.9375rem;
	color: var(--af-green-dark);
}

/* Inputs sit 5>1 in the DOM so `:checked ~ label` can fill every lower
   star; row-reverse puts them back in 1>5 reading order on screen. */
.af .af-stars {
	display: flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	flex: 0 0 auto;
}

.af .af-stars__input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.af .af-stars__star {
	padding: 0 0.06rem;
	color: var(--af-sage-dark);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	transition: color 0.12s ease, transform 0.12s ease;
}

.af .af-stars:hover .af-stars__star,
.af .af-stars__input:checked ~ .af-stars__star,
.af .af-stars__input:checked + .af-stars__star {
	color: var(--af-accent);
}

/* On hover, dim the stars above the one being pointed at. Because the DOM
   runs 5>1, "above" means the labels that precede the hovered one, so this
   needs :has() rather than a plain sibling combinator. */
.af .af-stars__star:has(~ .af-stars__star:hover) {
	color: var(--af-sage-dark);
}

.af .af-stars__star:hover {
	transform: scale(1.12);
}

.af .af-stars__input:focus-visible + .af-stars__star {
	outline: 2px solid var(--af-green);
	outline-offset: 2px;
	border-radius: 2px;
}

.af .af-rating__readout {
	flex: 0 0 5.5rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--af-green);
}

.af .af-rating__clear {
	padding: 0;
	border: 0;
	background: none;
	color: var(--af-muted);
	font: inherit;
	font-size: 0.75rem;
	text-decoration: underline;
	cursor: pointer;
}

.af .af-rating__clear:hover {
	color: var(--af-error);
}

@media (max-width: 560px) {
	.af .af-rating__label {
		flex: 1 1 100%;
	}

	.af .af-rating__readout {
		flex: 0 0 auto;
	}
}

/* ------------------------------------------------------------------
 * Navigation and buttons
 * --------------------------------------------------------------- */

.af .af-nav {
	display: flex;
	gap: 0.5rem;
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--af-sage-dark);
}

.af .af-btn {
	padding: 0.55rem 1.35rem;
	border: 1px solid var(--af-green);
	border-radius: var(--af-radius);
	background: var(--af-green);
	color: #fff;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.af .af-btn:hover {
	background: var(--af-green-dark);
	border-color: var(--af-green-dark);
}

.af .af-btn:focus-visible {
	outline: 2px solid var(--af-green-dark);
	outline-offset: 2px;
}

.af .af-btn--ghost {
	background: transparent;
	border-color: var(--af-sage-dark);
	color: var(--af-green-soft);
}

.af .af-btn--ghost:hover {
	background: var(--af-sage);
	border-color: var(--af-green-soft);
	color: var(--af-green-dark);
}

.af .af-btn--submit {
	margin-left: auto;
	background: var(--af-accent);
	border-color: var(--af-accent);
	color: var(--af-green-dark);
}

.af .af-btn--submit:hover {
	background: #e0ac02;
	border-color: #e0ac02;
	color: var(--af-green-dark);
}

/* ------------------------------------------------------------------
 * Errors, alerts, honeypot
 * --------------------------------------------------------------- */

.af .af-error {
	margin: 0 0 0.35rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--af-error);
}

.af .af-field.has-error input[type="text"],
.af .af-field.has-error input[type="email"],
.af .af-field.has-error input[type="tel"],
.af .af-field.has-error textarea,
.af .af-other.has-error input {
	border-color: var(--af-error);
}

.af .af-field.has-error .af-choices {
	padding-left: 0.5rem;
	border-left: 2px solid var(--af-error);
}

.af .af-alert {
	margin: 0 0 1.25rem;
	padding: 0.85rem 1rem;
	border-radius: var(--af-radius);
	border-left: 3px solid;
	font-size: 0.9375rem;
}

.af .af-alert:focus {
	outline: none;
}

.af .af-alert p:last-child {
	margin-bottom: 0;
}

.af .af-alert--error {
	border-color: var(--af-error);
	background: #fdf1f0;
	color: #6f1a15;
}

.af .af-alert--success {
	border-color: var(--af-green);
	background: var(--af-sage);
	color: var(--af-green-dark);
	padding: 1.5rem;
}

.af .af-alert--success h2 {
	margin: 0 0 0.4rem;
	font-family: "Libre Baskerville", Georgia, serif;
	font-size: 1.4rem;
	color: var(--af-green-dark);
}

.af .af-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.af.af .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;
}

@media (prefers-reduced-motion: reduce) {
	.af.af * {
		transition: none !important;
	}
}
