/**
 * Minimal baseline for [events_list] / .custom-event-listing.
 * Add theme or site CSS to build out layout and presentation.
 */

.custom-event-listing,
.custom-event-listing__items {
	display: block;
	margin: 0;
	padding: 0;
}

.custom-event-listing .event-item {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 0.75rem;
	margin: 0 0 20px;
	padding: 0;
	box-sizing: border-box;
}

.custom-event-listing .event-item:last-child {
	margin-bottom: 0;
}

.custom-event-listing .event-image {
	flex: 0 0 auto;
	width: 75px;
	margin: 0;
	padding: 0;
	line-height: 0;
	overflow: hidden;
}

.custom-event-listing .event-image a {
	display: block;
	line-height: 0;
}

.custom-event-listing .event-image img {
	display: block;
	width: 75px;
	height: 75px;
	max-width: 75px;
	max-height: 75px;
	object-fit: cover;
	margin: 0;
}

.custom-event-listing .event-content {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.custom-event-listing .event-title-text,
.custom-event-listing .event-date-text {
	display: block;
	margin: 0;
	padding: 0;
}

.custom-event-listing .event-title-text + .event-date-text {
	margin-top: 0.15rem;
}

.custom-event-listing .event-image:empty,
.custom-event-listing .event-image a:empty {
	display: none;
}

/* Multi-column grid via columns="2|3|4" on [events_list]. */
.custom-event-listing--cols-2 .custom-event-listing__items,
.custom-event-listing--cols-3 .custom-event-listing__items,
.custom-event-listing--cols-4 .custom-event-listing__items {
	display: grid;
	gap: 1.25rem;
	align-items: start;
}

.custom-event-listing--cols-2 .custom-event-listing__items {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.custom-event-listing--cols-3 .custom-event-listing__items {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.custom-event-listing--cols-4 .custom-event-listing__items {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.custom-event-listing--cols-2 .event-item,
.custom-event-listing--cols-3 .event-item,
.custom-event-listing--cols-4 .event-item {
	margin-bottom: 0;
}

@media (max-width: 640px) {
	.custom-event-listing--cols-2 .custom-event-listing__items,
	.custom-event-listing--cols-3 .custom-event-listing__items,
	.custom-event-listing--cols-4 .custom-event-listing__items {
		grid-template-columns: 1fr;
	}
}
