/**
 * Contact page styles.
 *
 * Hero gradient, contact details, form wrapper, and map.
 *
 * Uses theme.json tokens:
 *   --wp--preset--color--theme-02 = #002026 (dark)
 *   --wp--preset--color--theme-03 = #01666C (teal)
 *   --wp--preset--color--theme-05 = #f7d0c4 (salmon)
 *   --wp--preset--font-family--dm-sans
 *   --wp--preset--font-family--butler
 */

/* ─── Hero gradient overlay ─── */
.contact-hero .wp-block-cover__background {
	background: linear-gradient( 267deg, rgba( 5, 23, 9, 0 ) 10%, rgba( 0, 0, 0, 0.48 ) 95% ) !important;
	opacity: 1 !important;
}

/* ─── Contact details (icon + text rows) ─── */
.contact-detail {
	display: flex;
	align-items: center;
	gap: 20px;
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: var(--wp--preset--font-size--body);
	font-weight: 300;
	line-height: 31px;
	letter-spacing: 0.2px;
	color: var(--wp--preset--color--theme-02);
}

.contact-detail a {
	color: var(--wp--preset--color--theme-02);
	text-decoration: none;
}

.contact-detail a:hover {
	text-decoration: underline;
}

/* Icons via CSS pseudo-elements (SVG data URIs) */
.contact-detail::before {
	content: "";
	flex-shrink: 0;
	display: block;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

.contact-detail--phone::before {
	width: 16px;
	height: 15px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2301666C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}

.contact-detail--email::before {
	width: 17px;
	height: 14px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2301666C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E");
}

.contact-detail--location::before {
	width: 14px;
	height: 19px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2301666C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}

/* ─── Form wrapper layout ─── */
.contact-form-wrapper {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 590px;
}

/* ─── Gravity Forms overrides ───
 *
 * Gravity Forms 2.8+ uses a "theme" system (gform-theme--orbital)
 * with CSS custom properties. We override the theme variables
 * and use high-specificity selectors to ensure our styles win.
 */

/* Reset GF theme variables for the teal container */
.contact-form-wrapper .gform_wrapper.gform-theme {
	--gf-color-primary: #f7d0c4;
	--gf-color-primary-rgb: 247, 208, 196;
	--gf-color-primary-contrast: white;
	--gf-color-secondary: transparent;
	--gf-color-in-ctrl: transparent;
	--gf-color-in-ctrl-contrast: white;
	--gf-color-in-ctrl-contrast-rgb: 255, 255, 255;
	--gf-color-in-ctrl-dark: rgba(255, 255, 255, 0.6);
	--gf-color-in-ctrl-light: rgba(255, 255, 255, 0.3);
	--gf-color-in-ctrl-primary: #f7d0c4;
	--gf-color-out-ctrl-dark: white;
	--gf-color-out-ctrl-light: rgba(255, 255, 255, 0.3);
	--gf-radius: 0px;
	margin: 0;
}

/* Hide labels — use placeholders instead */
.contact-form-wrapper .gform_wrapper .gfield_label,
.contact-form-wrapper .gform_wrapper .gfield .gform-field-label {
	display: none !important;
}

/* Hide sub-labels (First/Last, etc.) */
.contact-form-wrapper .gform_wrapper .ginput_container label {
	display: none !important;
}

/* Hide field descriptions and character counts */
.contact-form-wrapper .gform_wrapper .gfield_description:not(.validation_message) {
	display: none !important;
}

/* Remove section labels that duplicate the placeholder text */
.contact-form-wrapper .gform_wrapper .gfield--type-checkbox > .gfield_label,
.contact-form-wrapper .gform_wrapper .gfield--type-consent > .gfield_label {
	display: none !important;
}

/* Fields gap */
.contact-form-wrapper .gform_wrapper .gform_fields {
	gap: 28px !important;
}

/* All text inputs, textareas, selects */
.contact-form-wrapper .gform_wrapper input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.contact-form-wrapper .gform_wrapper textarea,
.contact-form-wrapper .gform_wrapper select {
	width: 100% !important;
	background: none !important;
	border: none !important;
	border-bottom: 2px solid white !important;
	border-radius: 0 !important;
	padding: 12px 4px !important;
	font-family: var(--wp--preset--font-family--dm-sans) !important;
	font-size: 20px !important;
	font-weight: 500 !important;
	line-height: 1.4 !important;
	letter-spacing: 0.6px !important;
	color: white !important;
	outline: none !important;
	appearance: none !important;
	box-shadow: none !important;
}

.contact-form-wrapper .gform_wrapper input::placeholder,
.contact-form-wrapper .gform_wrapper textarea::placeholder {
	color: white !important;
	opacity: 1 !important;
}

.contact-form-wrapper .gform_wrapper select {
	cursor: pointer;
}

.contact-form-wrapper .gform_wrapper select option {
	color: var(--wp--preset--color--theme-02);
	background-color: white;
}

.contact-form-wrapper .gform_wrapper textarea {
	resize: vertical;
	min-height: 120px;
}

/* Checkbox and consent fields */
.contact-form-wrapper .gform_wrapper .gfield--type-checkbox .gchoice,
.contact-form-wrapper .gform_wrapper .gfield--type-consent .ginput_container {
	display: flex;
	align-items: center;
	gap: 20px;
}

.contact-form-wrapper .gform_wrapper .gfield--type-checkbox .gchoice label,
.contact-form-wrapper .gform_wrapper .gfield--type-consent .ginput_container label {
	display: inline !important;
	font-family: var(--wp--preset--font-family--dm-sans) !important;
	font-size: 20px !important;
	font-weight: 500 !important;
	line-height: 18px !important;
	letter-spacing: 0.6px !important;
	color: white !important;
}

.contact-form-wrapper .gform_wrapper input[type="checkbox"] {
	width: 28px !important;
	height: 28px !important;
	min-width: 28px;
	border: 2px solid white !important;
	border-bottom: 2px solid white !important;
	background: none !important;
	appearance: none !important;
	cursor: pointer;
	flex-shrink: 0;
	box-shadow: none !important;
}

.contact-form-wrapper .gform_wrapper input[type="checkbox"]:checked {
	background-color: white !important;
}

/* Submit button — salmon underline style */
.contact-form-wrapper .gform_wrapper .gform_footer,
.contact-form-wrapper .gform_wrapper .gform_page_footer {
	padding: 0 !important;
	margin: 40px 0 0 !important;
}

.contact-form-wrapper .gform_wrapper input[type="submit"],
.contact-form-wrapper .gform_wrapper button[type="submit"],
.contact-form-wrapper .gform_wrapper .gform_button {
	font-family: var(--wp--preset--font-family--dm-sans) !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	letter-spacing: var(--wp--custom--letter-spacing--cta) !important;
	line-height: 32px !important;
	text-transform: uppercase !important;
	color: var(--wp--preset--color--theme-05) !important;
	background: none !important;
	border: none !important;
	border-bottom: 1px solid var(--wp--preset--color--theme-05) !important;
	border-radius: 0 !important;
	cursor: pointer;
	padding: 0 !important;
	transition: opacity 0.3s ease;
	box-shadow: none !important;
}

.contact-form-wrapper .gform_wrapper input[type="submit"]:hover,
.contact-form-wrapper .gform_wrapper button[type="submit"]:hover,
.contact-form-wrapper .gform_wrapper .gform_button:hover {
	opacity: 0.7;
	background: none !important;
}

/* Validation states */
.contact-form-wrapper .gform_wrapper .gform_validation_errors,
.contact-form-wrapper .gform_wrapper .validation_message {
	color: var(--wp--preset--color--theme-05) !important;
}

.contact-form-wrapper .gform_wrapper .gfield_error input,
.contact-form-wrapper .gform_wrapper .gfield_error textarea,
.contact-form-wrapper .gform_wrapper .gfield_error select {
	border-bottom-color: var(--wp--preset--color--theme-05) !important;
}

/* ─── Map section ─── */
.contact-map {
	margin-top: var(--wp--preset--spacing--80);
}

.contact-map img {
	width: 100%;
	height: 710px;
	object-fit: cover;
}

/* ─── Responsive ─── */
@media (max-width: 1200px) {
	.contact-form-wrapper {
		min-height: auto;
	}
}

@media (max-width: 768px) {
	.contact-form-wrapper {
		padding: 40px 24px !important;
	}

	.contact-map img {
		height: 400px;
	}
}
