/* Structured Search Form Styles */

.lsp-structured {
	max-width: 1200px;
	margin: 0 auto;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	padding: 2rem;
	position: relative;
}

/* Base input styling */
.lsp-structured .lsp-select,
.lsp-structured .lsp-text {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	font-size: 14px;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
	background: #fff;
	appearance: none;
}

.lsp-structured .lsp-select:focus,
.lsp-structured .lsp-text:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

/* Search Row Layout */
.lsp-structured .lsp-search-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
	margin-bottom: 1.5rem;
	align-items: end;
}

/* Field Containers */
.lsp-structured .lsp-field {
	position: relative;
	display: flex;
	flex-direction: column;
}

.lsp-structured .lsp-field-label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
	margin-bottom: 0.75rem;
	color: #23282d;
	font-size: 14px;
}

.lsp-structured .lsp-field-label i {
	width: 18px;
	height: 18px;
	text-align: center;
	color: #0073aa;
	font-size: 16px;
}

/* Select Fields */
.lsp-structured .lsp-select {
	appearance: none;
	background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3e%3cpath fill='%23333' d='M6 9L2 5l1.41-1.41L6 6.17l-2.59-2.58L2 5l4 4z'/%3e%3c/svg%3e") no-repeat right 12px center;
	background-size: 12px;
	padding-right: 2.5rem;
}

.lsp-structured .lsp-select:focus {
	border-color: #0073aa;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Text Input with Autocomplete */
.lsp-structured .lsp-text-input-wrapper {
	position: relative;
}

.lsp-structured .lsp-autocomplete-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-top: none;
	border-radius: 0 0 8px 8px;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
	max-height: 320px;
	overflow-y: auto;
	z-index: 1000;
	display: none;
}

.lsp-structured .lsp-autocomplete-item {
	padding: 0.875rem 1rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	border-bottom: 1px solid #f8f9fa;
	transition: all 0.2s ease;
}

.lsp-structured .lsp-autocomplete-item:hover,
.lsp-structured .lsp-autocomplete-item.lsp-highlighted {
	background-color: #f0f8ff;
	color: #0073aa;
}

.lsp-structured .lsp-autocomplete-item:last-child {
	border-bottom: none;
}

/* Category grouping for autocomplete */
.lsp-structured .lsp-autocomplete-category {
	border-bottom: 1px solid #f0f0f0;
}

.lsp-structured .lsp-autocomplete-category:last-child {
	border-bottom: none;
}

.lsp-structured .lsp-category-header {
	padding: 0.5rem 1rem;
	background: #f8f9fa;
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;
	color: #6c757d;
	letter-spacing: 0.5px;
}

.lsp-structured .lsp-suggestion-text {
	flex: 1;
	font-weight: 500;
	line-height: 1.4;
}

.lsp-structured .lsp-suggestion-text mark {
	background: #fff3cd;
	color: #856404;
	padding: 1px 2px;
	border-radius: 2px;
	font-weight: 600;
}

.lsp-structured .lsp-suggestion-category {
	font-size: 11px;
	background: #e9ecef;
	padding: 2px 6px;
	border-radius: 4px;
	text-transform: uppercase;
	color: #6c757d;
	white-space: nowrap;
	font-weight: 600;
	letter-spacing: 0.3px;
}

/* Submit Button */
.lsp-structured .lsp-search-submit {
	background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
	color: white;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(0, 115, 170, 0.3);
	position: relative;
	overflow: hidden;
}

.lsp-structured .lsp-search-submit:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 115, 170, 0.4);
}

.lsp-structured .lsp-search-submit:active {
	transform: translateY(0);
}

.lsp-structured .lsp-search-submit::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
	transition: left 0.5s;
}

.lsp-structured .lsp-search-submit:hover::before {
	left: 100%;
}

/* Advanced Toggle */
.lsp-structured .lsp-advanced-toggle {
	text-align: center;
	margin-bottom: 1rem;
}

.lsp-structured .lsp-advanced-btn {
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	padding: 0.75rem 1.5rem;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 14px;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.lsp-structured .lsp-advanced-btn:hover {
	background: #e9ecef;
	border-color: #0073aa;
}

.lsp-structured .lsp-chevron {
	transition: transform 0.3s ease;
}

.lsp-structured .lsp-advanced-btn.open .lsp-chevron {
	transform: rotate(180deg);
}

/* Advanced Panel */
.lsp-structured .lsp-advanced-panel {
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	padding: 1.5rem;
	margin-bottom: 1rem;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s ease, padding 0.4s ease;
}

.lsp-structured .lsp-advanced-panel.show {
	max-height: 300px;
	padding: 1.5rem;
}

.lsp-structured .lsp-advanced-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1.5rem;
}

.lsp-structured .lsp-advanced-field {
	display: flex;
	flex-direction: column;
}

.lsp-structured .lsp-field-price,
.lsp-structured .lsp-field-rooms,
.lsp-structured .lsp-field-sort,
.lsp-structured .lsp-field-per-page {
	margin-bottom: 1rem;
}

.lsp-structured .lsp-advanced-field label {
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: #495057;
	font-size: 13px;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.lsp-structured .lsp-advanced-field label i {
	width: 16px;
	text-align: center;
	color: #6c757d;
}

.lsp-structured .lsp-price-range {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.lsp-structured .lsp-price-input {
	width: 100px;
	padding: 0.5rem;
	border: 1px solid #ced4da;
	border-radius: 6px;
	font-size: 14px;
}

.lsp-structured .lsp-price-separator {
	font-weight: bold;
	color: #6c757d;
}

.lsp-structured .lsp-input-small {
	width: 120px;
	padding: 0.5rem;
	border: 1px solid #ced4da;
	border-radius: 6px;
	font-size: 14px;
}

.lsp-structured .lsp-select-small {
	width: 120px;
	padding: 0.5rem;
	border: 1px solid #ced4da;
	border-radius: 6px;
	font-size: 14px;
	background: #fff;
}

/* Clear Buttons */
.lsp-structured .lsp-select-wrapper {
	position: relative;
}

.lsp-structured .lsp-clear-select {
	position: absolute;
	right: 2.5rem;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #6c757d;
	cursor: pointer;
	padding: 0.25rem;
	border-radius: 4px;
	transition: color 0.2s ease;
}

.lsp-structured .lsp-clear-select:hover {
	color: #dc3545;
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
	.lsp-structured {
		max-width: 100%;
		margin: 0 1rem;
		padding: 1.5rem;
	}
}

@media (max-width: 1024px) {
	.lsp-structured .lsp-search-row {
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
	}
	
	.lsp-structured .lsp-advanced-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
	}
	
	.lsp-structured .lsp-autocomplete-dropdown {
		max-height: 300px;
	}
}

@media (max-width: 768px) {
	.lsp-structured {
		padding: 1rem;
		margin: 0 0.5rem;
		border-radius: 8px;
	}
	
	.lsp-structured .lsp-search-row {
		grid-template-columns: 1fr;
		gap: 1rem;
	}
	
	.lsp-structured .lsp-field {
		margin-bottom: 0;
	}
	
	.lsp-structured .lsp-field-label {
		font-size: 13px;
		margin-bottom: 0.5rem;
	}
	
	.lsp-structured .lsp-select,
	.lsp-structured .lsp-text {
		padding: 1rem;
		font-size: 16px; /* Prevent zoom on iOS */
		border-radius: 6px;
	}
	
	.lsp-structured .lsp-advanced-grid {
		grid-template-columns: 1fr;
		gap: 0.75rem;
	}
	
	.lsp-structured .lsp-price-range {
		flex-direction: column;
		gap: 0.5rem;
		align-items: stretch;
	}
	
	.lsp-structured .lsp-price-input,
	.lsp-structured .lsp-input-small,
	.lsp-structured .lsp-select-small {
		width: 100%;
		padding: 0.75rem;
		font-size: 16px;
	}
	
	.lsp-structured .lsp-autocomplete-dropdown {
		max-height: 250px;
	}
	
	.lsp-structured .lsp-autocomplete-item {
		padding: 1rem;
		gap: 0.5rem;
	}
	
	.lsp-structured .lsp-suggestion-text {
		font-size: 14px;
	}
}

@media (max-width: 480px) {
	.lsp-structured {
		padding: 0.75rem;
		margin: 0;
	}
	
	.lsp-structured .lsp-field-label {
		font-size: 13px;
	}
	
	.lsp-structured .lsp-select,
	.lsp-structured .lsp-text {
		font-size: 16px;
		padding: 1rem;
	}
}

/* Enhanced Loading States */
.lsp-structured.lsp-loading {
	opacity: 0.7;
	pointer-events: none;
}

.lsp-structured.lsp-loading .lsp-search-submit {
	color: transparent;
	position: relative;
}

.lsp-structured.lsp-loading .lsp-search-submit::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 20px;
	height: 20px;
	border: 2px solid #fff;
	border-radius: 50%;
	border-top-color: transparent;
	border-right-color: transparent;
	animation: lsp-spin 1s linear infinite;
}

.lsp-structured.lsp-loading .lsp-field {
	opacity: 0.6;
}

.lsp-structured.lsp-loading .lsp-select,
.lsp-structured.lsp-loading .lsp-text {
	background-color: #f8f9fa;
}

@keyframes lsp-spin {
	0% { transform: translate(-50%, -50%) rotate(0deg); }
	100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Enhanced Focus States and Accessibility */
.lsp-structured .lsp-field:focus-within .lsp-field-label {
	color: #0073aa;
}

.lsp-structured .lsp-field:focus-within .lsp-field-label i {
	color: #005a87;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.lsp-structured .lsp-select,
	.lsp-structured .lsp-text {
		border-width: 3px;
		border-color: #000;
	}
	
	.lsp-structured .lsp-select:focus,
	.lsp-structured .lsp-text:focus {
		border-color: #0066cc;
	}
	
	.lsp-structured .lsp-search-submit {
		border: 3px solid #000;
	}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	.lsp-structured *,
	.lsp-structured *::before,
	.lsp-structured *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
	
	.lsp-structured .lsp-autocomplete-dropdown {
		animation: none;
	}
	
	.lsp-structured .lsp-advanced-panel {
		animation: none;
	}
}

/* Screen reader only content */
.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;
}

/* Focus visible support */
.lsp-structured .lsp-select:focus-visible,
.lsp-structured .lsp-text:focus-visible,
.lsp-structured .lsp-search-submit:focus-visible,
.lsp-structured .lsp-advanced-btn:focus-visible {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

/* Custom Variants */
.lsp-structured.lsp-compact .lsp-search-row {
	gap: 0.5rem;
}

.lsp-structured.lsp-compact .lsp-field-label {
	font-size: 13px;
	margin-bottom: 0.5rem;
}

.lsp-structured.lsp-large .lsp-search-row {
	gap: 1.5rem;
}

.lsp-structured.lsp-large .lsp-field {
	min-width: 250px;
}

/* Animation Enhancements */
.lsp-structured .lsp-autocomplete-dropdown {
	animation: lsp-slide-down 0.2s ease-out;
}

@keyframes lsp-slide-down {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.lsp-structured .lsp-advanced-panel {
	animation: lsp-expand 0.4s ease-out;
}

@keyframes lsp-expand {
	from {
		max-height: 0;
		opacity: 0;
	}
	to {
		max-height: 300px;
		opacity: 1;
	}
}

/* Results Display */
.lsp-search-results {
	margin-top: 2rem;
}

.lsp-results-header {
	margin-bottom: 1.5rem;
}

.lsp-results-header h3 {
	font-size: 1.25rem;
	font-weight: 600;
	color: #23282d;
	margin: 0;
}

.lsp-results-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.lsp-location-card {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lsp-location-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.lsp-card-image {
	width: 100%;
	height: 200px;
	overflow: hidden;
	position: relative;
}

.lsp-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.lsp-location-card:hover .lsp-card-image img {
	transform: scale(1.05);
}

.lsp-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #6c757d;
}

.lsp-card-content {
	padding: 1.5rem;
}

.lsp-card-content h4 {
	margin: 0 0 0.75rem 0;
	font-size: 1.125rem;
	font-weight: 600;
}

.lsp-card-content h4 a {
	color: #23282d;
	text-decoration: none;
}

.lsp-card-content h4 a:hover {
	color: #0073aa;
}

.lsp-card-content p {
	margin: 0 0 1rem 0;
	color: #6c757d;
	font-size: 0.875rem;
	line-height: 1.5;
}

.lsp-card-meta {
	font-size: 0.75rem;
	color: #0073aa;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Pagination */
.lsp-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1rem;
	margin-top: 2rem;
}

.lsp-page-btn {
	padding: 0.75rem 1.5rem;
	background: #0073aa;
	color: white;
	border: none;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.lsp-page-btn:hover {
	background: #005a87;
}

.lsp-page-info {
	color: #6c757d;
	font-weight: 500;
}

/* Loading and Error States */
.lsp-loading,
.lsp-error,
.lsp-no-results {
	text-align: center;
	padding: 3rem 1rem;
	font-size: 1.125rem;
}

.lsp-loading {
	color: #6c757d;
}

.lsp-error {
	color: #dc3545;
	background: #f8d7da;
	border: 1px solid #f5c6cb;
	border-radius: 8px;
}

.lsp-no-results {
	color: #6c757d;
	background: #f8f9fa;
	border-radius: 8px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
	.lsp-structured {
		background: #2d3748;
		color: #e9ecef;
	}
	
	.lsp-structured .lsp-field-label {
		color: #e9ecef;
	}
	
	.lsp-structured .lsp-select,
	.lsp-structured .lsp-text {
		background: #495057;
		color: #e9ecef;
		border-color: #6c757d;
	}
	
	.lsp-structured .lsp-advanced-panel {
		background: #343a40;
		border-color: #6c757d;
	}
	
	.lsp-structured .lsp-advanced-btn {
		background: #495057;
		border-color: #6c757d;
		color: #e9ecef;
	}
	
	.lsp-location-card {
		background: #343a40;
		color: #e9ecef;
	}
	
	.lsp-card-content h4 a {
		color: #e9ecef;
	}
	
	.lsp-card-content h4 a:hover {
		color: #63b3ed;
	}
}