/**
 * Gravity Forms Custom Styling
 *
 * Figma design specs implementation for all Gravity Forms instances
 * across Operations, Partner, Contact pages.
 *
 * @package kindling
 * @since 4.0.15
 */

/* ==========================================================================
   Base Form Container
   ========================================================================== */

.operations-contact-section .gform_wrapper,
.partner-contact-section .gform_wrapper,
.contact-contact-section .gform_wrapper,
.contact-hero-form-section .gform_wrapper {
	max-width: 100%;
}

/* ==========================================================================
   Form Layout - Grid System
   ========================================================================== */

/* Two-column grid layout per Figma design */
.operations-contact-section .gform_wrapper .gform_fields,
.partner-contact-section .gform_wrapper .gform_fields,
.contact-contact-section .gform_wrapper .gform_fields,
.contact-hero-form-section .gform_wrapper .gform_fields {
	display: grid !important;
	grid-template-columns: 1fr 1fr !important;
	gap: 40px 48px !important; /* 40px vertical, 48px horizontal per Figma */
	list-style: none;
	padding: 0;
	margin: 0;
}

/* Half-width fields - let grid auto-place them side by side */
.operations-contact-section .gform_wrapper .gfield--width-half,
.partner-contact-section .gform_wrapper .gfield--width-half,
.contact-contact-section .gform_wrapper .gfield--width-half,
.contact-hero-form-section .gform_wrapper .gfield--width-half {
	grid-column: span 1 !important;
}

/* Name field (complex with First/Last) - full width row */
.operations-contact-section .gform_wrapper .gfield--type-name,
.partner-contact-section .gform_wrapper .gfield--type-name,
.contact-contact-section .gform_wrapper .gfield--type-name,
.contact-hero-form-section .gform_wrapper .gfield--type-name {
	grid-column: 1 / -1 !important;
}

/* Name field internal layout - First Name | Last Name side by side */
.operations-contact-section .gform_wrapper .gfield--type-name .ginput_container_name,
.partner-contact-section .gform_wrapper .gfield--type-name .ginput_container_name,
.contact-contact-section .gform_wrapper .gfield--type-name .ginput_container_name,
.contact-hero-form-section .gform_wrapper .gfield--type-name .ginput_container_name {
	display: grid !important;
	grid-template-columns: 1fr 1fr !important;
	gap: 48px !important;
}

/* Select/dropdown field (Get in Touch For) - full width */
.operations-contact-section .gform_wrapper .gfield--type-select,
.partner-contact-section .gform_wrapper .gfield--type-select,
.contact-contact-section .gform_wrapper .gfield--type-select,
.contact-hero-form-section .gform_wrapper .gfield--type-select {
	grid-column: 1 / -1 !important;
}

/* Textarea field - full width */
.operations-contact-section .gform_wrapper .gfield--type-textarea,
.partner-contact-section .gform_wrapper .gfield--type-textarea,
.contact-contact-section .gform_wrapper .gfield--type-textarea,
.contact-hero-form-section .gform_wrapper .gfield--type-textarea {
	grid-column: 1 / -1 !important;
}

/* Full-width fields and footer */
.operations-contact-section .gform_wrapper .gfield--width-full,
.partner-contact-section .gform_wrapper .gfield--width-full,
.contact-contact-section .gform_wrapper .gfield--width-full,
.contact-hero-form-section .gform_wrapper .gfield--width-full,
.operations-contact-section .gform_wrapper .gform_footer,
.partner-contact-section .gform_wrapper .gform_footer,
.contact-contact-section .gform_wrapper .gform_footer,
.contact-hero-form-section .gform_wrapper .gform_footer {
	grid-column: 1 / -1 !important;
}

/* ==========================================================================
   Form Fields - Input Styling
   Override Gravity Forms Orbital theme (uses high-specificity ID selectors)
   ========================================================================== */

/* Text inputs and textarea - REQUIRED: !important to override Orbital theme inline styles */
.operations-contact-section .gform_wrapper.gform-theme input[type="text"],
.operations-contact-section .gform_wrapper.gform-theme input[type="email"],
.operations-contact-section .gform_wrapper.gform-theme input[type="tel"],
.operations-contact-section .gform_wrapper.gform-theme input[type="url"],
.operations-contact-section .gform_wrapper.gform-theme input[type="number"],
.operations-contact-section .gform_wrapper.gform-theme textarea,
.operations-contact-section .gform_wrapper.gform-theme select,
.partner-contact-section .gform_wrapper.gform-theme input[type="text"],
.partner-contact-section .gform_wrapper.gform-theme input[type="email"],
.partner-contact-section .gform_wrapper.gform-theme input[type="tel"],
.partner-contact-section .gform_wrapper.gform-theme input[type="url"],
.partner-contact-section .gform_wrapper.gform-theme input[type="number"],
.partner-contact-section .gform_wrapper.gform-theme textarea,
.partner-contact-section .gform_wrapper.gform-theme select,
.contact-contact-section .gform_wrapper.gform-theme input[type="text"],
.contact-contact-section .gform_wrapper.gform-theme input[type="email"],
.contact-contact-section .gform_wrapper.gform-theme input[type="tel"],
.contact-contact-section .gform_wrapper.gform-theme input[type="url"],
.contact-contact-section .gform_wrapper.gform-theme input[type="number"],
.contact-contact-section .gform_wrapper.gform-theme textarea,
.contact-contact-section .gform_wrapper.gform-theme select,
.contact-hero-form-section .gform_wrapper.gform-theme input[type="text"],
.contact-hero-form-section .gform_wrapper.gform-theme input[type="email"],
.contact-hero-form-section .gform_wrapper.gform-theme input[type="tel"],
.contact-hero-form-section .gform_wrapper.gform-theme input[type="url"],
.contact-hero-form-section .gform_wrapper.gform-theme input[type="number"],
.contact-hero-form-section .gform_wrapper.gform-theme textarea,
.contact-hero-form-section .gform_wrapper.gform-theme select {
	/* REQUIRED: !important needed to override Gravity Forms Orbital theme ID-based selectors */
	/* Border: 3px bottom only */
	border: none !important;
	border-bottom: 3px solid #4e4b48 !important;
	border-radius: 0 !important;

	/* Typography: Inter, 20px, 30px line-height */
	font-family: var(--wp--preset--font-family--body) !important;
	font-size: 20px !important;
	line-height: 30px !important;
	color: #4e4b48 !important;

	/* Remove default styling */
	background: transparent !important;
	padding: 8px 0 !important;
	width: 100% !important;
	box-shadow: none !important;
	outline: none !important;
}

/* Focus state */
.operations-contact-section .gform_wrapper.gform-theme input[type="text"]:focus,
.operations-contact-section .gform_wrapper.gform-theme input[type="email"]:focus,
.operations-contact-section .gform_wrapper.gform-theme input[type="tel"]:focus,
.operations-contact-section .gform_wrapper.gform-theme input[type="url"]:focus,
.operations-contact-section .gform_wrapper.gform-theme input[type="number"]:focus,
.operations-contact-section .gform_wrapper.gform-theme textarea:focus,
.operations-contact-section .gform_wrapper.gform-theme select:focus,
.partner-contact-section .gform_wrapper.gform-theme input[type="text"]:focus,
.partner-contact-section .gform_wrapper.gform-theme input[type="email"]:focus,
.partner-contact-section .gform_wrapper.gform-theme input[type="tel"]:focus,
.partner-contact-section .gform_wrapper.gform-theme input[type="url"]:focus,
.partner-contact-section .gform_wrapper.gform-theme input[type="number"]:focus,
.partner-contact-section .gform_wrapper.gform-theme textarea:focus,
.partner-contact-section .gform_wrapper.gform-theme select:focus,
.contact-contact-section .gform_wrapper.gform-theme input[type="text"]:focus,
.contact-contact-section .gform_wrapper.gform-theme input[type="email"]:focus,
.contact-contact-section .gform_wrapper.gform-theme input[type="tel"]:focus,
.contact-contact-section .gform_wrapper.gform-theme input[type="url"]:focus,
.contact-contact-section .gform_wrapper.gform-theme input[type="number"]:focus,
.contact-contact-section .gform_wrapper.gform-theme textarea:focus,
.contact-contact-section .gform_wrapper.gform-theme select:focus,
.contact-hero-form-section .gform_wrapper.gform-theme input[type="text"]:focus,
.contact-hero-form-section .gform_wrapper.gform-theme input[type="email"]:focus,
.contact-hero-form-section .gform_wrapper.gform-theme input[type="tel"]:focus,
.contact-hero-form-section .gform_wrapper.gform-theme input[type="url"]:focus,
.contact-hero-form-section .gform_wrapper.gform-theme input[type="number"]:focus,
.contact-hero-form-section .gform_wrapper.gform-theme textarea:focus,
.contact-hero-form-section .gform_wrapper.gform-theme select:focus {
	border-bottom-color: #1a4ea2 !important;
	outline: none !important;
	box-shadow: none !important;
}

/* Textarea specific */
.operations-contact-section .gform_wrapper textarea,
.partner-contact-section .gform_wrapper textarea,
.contact-contact-section .gform_wrapper textarea,
.contact-hero-form-section .gform_wrapper textarea {
	min-height: 120px;
	resize: vertical;
}

/* ==========================================================================
   Form Labels
   ========================================================================== */

.operations-contact-section .gform_wrapper.gform-theme .gfield_label,
.operations-contact-section .gform_wrapper.gform-theme .gform-field-label,
.partner-contact-section .gform_wrapper.gform-theme .gfield_label,
.partner-contact-section .gform_wrapper.gform-theme .gform-field-label,
.contact-contact-section .gform_wrapper.gform-theme .gfield_label,
.contact-contact-section .gform_wrapper.gform-theme .gform-field-label,
.contact-hero-form-section .gform_wrapper.gform-theme .gfield_label,
.contact-hero-form-section .gform_wrapper.gform-theme .gform-field-label {
	/* Hide labels - placeholders serve as labels per Figma design */
	/* REQUIRED: !important needed to override Gravity Forms Orbital theme */
	display: none !important;
}

/* Also hide sub-labels for complex fields (Name field has First Name/Last Name sub-labels) */
.operations-contact-section .gform_wrapper.gform-theme .ginput_complex label,
.partner-contact-section .gform_wrapper.gform-theme .ginput_complex label,
.contact-contact-section .gform_wrapper.gform-theme .ginput_complex label,
.contact-hero-form-section .gform_wrapper.gform-theme .ginput_complex label,
.operations-contact-section .gform_wrapper.gform-theme .name_first label,
.operations-contact-section .gform_wrapper.gform-theme .name_last label,
.partner-contact-section .gform_wrapper.gform-theme .name_first label,
.partner-contact-section .gform_wrapper.gform-theme .name_last label,
.contact-contact-section .gform_wrapper.gform-theme .name_first label,
.contact-contact-section .gform_wrapper.gform-theme .name_last label,
.contact-hero-form-section .gform_wrapper.gform-theme .name_first label,
.contact-hero-form-section .gform_wrapper.gform-theme .name_last label {
	/* REQUIRED: !important needed to override Gravity Forms Orbital theme */
	display: none !important;
}

/* Hide legend for name field groups */
.operations-contact-section .gform_wrapper.gform-theme .gfield--type-name legend,
.partner-contact-section .gform_wrapper.gform-theme .gfield--type-name legend,
.contact-contact-section .gform_wrapper.gform-theme .gfield--type-name legend,
.contact-hero-form-section .gform_wrapper.gform-theme .gfield--type-name legend {
	display: none !important;
}

/* Required indicator */
.operations-contact-section .gform_wrapper .gfield_required,
.partner-contact-section .gform_wrapper .gfield_required,
.contact-contact-section .gform_wrapper .gfield_required,
.contact-hero-form-section .gform_wrapper .gfield_required {
	color: #d22730;
	margin-left: 4px;
}

/* ==========================================================================
   Submit Button
   ========================================================================== */

.operations-contact-section .gform_wrapper .gform_footer,
.partner-contact-section .gform_wrapper .gform_footer,
.contact-contact-section .gform_wrapper .gform_footer,
.contact-hero-form-section .gform_wrapper .gform_footer {
	padding: 0;
	margin: 0;
}

.operations-contact-section .gform_wrapper.gform-theme .gform_button,
.operations-contact-section .gform_wrapper.gform-theme input[type="submit"],
.partner-contact-section .gform_wrapper.gform-theme .gform_button,
.partner-contact-section .gform_wrapper.gform-theme input[type="submit"],
.contact-contact-section .gform_wrapper.gform-theme .gform_button,
.contact-contact-section .gform_wrapper.gform-theme input[type="submit"],
.contact-hero-form-section .gform_wrapper.gform-theme .gform_button,
.contact-hero-form-section .gform_wrapper.gform-theme input[type="submit"] {
	/* REQUIRED: !important needed to override Gravity Forms Orbital theme */
	/* Background and border */
	background-color: #1a4ea2 !important;
	border: 2px solid #1a4ea2 !important;
	border-radius: 54px !important;

	/* Typography: 24px, uppercase, 0.06em letter-spacing */
	font-family: var(--wp--preset--font-family--body) !important;
	font-size: 24px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.06em !important;
	color: #ffffff !important;

	/* Spacing */
	padding: 16px 48px !important;

	/* Remove default styling */
	box-shadow: none !important;
	text-shadow: none !important;
	cursor: pointer;
	transition: all 0.3s ease;
}

/* Hover state */
.operations-contact-section .gform_wrapper.gform-theme .gform_button:hover,
.operations-contact-section .gform_wrapper.gform-theme input[type="submit"]:hover,
.partner-contact-section .gform_wrapper.gform-theme .gform_button:hover,
.partner-contact-section .gform_wrapper.gform-theme input[type="submit"]:hover,
.contact-contact-section .gform_wrapper.gform-theme .gform_button:hover,
.contact-contact-section .gform_wrapper.gform-theme input[type="submit"]:hover,
.contact-hero-form-section .gform_wrapper.gform-theme .gform_button:hover,
.contact-hero-form-section .gform_wrapper.gform-theme input[type="submit"]:hover {
	background-color: #1c8ece !important;
	border-color: #1c8ece !important;
	transform: translateY(-2px);
}

/* Focus state */
.operations-contact-section .gform_wrapper.gform-theme .gform_button:focus,
.operations-contact-section .gform_wrapper.gform-theme input[type="submit"]:focus,
.partner-contact-section .gform_wrapper.gform-theme .gform_button:focus,
.partner-contact-section .gform_wrapper.gform-theme input[type="submit"]:focus,
.contact-contact-section .gform_wrapper.gform-theme .gform_button:focus,
.contact-contact-section .gform_wrapper.gform-theme input[type="submit"]:focus,
.contact-hero-form-section .gform_wrapper.gform-theme .gform_button:focus,
.contact-hero-form-section .gform_wrapper.gform-theme input[type="submit"]:focus {
	outline: 2px solid #fbd872 !important;
	outline-offset: 2px !important;
}

/* Active/pressed state */
.operations-contact-section .gform_wrapper.gform-theme .gform_button:active,
.operations-contact-section .gform_wrapper.gform-theme input[type="submit"]:active,
.partner-contact-section .gform_wrapper.gform-theme .gform_button:active,
.partner-contact-section .gform_wrapper.gform-theme input[type="submit"]:active,
.contact-contact-section .gform_wrapper.gform-theme .gform_button:active,
.contact-contact-section .gform_wrapper.gform-theme input[type="submit"]:active,
.contact-hero-form-section .gform_wrapper.gform-theme .gform_button:active,
.contact-hero-form-section .gform_wrapper.gform-theme input[type="submit"]:active {
	transform: translateY(0);
}

/* ==========================================================================
   Validation Messages
   ========================================================================== */

.operations-contact-section .gform_wrapper .gfield_error,
.partner-contact-section .gform_wrapper .gfield_error,
.contact-contact-section .gform_wrapper .gfield_error,
.contact-hero-form-section .gform_wrapper .gfield_error {
	background-color: transparent;
	border: none;
	padding: 0;
	margin-bottom: 40px;
}

.operations-contact-section .gform_wrapper .gfield_error input,
.operations-contact-section .gform_wrapper .gfield_error textarea,
.partner-contact-section .gform_wrapper .gfield_error input,
.partner-contact-section .gform_wrapper .gfield_error textarea,
.contact-contact-section .gform_wrapper .gfield_error input,
.contact-contact-section .gform_wrapper .gfield_error textarea,
.contact-hero-form-section .gform_wrapper .gfield_error input,
.contact-hero-form-section .gform_wrapper .gfield_error textarea {
	border-bottom-color: #d22730;
}

.operations-contact-section .gform_wrapper .validation_message,
.partner-contact-section .gform_wrapper .validation_message,
.contact-contact-section .gform_wrapper .validation_message,
.contact-hero-form-section .gform_wrapper .validation_message {
	font-family: var(--wp--preset--font-family--body);
	font-size: 16px;
	line-height: 24px;
	color: #d22730;
	margin-top: 8px;
	padding: 0;
	border: none;
	background: transparent;
}

.operations-contact-section .gform_wrapper .gform_validation_errors,
.partner-contact-section .gform_wrapper .gform_validation_errors,
.contact-contact-section .gform_wrapper .gform_validation_errors,
.contact-hero-form-section .gform_wrapper .gform_validation_errors {
	background-color: #fff5f5;
	border: 2px solid #d22730;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 32px;
	font-family: var(--wp--preset--font-family--body);
	font-size: 18px;
	color: #d22730;
}

/* ==========================================================================
   Success/Confirmation Message
   ========================================================================== */

.operations-contact-section .gform_confirmation_message,
.partner-contact-section .gform_confirmation_message,
.contact-contact-section .gform_confirmation_message,
.contact-hero-form-section .gform_confirmation_message {
	font-family: var(--wp--preset--font-family--body);
	font-size: 20px;
	line-height: 30px;
	color: #1a4ea2;
	padding: 24px;
	background-color: #f3f2ed;
	border-radius: 8px;
	border-left: 4px solid #1a4ea2;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet and below - Stack fields vertically */
@media (max-width: 768px) {
	.operations-contact-section .gform_wrapper .gform_fields,
	.partner-contact-section .gform_wrapper .gform_fields,
	.contact-contact-section .gform_wrapper .gform_fields,
	.contact-hero-form-section .gform_wrapper .gform_fields {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.operations-contact-section .gform_wrapper .gform_button,
	.operations-contact-section .gform_wrapper input[type="submit"],
	.partner-contact-section .gform_wrapper .gform_button,
	.partner-contact-section .gform_wrapper input[type="submit"],
	.contact-contact-section .gform_wrapper .gform_button,
	.contact-contact-section .gform_wrapper input[type="submit"],
	.contact-hero-form-section .gform_wrapper .gform_button,
	.contact-hero-form-section .gform_wrapper input[type="submit"] {
		width: 100%;
		font-size: 20px;
		padding: 14px 32px;
	}
}

/* Mobile - Adjust typography */
@media (max-width: 480px) {
	.operations-contact-section .gform_wrapper input[type="text"],
	.operations-contact-section .gform_wrapper input[type="email"],
	.operations-contact-section .gform_wrapper input[type="tel"],
	.operations-contact-section .gform_wrapper input[type="url"],
	.operations-contact-section .gform_wrapper input[type="number"],
	.operations-contact-section .gform_wrapper textarea,
	.operations-contact-section .gform_wrapper .gfield_label,
	.partner-contact-section .gform_wrapper input[type="text"],
	.partner-contact-section .gform_wrapper input[type="email"],
	.partner-contact-section .gform_wrapper input[type="tel"],
	.partner-contact-section .gform_wrapper input[type="url"],
	.partner-contact-section .gform_wrapper input[type="number"],
	.partner-contact-section .gform_wrapper textarea,
	.partner-contact-section .gform_wrapper .gfield_label,
	.contact-contact-section .gform_wrapper input[type="text"],
	.contact-contact-section .gform_wrapper input[type="email"],
	.contact-contact-section .gform_wrapper input[type="tel"],
	.contact-contact-section .gform_wrapper input[type="url"],
	.contact-contact-section .gform_wrapper input[type="number"],
	.contact-contact-section .gform_wrapper textarea,
	.contact-contact-section .gform_wrapper .gfield_label,
	.contact-hero-form-section .gform_wrapper input[type="text"],
	.contact-hero-form-section .gform_wrapper input[type="email"],
	.contact-hero-form-section .gform_wrapper input[type="tel"],
	.contact-hero-form-section .gform_wrapper input[type="url"],
	.contact-hero-form-section .gform_wrapper input[type="number"],
	.contact-hero-form-section .gform_wrapper textarea,
	.contact-hero-form-section .gform_wrapper .gfield_label {
		font-size: 18px;
		line-height: 27px;
	}

	.operations-contact-section .gform_wrapper .gform_button,
	.operations-contact-section .gform_wrapper input[type="submit"],
	.partner-contact-section .gform_wrapper .gform_button,
	.partner-contact-section .gform_wrapper input[type="submit"],
	.contact-contact-section .gform_wrapper .gform_button,
	.contact-contact-section .gform_wrapper input[type="submit"],
	.contact-hero-form-section .gform_wrapper .gform_button,
	.contact-hero-form-section .gform_wrapper input[type="submit"] {
		font-size: 18px;
		padding: 12px 24px;
	}
}
