/**
 * Elementor Loop Grid AJAX Search - Frontend Styles
 *
 * @package Elementor_Loop_Grid_Ajax_Search
 */

/* Main Search Filter Wrapper */
.elgas-search-filter-wrapper {
	position: relative;
	width: 100%;
}

/* Search Container */
.elgas-search-container {
	position: relative;
	display: flex;
	align-items: center;
}

/* Search Input */
.elgas-search-input {
	width: 100%;
	border: 1px solid #ddd;
	padding: 12px 15px;
	font-size: 16px;
	line-height: 1.5;
	transition: all 0.3s ease;
	box-sizing: border-box;
}

.elgas-search-input:focus {
	outline: none;
	border-color: transparent;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.elgas-search-input::placeholder {
	color: #999;
	opacity: 1;
}

/* Loading Spinner */
.elgas-spinner {
	position: absolute;
	right: 15px;
	width: 20px;
	height: 20px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid #E93137;
	border-radius: 50%;
	animation: elgas-spin 1s linear infinite;
	display: none;
}

.elgas-search-filter-wrapper.elgas-searching .elgas-spinner {
	display: block;
}

@keyframes elgas-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* No Results Message */
.elgas-no-results {
	margin-top: 15px;
	padding: 15px;
	background-color: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 4px;
	color: #6c757d;
	text-align: center;
	font-size: 14px;
	display: none;
}

/* Search Results Styles */
.elgas-visible {
	display: block !important;
}

/* Responsive Design */
@media (max-width: 768px) {
	.elgas-search-input {
		font-size: 16px; /* Prevents zoom on iOS */
		padding: 10px 12px;
	}

	.elgas-spinner {
		right: 12px;
		width: 18px;
		height: 18px;
		border-width: 2px;
	}
}

/* Accessibility Improvements */
.elgas-search-input:focus-visible {
	outline: 2px solid #E93137;
	outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
	.elgas-search-input {
		border-width: 2px;
	}

	.elgas-spinner {
		border-width: 4px;
	}
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
	.elgas-spinner {
		animation: none;
	}

	.elgas-search-input {
		transition: none;
	}
}

