#gform_next_button_2_5 {
	opacity: 0;
	position: absolute;
}

.gform-theme--api,
.gform-theme--foundation {
	--gf-form-gap-y: 20px !important;
}

#gform_wrapper_2 {
	width: 90%;
	max-width: 400px;
}

/**
 * Fetchify Postcode Search Styles
 * 
 * @package nufibre
 * @author David Buckle
 */

/* ================================
   RESULTS LIST
================================ */

.fetchify-results {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 350px !important;
	overflow-y: scroll !important;
}

.fetchify-result-item {
	padding: 12px 16px;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f0;
	color: #333;
	font-size: 14px;
	line-height: 1.4;
	transition: background-color 0.15s ease;
}

.fetchify-result-item:last-child {
	border-bottom: none;
}

.fetchify-result-item:hover,
.fetchify-result-item.selected {
	background-color: #f8f9fa;
	color: #0073aa;
}

/* ================================
   SPECIAL STATES
================================ */

.fetchify-loading,
.fetchify-no-results,
.fetchify-error {
	padding: 12px 16px;
	font-size: 14px;
	text-align: center;
	color: #666;
	font-style: italic;
	cursor: default;
}

.fetchify-loading {
	color: #0073aa;
}

.fetchify-error {
	color: #d63638;
	background-color: #fef7f7;
}

.fetchify-no-results {
	color: #8c8f94;
}

/* ================================
   POSTCODE FIELD POSITIONING
================================ */

#field_2_1 {
	background-color: #fff;
	position: relative;
	border-radius: 7px !important; /* Ensure the field has a consistent border radius */
}

.gfield.fetchify-postcode {
	position: relative !important;
}

.fetchify-postcode .ginput_container {
	position: relative !important;
}

/* Ensure the wrapper also has relative positioning */
.fetchify-postcode-wrapper {
	position: relative;
	margin-top: 8px;
	margin-bottom: 8px;
}

/* Make sure the dropdown is absolutely positioned within the field container */
.fetchify-dropdown {
	position: absolute !important;
	top: calc(100% + 2px) !important;
	left: 0 !important;
	right: 0 !important;
	z-index: 1000 !important;
	background-color: #ffffff !important;
	border: 1px solid #ddd;
	border-radius: 4px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	max-height: 300px;
	overflow-y: auto;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.2s ease-in-out;
}

.fetchify-dropdown li {
	padding: 10px 15px;
	border-bottom: 1px solid #dfdfdf;
	text-transform: capitalize !important;
	font-size: 13px !important;
	cursor: pointer;
	line-height: 16px;
}

.fetchify-dropdown.show {
	opacity: 1 !important;
	visibility: visible !important;
	transform: translateY(0) !important;
}

/* Search button styles */
.fetchify-search-btn {
	background: var(--wp--preset--color--primary);
	color: white;
	border: none;
	padding: 8px 25px !important;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: background-color 0.15s ease;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	position: absolute !important;
	right: 0 !important;
	top: 0 !important;
	bottom: 0 !important;
}

.fetchify-search-btn svg {
	width: 16px;
	height: 16px;
	fill: #ffffff;
	width: 20px;
	height: 20px;
}

.fetchify-search-btn:hover {
	background: #005a87;
}

.fetchify-search-btn:active {
	background: #004a73;
}

.fetchify-search-btn:disabled {
	background: #ccc;
	cursor: not-allowed;
}

/* Alternative selector for different Gravity Forms versions */
.fetchify-postcode {
	position: relative;
}

.fetchify-postcode .ginput_container {
	position: relative;
}

.fetchify-postcode input {
	height: 70px !important;
	padding-left: 20px !important; /* Ensure enough space for the search button */
	font-size: 14px !important; /* Adjust font size for better visibility */
	font-weight: 700 !important; /* Make the text bold */
}
/* ================================
   RESPONSIVE DESIGN
================================ */

@media (max-width: 768px) {
	.fetchify-dropdown {
		max-height: 250px;
	}

	.fetchify-result-item {
		padding: 10px 12px;
		font-size: 13px;
	}
}

/* ================================
   ACCESSIBILITY ENHANCEMENTS
================================ */

.fetchify-result-item:focus {
	outline: 2px solid #0073aa;
	outline-offset: -2px;
	background-color: #f8f9fa;
}

/* Screen reader only text */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ================================
   ANIMATION IMPROVEMENTS
================================ */

.fetchify-dropdown {
	will-change: opacity, visibility, transform;
}

.fetchify-result-item {
	will-change: background-color;
}

/* ================================
   CUSTOMIZATION HELPERS
   You can override these styles in your theme
================================ */

/* Custom border radius */
.fetchify-dropdown.rounded {
	border-radius: 8px;
}

/* Custom shadow */
.fetchify-dropdown.shadow-lg {
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Custom max height */
.fetchify-dropdown.tall {
	max-height: 400px;
}

/* Custom item spacing */
.fetchify-dropdown.compact .fetchify-result-item {
	padding: 8px 12px;
}

.fetchify-dropdown.spacious .fetchify-result-item {
	padding: 16px 20px;
}

/* Dark theme variant */
.fetchify-dropdown.dark {
	background: #2c3338;
	border-color: #50575e;
	color: #f0f0f1;
}

.fetchify-dropdown.dark .fetchify-result-item {
	color: #f0f0f1;
	border-bottom-color: #50575e;
}

.fetchify-dropdown.dark .fetchify-result-item:hover,
.fetchify-dropdown.dark .fetchify-result-item.selected {
	background-color: #50575e;
	color: #ffffff;
}

/* ================================
   LOADING ANIMATION
================================ */

@keyframes fetchify-pulse {
	0% {
		opacity: 1;
	}
	50% {
		opacity: 0.5;
	}
	100% {
		opacity: 1;
	}
}

.fetchify-loading {
	animation: fetchify-pulse 1.5s ease-in-out infinite;
}
