/* Calendar² filter panel and chips: loaded only where the panel shows (its layout isn't none). */

/* A native <details> drawer, the theme's type and colours; controls stay the browser's own. */

.c2-filters {
	margin-bottom: var(--c2-gap);
	border: 1px solid var(--c2-border);
	border-radius: var(--c2-radius);
}

.c2-filters__toggle {
	padding: 0.5rem 0.75rem;
	cursor: pointer;
	font-weight: 600;
}

.c2-filters__panel {
	display: flex;
	flex-wrap: wrap;
	gap: var(--c2-gap);
	padding: 0 0.75rem 0.75rem;
}

.c2-filters__group {
	flex: 1 1 12rem;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.c2-filters__legend {
	margin-bottom: 0.25rem;
	padding: 0;
	font-weight: 600;
}

.c2-filters__options {
	margin: 0;
	padding: 0;
	list-style: none;
}

.c2-filters__child {
	padding-inline-start: 1.25rem;
}

.c2-filters select {
	width: 100%;
	max-width: 100%;
}

.c2-filters__more > summary,
.c2-filters__hint,
.c2-chips__count {
	color: var(--c2-muted);
	font-size: var(--c2-text-sm);
}

.c2-filters__more > summary {
	cursor: pointer;
}

.c2-filters__hint {
	margin: 0.25rem 0 0;
}

.c2-filters__actions {
	flex-basis: 100%;
	margin: 0;
}

.c2-chips__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 var(--c2-gap);
	padding: 0;
	list-style: none;
}

.c2-chips__count {
	margin: 0 0 0.5rem;
}

.c2-chip {
	display: inline-block;
	padding: 0.125rem 0.625rem;
	border: 1px solid var(--c2-border);
	border-radius: 999px;
	color: inherit;
	text-decoration: none;
}

/* Sidebar layout. Below 48em the sidebar is the drawer. */

@media (min-width: 48em) {
	.c2-calendar__layout {
		display: grid;
		grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
		gap: var(--c2-gap-lg);
		align-items: start;
	}

	.c2-filters--sidebar > .c2-filters__toggle {
		display: none;
	}

	.c2-filters--sidebar .c2-filters__panel {
		flex-direction: column;
		padding-top: 0.75rem;
	}

	.c2-filters--sidebar .c2-filters__group {
		flex: none;
	}
}
