/**
 * Event Filter Block Styles
 */

.wp-block-mild-event-filter {
	margin-bottom: 2rem;
}

.event-filter-wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.event-filter-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	flex: 1;
}

/* Reset/All Button */
.event-filter-reset-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 1.25rem!important;
	border: 1px solid #f97316!important;
	border-radius: 9999px;
	background-color: transparent;
	color: #240041;
	font-size: 0.875rem!important;
	font-weight: 500!important;
	text-decoration: none;
	transition: all 0.2s ease;
	cursor: pointer;
	white-space: nowrap;
}

.event-filter-reset-button:hover {
	border-color: #f97316;
	color: #f97316;
	background-color: #fff7ed;
}

.event-filter-reset-button.active {
	border-color: #f97316;
	background-color: #f97316;
	color: #240041;
}

/* Term Button (single button layout) */
.event-filter-term-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 1.25rem!important;
	border: 1px solid #f97316!important;
	border-radius: 9999px;
	background-color: transparent;
	color: #240041;
	font-size: 0.875rem!important;
	font-weight: 500!important;
	text-decoration: none;
	transition: all 0.2s ease;
	cursor: pointer;
	white-space: nowrap;
}

.event-filter-term-button:hover {
	border-color: #f97316;
	color: #f97316;
	background-color: #fff7ed;
}

.event-filter-term-button.active {
	border-color: #f97316;
	background-color: #f97316;
	color: #240041;
}

/* Dropdown Container */
.event-filter-dropdown {
	position: relative;
	display: inline-block;
}

/* Dropdown Button */
.event-filter-dropdown-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	padding: 0.65rem 1.25rem!important;
	border: 1px solid #f97316!important;
	border-radius: 9999px;
	background-color: transparent;
	color: #240041;
	font-size: 0.875rem!important;
	font-weight: 500!important;
	text-decoration: none;
	transition: all 0.2s ease;
	cursor: pointer;
	white-space: nowrap;
}

.event-filter-dropdown-button:hover {
	background-color: #f97316;
}

.event-filter-dropdown-button.active {
	border-color: #f97316;
	background-color: #f97316;
	color: #240041;
}

.event-filter-dropdown-button svg {
	width: 1rem;
	height: 1rem;
	transition: transform 0.2s ease;
}

/* Dropdown Menu */
.event-filter-dropdown-menu {
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 0.5rem;
	min-width: 200px;
	background-color: white;
	border: 1px solid #e5e7eb;
	border-radius: 0.5rem;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	z-index: 50;
	max-height: 300px;
	overflow-y: auto;
}

/* Dropdown Item */
.event-filter-dropdown-item {
	display: block;
	width: 100%;
	padding: 0.75rem 1rem;
	text-align: left;
	font-size: 0.875rem;
	color: #240041;
	background-color: transparent;
	border: none;
	cursor: pointer;
	transition: background-color 0.15s ease;
	white-space: nowrap;
}

.event-filter-dropdown-item:hover {
	background-color: #f3f4f6;
	color: #f97316;
}

.event-filter-dropdown-item.selected {
	background-color: #fff7ed;
	color: #f97316;
	font-weight: 600;
}

.event-filter-dropdown-item:first-child {
	border-top-left-radius: 0.5rem;
	border-top-right-radius: 0.5rem;
}

.event-filter-dropdown-item:last-child {
	border-bottom-left-radius: 0.5rem;
	border-bottom-right-radius: 0.5rem;
}

/* Count Display */
.event-filter-count {
	display: flex;
	align-items: center;
	white-space: nowrap;
	font-size: 0.875rem;
	color: #6b7280;
}

.event-filter-count .count-number {
	font-weight: 600;
	color: #111827;
	margin-right: 0.25rem;
}

/* Loading State */
.event-filter-wrapper.loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
	.event-filter-wrapper {
		flex-direction: column;
		align-items: flex-start;
	}

	.event-filter-count {
		width: 100%;
		justify-content: flex-end;
	}

	.event-filter-dropdown-menu {
		left: 0;
		right: auto;
	}
}

/* Alpine.js transitions */
[x-cloak] {
	display: none !important;
}
