/**
 * Booking Form Section Styles
 * Matches Figma node 132:281 exactly
 * Measurements: 64px padding, 28px gaps, 32px between half-width fields
 */

/* ==========================================================================
   Section Container
   ========================================================================== */

.booking-form {
	position: relative;
	display: flex;
	align-items: stretch;
	width: 100%;
	max-width: 1920px;
	min-height: 700px;
	margin: 0 auto;
	background-color: var(--wp--preset--color--background);
	overflow: hidden;
}

.booking-form.is-layout-flex {
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0;
}

/* ==========================================================================
   Background Image (Left Side)
   ========================================================================== */

.booking-form__background {
	position: relative;
	flex: 1;
	min-width: 0;
	min-height: 700px;
	overflow: hidden;
	background-image: url('/wp-content/themes/signature-plastic/assets/images/team/booking-background.jpg');
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.booking-form__background.has-global-padding {
	padding: 0;
}

.booking-form__background.is-layout-constrained {
	max-width: none;
}

/* ==========================================================================
   Form Panel (Right Side) - Figma: 64px padding all sides
   ========================================================================== */

.booking-form__panel {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	width: 586px;
	flex-shrink: 0;
	padding: 64px !important;
	background-color: var(--wp--preset--color--primary);
	box-sizing: border-box;
}

.booking-form__panel.has-global-padding {
	padding: 64px !important;
}

/* Heading - Figma: Butler Light, 53px, 28px margin bottom */
.booking-form__heading {
	font-family: var(--wp--preset--font-family--butler);
	font-size: 53px;
	font-weight: 300;
	line-height: 0.98;
	color: var(--wp--preset--color--white);
	margin: 0 0 28px 0 !important;
}

/* ==========================================================================
   Gravity Forms Reset
   ========================================================================== */

.booking-form__panel .gform_wrapper,
.booking-form__panel .gform_wrapper.gravity-theme,
.booking-form__panel .gform-theme--framework {
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
}

.booking-form__panel .gform_wrapper *,
.booking-form__panel .gform-theme--framework * {
	box-sizing: border-box;
}

.booking-form__panel .gform_wrapper .gform_body,
.booking-form__panel .gform-theme--framework .gform_body {
	margin: 0;
	padding: 0;
}

/* ==========================================================================
   Fields Container - Figma: 28px gap between all fields
   ========================================================================== */

.booking-form__panel .gform_wrapper .gform_fields,
.booking-form__panel .gform-theme--framework .gform_fields {
	display: flex !important;
	flex-direction: column !important;
	gap: 28px !important;
	padding: 0 !important;
	margin: 0 !important;
	list-style: none !important;
	/* Override GF grid */
	grid-template-columns: unset !important;
}

/* Individual field wrapper */
.booking-form__panel .gform_wrapper .gfield,
.booking-form__panel .gform-theme--framework .gfield {
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	width: 100% !important;
}

/* ==========================================================================
   Field Labels - Figma: DM Sans Medium, 20px, white, 0.6px tracking
   Labels appear ON the border line (inline with field)
   ========================================================================== */

/* Hide all standard labels - we use custom inline approach */
.booking-form__panel .gform_wrapper .gfield_label,
.booking-form__panel .gform_wrapper .gform-field-label,
.booking-form__panel .gform_wrapper legend.gfield_label,
.booking-form__panel .gform_wrapper .gfield_label_before_complex {
	display: none !important;
}

/* Hide required indicator */
.booking-form__panel .gform_wrapper .gfield_required {
	display: none !important;
}

/* Hide sub-labels (First/Last, etc.) */
.booking-form__panel .gform_wrapper .ginput_complex label,
.booking-form__panel .gform_wrapper .ginput_complex .gform-field-label,
.booking-form__panel .gform_wrapper .hidden_label {
	display: none !important;
}

/* ==========================================================================
   Text Inputs - Figma: DM Sans Medium, 20px, white, bottom border only
   ========================================================================== */

.booking-form__panel .gform_wrapper input[type="text"],
.booking-form__panel .gform_wrapper input[type="email"],
.booking-form__panel .gform_wrapper input[type="tel"],
.booking-form__panel .gform_wrapper select,
.booking-form__panel .gform_wrapper textarea,
.booking-form__panel .gform-theme--framework input[type="text"],
.booking-form__panel .gform-theme--framework input[type="email"],
.booking-form__panel .gform-theme--framework input[type="tel"],
.booking-form__panel .gform-theme--framework select,
.booking-form__panel .gform-theme--framework textarea {
	width: 100% !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: var(--wp--preset--color--white) !important;
	background-color: transparent !important;
	border: none !important;
	border-bottom: 2px solid var(--wp--preset--color--white) !important;
	border-radius: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
}

/* Placeholder styling - matches field text */
.booking-form__panel .gform_wrapper input::placeholder,
.booking-form__panel .gform_wrapper textarea::placeholder,
.booking-form__panel .gform-theme--framework input::placeholder,
.booking-form__panel .gform-theme--framework textarea::placeholder {
	color: var(--wp--preset--color--white) !important;
	opacity: 1 !important;
	font-family: var(--wp--preset--font-family--dm-sans) !important;
	font-size: 20px !important;
	font-weight: 500 !important;
	letter-spacing: 0.6px !important;
}

/* ==========================================================================
   Name Field - Figma shows single "Name*" but GF uses First/Last
   Style as single row with "Name*" placeholder on first input
   ========================================================================== */

.booking-form__panel .gform_wrapper .ginput_container_name,
.booking-form__panel .gform_wrapper .ginput_complex.ginput_container--name {
	display: flex !important;
	flex-direction: row !important;
	gap: 32px !important;
	width: 100% !important;
}

.booking-form__panel .gform_wrapper .ginput_container_name > span,
.booking-form__panel .gform_wrapper .ginput_complex.ginput_container--name > span {
	flex: 1 !important;
	display: block !important;
}

/* ==========================================================================
   Email & Phone - Figma: Side by side, 32px gap
   ========================================================================== */

/* Create a flex row for Email and Phone fields */
.booking-form__panel .gform_wrapper .gfield--type-email,
.booking-form__panel .gform_wrapper .gfield--type-phone,
.booking-form__panel .gform_wrapper .gfield.gfield--width-half {
	width: calc(50% - 16px) !important;
	flex: 0 0 calc(50% - 16px) !important;
}

/* Make Email and Phone appear on same row */
.booking-form__panel .gform_wrapper .gform_fields {
	flex-direction: row !important;
	flex-wrap: wrap !important;
	column-gap: 32px !important;
	row-gap: 28px !important;
}

/* Full width fields */
.booking-form__panel .gform_wrapper .gfield--type-name,
.booking-form__panel .gform_wrapper .gfield--type-select,
.booking-form__panel .gform_wrapper .gfield--type-textarea,
.booking-form__panel .gform_wrapper .gfield--type-checkbox,
.booking-form__panel .gform_wrapper .gfield.gfield--width-full {
	width: 100% !important;
	flex: 0 0 100% !important;
}

/* ==========================================================================
   Select Dropdown - Figma: Same styling with chevron
   ========================================================================== */

.booking-form__panel .gform_wrapper select,
.booking-form__panel .gform-theme--framework select {
	cursor: pointer !important;
	background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 4px center !important;
	background-size: 12px 7.4px !important;
	padding-right: 24px !important;
	padding-top: 8px !important;
	padding-bottom: 8px !important;
	line-height: 1.4 !important;
	height: auto !important;
	min-height: 44px !important;
	overflow: visible !important;
}

.booking-form__panel .gform_wrapper select option {
	color: var(--wp--preset--color--primary);
	background-color: var(--wp--preset--color--white);
	font-size: 16px;
	padding: 8px;
}

/* ==========================================================================
   Textarea (Message) - Figma: Taller area for message
   ========================================================================== */

.booking-form__panel .gform_wrapper textarea,
.booking-form__panel .gform-theme--framework textarea {
	min-height: 120px !important;
	resize: vertical !important;
	line-height: 1.4 !important;
}

/* Hide character counter */
.booking-form__panel .gform_wrapper .charleft,
.booking-form__panel .gform_wrapper .ginput_counter,
.booking-form__panel .gform_wrapper .gfield_description {
	display: none !important;
}

/* ==========================================================================
   Checkbox - Figma: ~28px square, 20px gap, white border
   ========================================================================== */

.booking-form__panel .gform_wrapper .gfield--type-checkbox,
.booking-form__panel .gform_wrapper .gfield--input-type-checkbox {
	margin-top: 0 !important;
}

.booking-form__panel .gform_wrapper .gfield_checkbox,
.booking-form__panel .gform_wrapper .ginput_container_checkbox {
	display: flex !important;
	align-items: flex-start !important;
	gap: 16px !important;
	padding: 0 !important;
	margin: 0 !important;
	list-style: none !important;
}

.booking-form__panel .gform_wrapper .gfield_checkbox li,
.booking-form__panel .gform_wrapper .gchoice {
	margin: 0 !important;
	padding: 0 !important;
	display: flex !important;
	align-items: center !important;
	gap: 16px !important;
}

/* Checkbox input - Figma: ~24px square */
.booking-form__panel .gform_wrapper input[type="checkbox"],
.booking-form__panel .gform-theme--framework input[type="checkbox"] {
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
	width: 24px !important;
	height: 24px !important;
	min-width: 24px !important;
	min-height: 24px !important;
	border: 2px solid var(--wp--preset--color--white) !important;
	border-radius: 0 !important;
	background: transparent !important;
	cursor: pointer !important;
	flex-shrink: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Checkbox checked state */
.booking-form__panel .gform_wrapper input[type="checkbox"]:checked,
.booking-form__panel .gform-theme--framework input[type="checkbox"]:checked {
	background-color: var(--wp--preset--color--white) !important;
	background-image: url("data:image/svg+xml,%3Csvg width='16' height='12' viewBox='0 0 16 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 6L6 11L15 1' stroke='%2301666C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: center !important;
	background-size: 12px 9px !important;
}

/* Checkbox label - Figma: DM Sans Medium, single line */
.booking-form__panel .gform_wrapper .gfield_checkbox label,
.booking-form__panel .gform_wrapper .gchoice label,
.booking-form__panel .gform_wrapper .gform-field-label--type-inline {
	display: inline !important;
	font-family: var(--wp--preset--font-family--dm-sans) !important;
	font-size: 16px !important;
	font-weight: 500 !important;
	line-height: 1.3 !important;
	letter-spacing: 0.2px !important;
	color: var(--wp--preset--color--white) !important;
	cursor: pointer !important;
	margin: 0 !important;
	padding: 0 !important;
	white-space: nowrap !important;
}

/* ==========================================================================
   Submit Button - Figma: DM Sans Bold, 16px, var(--wp--preset--color--coral), uppercase, underline
   ========================================================================== */

.booking-form__panel .gform_wrapper .gform_footer,
.booking-form__panel .gform-theme--framework .gform_footer,
.booking-form__panel .gform_wrapper .gform-footer {
	margin: 0 !important;
	padding: 28px 0 0 0 !important;
	background: transparent !important;
	border: none !important;
}

.booking-form__panel .gform_wrapper input[type="submit"],
.booking-form__panel .gform_wrapper button[type="submit"],
.booking-form__panel .gform_wrapper .gform_button,
.booking-form__panel .gform-theme--framework input[type="submit"],
.booking-form__panel .gform-theme--framework .gform_button {
	display: inline-block !important;
	padding: 0 !important;
	font-family: var(--wp--preset--font-family--dm-sans) !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	line-height: 2 !important;
	letter-spacing: 1.6px !important;
	text-transform: uppercase !important;
	color: var(--wp--preset--color--coral) !important;
	background: transparent !important;
	background-color: transparent !important;
	border: none !important;
	border-bottom: 1px solid var(--wp--preset--color--coral) !important;
	border-radius: 0 !important;
	cursor: pointer !important;
	transition: color 0.2s ease, border-color 0.2s ease !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
	box-shadow: none !important;
}

.booking-form__panel .gform_wrapper input[type="submit"]:hover,
.booking-form__panel .gform_wrapper .gform_button:hover,
.booking-form__panel .gform-theme--framework input[type="submit"]:hover {
	color: var(--wp--preset--color--white) !important;
	border-color: var(--wp--preset--color--white) !important;
	background: transparent !important;
}

/* ==========================================================================
   Focus States
   ========================================================================== */

.booking-form__panel .gform_wrapper input:focus,
.booking-form__panel .gform_wrapper select:focus,
.booking-form__panel .gform_wrapper textarea:focus {
	border-bottom-color: var(--wp--preset--color--foreground) !important;
	outline: none !important;
	box-shadow: none !important;
}

/* ==========================================================================
   Validation & Error States
   ========================================================================== */

.booking-form__panel .gform_wrapper .gfield_error input,
.booking-form__panel .gform_wrapper .gfield_error select,
.booking-form__panel .gform_wrapper .gfield_error textarea {
	border-bottom-color: var(--wp--preset--color--error) !important;
}

.booking-form__panel .gform_wrapper .validation_message {
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: 14px;
	color: var(--wp--preset--color--error);
	margin-top: 8px;
	padding: 0;
	background: transparent;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 1440px) {
	.booking-form__panel {
		width: 500px;
		padding: 48px !important;
	}

	.booking-form__heading {
		font-size: 44px;
	}
}

@media (max-width: 1280px) {
	.booking-form__panel {
		width: 450px;
		padding: 40px !important;
	}

	.booking-form__heading {
		font-size: 38px;
		margin-bottom: 24px !important;
	}

	.booking-form__panel .gform_wrapper .gform_fields {
		gap: 20px !important;
		row-gap: 20px !important;
	}
}

@media (max-width: 1024px) {
	.booking-form {
		flex-direction: column;
		min-height: auto;
	}

	.booking-form__background {
		height: 500px;
		flex: none;
	}

	.booking-form__panel {
		width: 100%;
		padding: 48px 40px !important;
	}
}

@media (max-width: 768px) {
	.booking-form__background {
		height: 400px;
	}

	.booking-form__panel {
		padding: 40px 24px !important;
	}

	.booking-form__heading {
		font-size: 32px;
		margin-bottom: 20px !important;
	}

	/* Stack Email/Phone on mobile */
	.booking-form__panel .gform_wrapper .gfield--type-email,
	.booking-form__panel .gform_wrapper .gfield--type-phone,
	.booking-form__panel .gform_wrapper .gfield.gfield--width-half {
		width: 100% !important;
		flex: 0 0 100% !important;
	}

	.booking-form__panel .gform_wrapper input[type="text"],
	.booking-form__panel .gform_wrapper input[type="email"],
	.booking-form__panel .gform_wrapper input[type="tel"],
	.booking-form__panel .gform_wrapper select,
	.booking-form__panel .gform_wrapper textarea,
	.booking-form__panel .gform_wrapper input::placeholder,
	.booking-form__panel .gform_wrapper textarea::placeholder {
		font-size: 18px !important;
	}

	.booking-form__panel .gform_wrapper .gfield_checkbox label,
	.booking-form__panel .gform_wrapper .gform-field-label--type-inline {
		font-size: 18px !important;
	}
}

@media (max-width: 375px) {
	.booking-form__background {
		height: 300px;
	}

	.booking-form__panel {
		padding: 32px 20px !important;
	}

	.booking-form__heading {
		font-size: 28px;
	}

	.booking-form__panel .gform_wrapper input[type="text"],
	.booking-form__panel .gform_wrapper input[type="email"],
	.booking-form__panel .gform_wrapper input[type="tel"],
	.booking-form__panel .gform_wrapper select,
	.booking-form__panel .gform_wrapper textarea,
	.booking-form__panel .gform_wrapper input::placeholder,
	.booking-form__panel .gform_wrapper textarea::placeholder {
		font-size: 16px !important;
	}

	.booking-form__panel .gform_wrapper .gfield_checkbox label,
	.booking-form__panel .gform_wrapper .gform-field-label--type-inline {
		font-size: 16px !important;
	}

	.booking-form__panel .gform_wrapper input[type="checkbox"] {
		width: 24px !important;
		height: 24px !important;
		min-width: 24px !important;
		min-height: 24px !important;
	}
}
