/* WPTribe Events — frontend styles. Intentionally minimal and theme-agnostic. */

.wpt-events { margin: 1.5rem 0; }

.wpt-events-header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}
.wpt-events-title { margin: 0; }

/* View switcher */
.wpt-view-switcher { display: flex; gap: .25rem; }
.wpt-view-tab {
	padding: .35em .8em;
	border: 1px solid currentColor;
	border-radius: 4px;
	text-decoration: none;
	font-size: .9rem;
	opacity: .75;
}
.wpt-view-tab.is-active { opacity: 1; font-weight: 600; }

/* Filter bar */
.wpt-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-bottom: 1.25rem;
}
.wpt-filter-bar select { max-width: 100%; }

/* Period nav */
.wpt-period-nav {
	display: flex;
	justify-content: space-between;
	margin-bottom: 1rem;
}

/* Event list / cards */
.wpt-event-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.25rem;
}
/* Upcoming Events block honors its chosen column count. */
.wpt-block-upcoming .wpt-event-list {
	grid-template-columns: repeat(var(--wpt-cols, 3), minmax(0, 1fr));
}

.wpt-event-card {
	display: flex;
	flex-direction: column;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 8px;
	overflow: hidden;
	background: rgba(0, 0, 0, .015);
}
.wpt-event-card.is-cancelled { opacity: .6; }
.wpt-event-thumb img { display: block; width: 100%; height: auto; object-fit: cover; }
.wpt-event-body { padding: 1rem; }
.wpt-event-title { margin: 0 0 .35rem; font-size: 1.15rem; }
.wpt-event-date { margin: 0 0 .35rem; font-weight: 600; }
.wpt-event-venue,
.wpt-event-cost { margin: 0 0 .35rem; font-size: .92rem; opacity: .85; }
.wpt-event-excerpt { font-size: .92rem; }

.wpt-cancelled-tag {
	display: inline-block;
	padding: .05em .5em;
	border-radius: 3px;
	background: #c0392b;
	color: #fff;
	font-size: .7em;
	text-transform: uppercase;
	letter-spacing: .03em;
	vertical-align: middle;
}

.wpt-no-events { padding: 1.5rem 0; font-style: italic; opacity: .8; }

/* Calendar grid */
.wpt-calendar { width: 100%; border-collapse: collapse; table-layout: fixed; }
.wpt-calendar th {
	padding: .5rem;
	text-align: center;
	font-size: .8rem;
	text-transform: uppercase;
	letter-spacing: .03em;
	border: 1px solid rgba(0, 0, 0, .12);
}
.wpt-cal-cell {
	height: 7.5rem;
	vertical-align: top;
	padding: .25rem;
	border: 1px solid rgba(0, 0, 0, .12);
	overflow: hidden;
}
.wpt-cal-cell.is-empty { background: rgba(0, 0, 0, .03); }
.wpt-cal-cell.is-today { outline: 2px solid #2271b1; outline-offset: -2px; }
.wpt-cal-daynum { display: inline-block; margin-bottom: .25rem; font-weight: 600; text-decoration: none; }
.wpt-cal-events { list-style: none; margin: 0; padding: 0; }
.wpt-cal-event { margin: 0 0 2px; font-size: .78rem; line-height: 1.25; }
.wpt-cal-event a { text-decoration: none; display: block; }
.wpt-cal-event.is-cancelled { text-decoration: line-through; opacity: .6; }
.wpt-cal-time { font-weight: 600; margin-right: .25em; }

/* Maps */
.wpt-map { width: 100%; height: 320px; margin: 1rem 0; background: rgba(0, 0, 0, .05); }

/* Single views */
.wpt-single-meta { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 1.25rem 0; }
.wpt-single-meta dt { font-weight: 600; }
.wpt-single-meta dd { margin: 0; }
.wpt-occurrence-list ul { list-style: none; padding: 0; }
.wpt-occurrence-list li { padding: .3rem 0; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.wpt-occurrence-list li.is-cancelled { text-decoration: line-through; opacity: .6; }

@media (max-width: 640px) {
	.wpt-cal-cell { height: auto; min-height: 4rem; }
	.wpt-cal-event .wpt-cal-name { display: none; }
	.wpt-cal-event a::after { content: "•"; }
}
