/**
 * View By Filter - Frontend styles
 *
 * @package View_By_Filter
 */

.vbf-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 1.25rem;
	margin-bottom: 1.5rem;
	position: relative;
}

.vbf-loop-grid--syncing .elementor-loop-container {
	opacity: 0.45;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.vbf-filter__field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-width: 200px;
}

.vbf-filter__label {
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.4;
}

.vbf-filter__select {
	appearance: none;
	background-color: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	color: #1d2327;
	font-size: 0.95rem;
	line-height: 1.4;
	min-height: 40px;
	padding: 0.45rem 2rem 0.45rem 0.75rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23505560' d='M1.41.59 6 5.17 10.59.59 12 2l-6 6-6-6z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 12px 8px;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vbf-filter__select:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

.vbf-filter__select:disabled {
	background-color: #f6f7f7;
	cursor: not-allowed;
	opacity: 0.7;
}

.vbf-filter.is-loading .vbf-filter__select {
	opacity: 0.65;
}

.vbf-filter__spinner {
	display: flex;
	align-items: center;
	min-height: 40px;
}

.vbf-filter__spinner[hidden] {
	display: none !important;
}

.vbf-filter__spinner-icon {
	display: inline-block;
	width: 22px;
	height: 22px;
	border: 2px solid rgba(34, 113, 177, 0.2);
	border-top-color: #2271b1;
	border-radius: 50%;
	animation: vbf-spin 0.7s linear infinite;
}

.vbf-no-results-message {
	padding: 2rem 1rem;
	text-align: center;
	font-size: 1rem;
	color: #50575e;
	background: #f6f7f7;
	border: 1px dashed #c3c4c7;
	border-radius: 4px;
	width: 100%;
}

.vbf-filter--disabled {
	padding: 1rem;
	background: #fff8e5;
	border: 1px solid #f0c0a0;
	border-radius: 4px;
	color: #6d4c00;
}

@keyframes vbf-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 600px) {
	.vbf-filter {
		flex-direction: column;
		align-items: stretch;
	}

	.vbf-filter__field {
		min-width: 100%;
	}
}
