/*
 * WordPress + Gravity Forms integration.
 *
 * Gravity Forms' own CSS is disabled in functions.php. Everything below uses
 * the classes Gravity Forms generates and the design tokens from tokens.css.
 */

/* ---------- WordPress chrome ---------- */
body.admin-bar #hd {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar #hd {
		top: 46px;
	}
}

.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;
}

/* ---------- Gravity Forms base ---------- */
.earls-form,
.earls-form form,
.gform_wrapper {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	color: inherit;
	font: inherit;
}

.gform_wrapper .gform_body,
.gform_wrapper .gform-body,
.gform_wrapper .gform_fields {
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

.gform_wrapper .gform_fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 22px 28px;
}

.gform_wrapper .gfield {
	position: relative;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.gform_wrapper .gfield--type-hidden,
.gform_wrapper .gform_hidden,
.gform_wrapper .gfield.gfield--type-honeypot {
	display: none !important;
}

.gform_wrapper .gfield--type-html,
.gform_wrapper .gfield--type-section,
.gform_wrapper .gfield--type-textarea,
.gform_wrapper .gfield--type-checkbox,
.gform_wrapper .gfield--type-consent,
.gform_wrapper .gfield--width-full,
.gform_wrapper .gfield--type-captcha {
	grid-column: 1 / -1;
}

.gform_wrapper .gfield_label,
.gform_wrapper .gfield_label_before_complex,
.gform_wrapper legend.gfield_label {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	font: 500 11px/1.2 var(--font-body);
	letter-spacing: .1em;
	text-transform: uppercase;
	color: inherit;
}

.gform_wrapper .gfield_required {
	margin-left: 4px;
	color: inherit;
	font-size: 11px;
}

/* Gravity Forms prints "(Required)"; the design uses an asterisk. */
.gform_wrapper .gfield_required_text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.gform_wrapper .gfield_required::before {
	content: "*";
}

.gform_wrapper .ginput_container {
	margin: 0;
	padding: 0;
}

.gform_wrapper .ginput_container input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.gform_wrapper .ginput_container select,
.gform_wrapper .ginput_container textarea {
	width: 100%;
	margin: 0;
	padding: 10px 0;
	font: 400 17px var(--font-body);
	color: inherit;
	background: none;
	border: 0;
	border-bottom: 1px solid var(--line);
	border-radius: 0;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
}

.gform_wrapper .ginput_container select {
	padding-right: 24px;
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: calc(100% - 9px) 55%, calc(100% - 4px) 55%;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
}

.gform_wrapper .ginput_container textarea {
	resize: vertical;
}

/* The phone field's default mask placeholder is not part of the design. */
.gform_wrapper .gfield--type-phone input::placeholder {
	color: transparent;
	opacity: 0;
}

.gform_wrapper .ginput_container input:focus,
.gform_wrapper .ginput_container select:focus,
.gform_wrapper .ginput_container textarea:focus {
	outline: 2px solid var(--gold);
	outline-offset: 2px;
}

.gform_wrapper .gfield_description {
	margin: 6px 0 0;
	padding: 0;
	font-size: 13px;
	line-height: 1.4;
	opacity: .8;
}

.gform_wrapper .gfield--type-checkbox .gfield_checkbox,
.gform_wrapper .gfield--type-consent .gfield_consent_options {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
}

.gform_wrapper .gfield--type-checkbox .gchoice {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	margin: 0;
	padding: 0;
	font-size: 15px;
	line-height: 1.4;
	letter-spacing: normal;
	text-transform: none;
	cursor: pointer;
}

.gform_wrapper .gfield--type-checkbox input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	padding: 0;
	border: 1px solid currentColor;
	border-radius: 0;
	background: center / 14px no-repeat;
	cursor: pointer;
	transition: background-color .2s;
}

.gform_wrapper .gfield--type-checkbox input[type="checkbox"]:checked {
	background-color: currentColor;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232C3147' stroke-width='3'%3E%3Cpath d='M4 12.5l5.5 5.5L20 6.5'/%3E%3C/svg%3E");
}

.gform_wrapper .gfield--type-checkbox label {
	margin: 0;
	font: inherit;
	letter-spacing: inherit;
	text-transform: none;
	cursor: pointer;
}

/* ---------- Errors and confirmation ---------- */
.gform_wrapper .gfield_error input:not([type="checkbox"]):not([type="radio"]),
.gform_wrapper .gfield_error select,
.gform_wrapper .gfield_error textarea {
	border-bottom-color: #e59a8c;
}

.gform_wrapper .validation_message {
	margin-top: 6px;
	padding: 0;
	font-size: 13px;
	line-height: 1.35;
	color: #e59a8c;
}

.gform_wrapper .gform_validation_errors {
	position: static;
	margin: 0 0 18px;
	padding: 12px 16px;
	border: 1px solid #e59a8c;
	color: inherit;
	background: none;
	box-shadow: none;
}

.gform_wrapper .gform_confirmation_message,
.gform_confirmation_wrapper {
	margin: 16px 0 0;
	padding: 0;
	font-size: 16px;
	line-height: 1.5;
}

.gform_wrapper .gform_footer {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 20px 0 0;
	padding: 0;
}

.gform_wrapper .gform_button.btn {
	width: auto;
	min-height: 44px;
}

/* ---------- Close enquiry form ---------- */
.close__form .gform_fields,
.ct-form .gform_fields {
	grid-template-columns: 1fr 1fr;
	gap: 14px 16px;
}

.close__form .ginput_container input:not([type="checkbox"]),
.close__form .ginput_container select,
.close__form .ginput_container textarea,
.ct-form .ginput_container input:not([type="checkbox"]),
.ct-form .ginput_container select,
.ct-form .ginput_container textarea {
	min-height: 44px;
	font-size: 14px;
}

.close__form .ginput_container textarea,
.ct-form .ginput_container textarea {
	min-height: 56px;
	height: 56px;
}

.close__form .gfield--type-checkbox .gchoice,
.ct-form .gfield--type-checkbox .gchoice {
	font-size: 13px;
	min-height: 40px;
}

.close__form .gform_footer,
.ct-form .gform_footer {
	margin-top: 14px;
}

@media (max-width: 860px) {
	.close__form .gform_fields,
	.ct-form .gform_fields {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.close__form .gfield:not(.gfield--type-checkbox):not(.gfield--type-textarea),
	.ct-form .gfield:not(.gfield--type-checkbox):not(.gfield--type-textarea) {
		grid-column: 1 / -1;
	}
}

/* ---------- Panel form ---------- */
.panel__form .gform_fields {
	grid-template-columns: 1fr;
	gap: 16px;
}

.panel__form .ginput_container input:not([type="checkbox"]),
.panel__form .ginput_container select,
.panel__form .ginput_container textarea {
	font-size: 15px;
}

.panel__form .gform_footer {
	margin-top: 18px;
}

/* ---------- Newsletter strip ---------- */
.ft__news .news__form form {
	display: flex;
	align-items: stretch;
	gap: 0;
}

.ft__news .news__form .gform-body {
	flex: 1 1 auto;
	min-width: 0;
}

.ft__news .news__form .gform_fields {
	display: block;
	gap: 0;
	align-items: stretch;
}

.ft__news .news__form .gfield {
	flex: 1 1 auto;
	min-width: 0;
}

.ft__news .news__form .gfield--type-hidden {
	display: none;
}

.ft__news .news__form .gfield_label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.ft__news .news__form .ginput_container input {
	width: 100%;
	height: 50px;
	padding: 0 18px;
	font-size: 16px;
	color: var(--ink);
	background: none;
	border: 1px solid rgba(251, 246, 238, .5);
	border-right: 0;
	border-radius: 0;
}

.ft__news .news__form .ginput_container input::placeholder {
	color: rgba(251, 246, 238, .7);
	opacity: 1;
}

.ft__news .news__form .gform_footer {
	flex: none;
	margin: 0;
}

.ft__news .news__form .gform_button.btn {
	height: 50px;
	min-height: 50px;
	padding: 0 24px;
	border-radius: 0;
	background: var(--brand-linen);
	color: var(--brand-voyage);
}

.ft__news .news__form .validation_message {
	color: #e59a8c;
}

.ft__news .news__form .gform_confirmation_message {
	margin: 8px 0 0;
	font-size: 14px;
}

@media (max-width: 480px) {
	.ft__news .news__form .gform_button.btn {
		padding: 0 16px;
	}
}

/* Bungalow plan drawing rendered as an image (non-SVG fallback). */
.bk-plan__img {
	display: block;
	width: 100%;
	height: auto;
}

/* Contact details are a WYSIWYG value inside a definition list. */
.ct-list dd p {
	margin: 0;
}

.ct-list dd p + p {
	margin-top: 8px;
}


