/**
 * Stili per i filtri cascading eventi ADIPA
 */

.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;
}

.skip-filters {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.skip-filters:focus,
.skip-filters:focus-visible {
	left: 15px;
	top: 15px;
	width: auto;
	height: auto;
	padding: 10px 16px;
	background: #0073aa;
	color: #fff;
	text-decoration: none;
	z-index: 1000;
	border-radius: 4px;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.25);
}

.adipa-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: flex-end;
	margin-bottom: 30px;
	padding: 20px;
	background: #f8f9fa;
	border-radius: 8px;
	border: 1px solid #e0e0e0;
	max-width: 100%;
	overflow-x: hidden;
}

.adipa-filters__group {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
	min-width: 200px;
}

.adipa-filters__group label {
	font-weight: 600;
	font-size: 14px;
	color: #333;
	margin: 0;
}

.adipa-filters__group select {
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background-color: #fff;
	font-size: 14px;
	color: #333;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.adipa-filters__group select:hover {
	border-color: #999;
}

.adipa-filters__group select:focus,
.adipa-filters__group select:focus-visible {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.adipa-filters__group select:disabled {
	background-color: #f5f5f5;
	cursor: not-allowed;
	opacity: 0.6;
}

.adipa-filters__actions {
	display: flex;
	align-items: flex-end;
}

.adipa-filters__actions button {
	padding: 10px 24px;
	background-color: #0073aa;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.1s ease;
	white-space: nowrap;
}

.adipa-filters__actions button:hover {
	background-color: #005a87;
}

.adipa-filters__actions button:active {
	transform: translateY(1px);
}

.adipa-filters__actions button:focus,
.adipa-filters__actions button:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.3);
}

/* Loading state per i select */
.adipa-filters__group select.loading {
	background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 50 50"%3E%3Cpath fill="%23999" d="M25 5A20.14 20.14 0 0 1 45 22.88a2.51 2.51 0 0 0 2.49 2.26h0A2.52 2.52 0 0 0 50 22.33a25.14 25.14 0 0 0-50 0 2.52 2.52 0 0 0 2.5 2.81h0a2.51 2.51 0 0 0 2.49-2.26A20.14 20.14 0 0 1 25 5Z"%3E%3CanimateTransform attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite"/%3E%3C/path%3E%3C/svg%3E');
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 16px 16px;
	padding-right: 35px;
}

/* Responsive */
@media (max-width: 768px) {
	.adipa-filters {
		flex-direction: column;
		gap: 16px;
		padding: 16px;
	}
	
	.adipa-filters__group {
		width: 100%;
		min-width: auto;
	}

	.adipa-filters__group select {
		min-height: 44px;
		font-size: 16px;
		padding: 12px 16px;
	}
	
	.adipa-filters__actions {
		width: 100%;
	}
	
	.adipa-filters__actions button {
		min-height: 44px;
		padding: 12px 32px;
		font-size: 16px;
		width: 100%;
	}
}

/* Stile alternativo più compatto */
@media (min-width: 769px) and (max-width: 1024px) {
	.adipa-filters {
		gap: 15px;
		padding: 15px;
	}
	
	.adipa-filters__group {
		min-width: 180px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.adipa-filters__group select,
	.adipa-filters__actions button {
		transition: none;
	}

	.adipa-filters__group select.loading {
		background-image: none;
	}
}

.adipa-filters--reduced-motion .adipa-filters__group select.loading {
	background-image: none;
}
