/* EQ Calendar list. Override the custom properties in the theme to restyle. */
.eq-cal {
	--eq-cal-text: #111;
	--eq-cal-muted: #6b6b6b;
	--eq-cal-accent: #f9d548;
	--eq-cal-link: #a3262c;
	--eq-cal-line: #dedede;
	--eq-cal-featured-bg: #fcfaf0;
	--eq-cal-featured-border: #ebe6d3;
	--eq-cal-member-bg: #fffdf2;
	--eq-cal-field-bg: #f7f7f7;
	--eq-cal-field-border: #e2e2e2;
	--eq-cal-font: inherit;
	--eq-cal-heading-font: inherit;
	--eq-cal-column-gap: 48px;

	max-width: 1390px;
	margin: 0 auto;
	container-type: inline-size;
	color: var(--eq-cal-text);
	font-family: var(--eq-cal-font);
}

.eq-cal *,
.eq-cal *::before,
.eq-cal *::after {
	box-sizing: border-box;
}

.eq-cal p:last-of-type {
	margin-bottom: 0px;
}

.eq-cal__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.eq-cal__heading {
	margin: 0 0 48px;
	font-family: var(--eq-cal-heading-font);
	text-align: center;
}

/* Filters ---------------------------------------------------------------- */

.eq-cal__filters {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px clamp(20px, 5vw, 64px);
	max-width: 1240px;
	margin: 0 auto 76px;
}

.eq-cal__search {
	display: flex;
	align-items: center;
}

.eq-cal__filters input[type="search"],
.eq-cal__filters select {
	width: 100%;
	height: 52px;
	margin: 0;
	padding: 0 22px;
	border: 1px solid var(--eq-cal-field-border);
	border-radius: 999px;
	background-color: var(--eq-cal-field-bg);
	color: var(--eq-cal-text);
	font: inherit;
	font-size: 17px;
	box-shadow: none;
}

.eq-cal__filters input[type="search"]::placeholder {
	color: var(--eq-cal-muted);
	opacity: 1;
}

.eq-cal__search button {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	margin-left: 6px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--eq-cal-accent);
	color: #111;
	cursor: pointer;
}

.eq-cal__filters select {
	padding-right: 52px;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M0 0h16L8 10z' fill='%23333'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 22px center;
	background-size: 15px 9px;
	color: var(--eq-cal-muted);
	cursor: pointer;
}

.eq-cal__filters select:has(option:checked:not([value=""])) {
	color: var(--eq-cal-text);
}

.eq-cal__filters input:focus-visible,
.eq-cal__filters select:focus-visible,
.eq-cal__search button:focus-visible {
	outline: 2px solid var(--eq-cal-text);
	outline-offset: 2px;
}

/* List ------------------------------------------------------------------- */

.eq-cal__results {
	transition: opacity 0.15s;
}

.eq-cal.is-loading .eq-cal__results {
	opacity: 0.45;
}

.eq-cal .eq-cal__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: var(--eq-cal-column-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.eq-cal__item {
	display: grid;
	grid-template-columns: 104px minmax(0, 1fr);
	gap: 24px;
	align-items: center;
	margin: 0;
	padding: 24px 20px;
	border-bottom: 1px solid var(--eq-cal-line);
}

/* Events at member venues. Featured styling wins when both apply. */
.eq-cal__item.is-member {
	background: var(--eq-cal-member-bg);
}

.eq-cal__item.is-featured {
	margin-bottom: 16px;
	border: 1px solid var(--eq-cal-featured-border);
	border-radius: 14px;
	background: var(--eq-cal-featured-bg);
}

.eq-cal__date {
	text-align: center;
	line-height: 1.2;
}

.eq-cal__date time {
	display: block;
}

.eq-cal__badge {
	display: inline-block;
	margin-bottom: 6px;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--eq-cal-accent);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.eq-cal__month,
.eq-cal__days,
.eq-cal__year {
	display: block;
}

.eq-cal__month {
	font-size: 14px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.eq-cal__days {
	margin: 2px 0;
	font-size: 32px;
	font-weight: 700;
	line-height: 1.1;
	white-space: nowrap;
}

.eq-cal__year {
	font-size: 17px;
	letter-spacing: 0.04em;
}

.eq-cal__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
}

.eq-cal__cat {
	color: var(--eq-cal-text);
	font-size: 16.5px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.eq-cal__cat:hover {
	color: var(--eq-cal-link);
}

.eq-cal__cat:visited {
	color: var(--eq-cal-text);
}

.eq-cal .eq-cal__title {
	margin: 8px 0 6px;
	font-family: var(--eq-cal-font);
	font-size: 21px;
	font-weight: 700;
	line-height: 1.3;
}

.eq-cal__where,
.eq-cal__contact {
	margin: 0;
	font-size: 16.5px;
	line-height: 1.55;
}

.eq-cal__contact {
	display: flex;
	flex-wrap: wrap;
	gap: 0 18px;
}

.eq-cal__contact a {
	color: var(--eq-cal-link);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.eq-cal__contact a:hover {
	text-decoration-thickness: 2px;
}

.eq-cal__empty {
	margin: 0;
	padding: 48px 0;
	text-align: center;
	font-size: 18px;
}

.eq-cal__empty a {
	color: var(--eq-cal-link);
}

/* Pagination ------------------------------------------------------------- */

.eq-cal__pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 26px;
	margin-top: 48px;
	font-size: 19px;
}

.eq-cal__pagination a {
	color: var(--eq-cal-text);
	text-decoration: none;
}

.eq-cal__pagination a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.eq-cal__pagination [aria-current] {
	font-weight: 700;
}

/* Responsive ------------------------------------------------------------- */

/* Columns and sizes follow the calendar's own width, not the window. */
@container (max-width: 760px) {
	.eq-cal .eq-cal__list {
		grid-template-columns: minmax(0, 1fr);
	}
}

@container (max-width: 520px) {
	.eq-cal__item {
		grid-template-columns: 88px minmax(0, 1fr);
		gap: 18px;
		padding: 22px 16px;
	}

	.eq-cal__badge {
		font-size: 12px;
	}

	.eq-cal__month {
		font-size: 13px;
	}

	.eq-cal__days {
		font-size: 28px;
	}

	.eq-cal__year,
	.eq-cal__cat,
	.eq-cal__where,
	.eq-cal__contact {
		font-size: 16px;
	}

	.eq-cal .eq-cal__title {
		font-size: 20px;
	}
}

@media (max-width: 782px) {
	.eq-cal__filters {
		grid-template-columns: minmax(0, 1fr);
		margin-bottom: 40px;
	}
}
