/* Trailview Planning Center Events. Colours follow the Trailview design guide; change them in the widget's Style tab. */

.tvpce {
	--tvpce-accent: #660011;
	--tvpce-title: #2B2523;
	--tvpce-text: #2B2523;
	--tvpce-muted: #6B6563;
	--tvpce-rule: #E2DFDB;
	--tvpce-tile: #F0EFEC;
	--tvpce-btn: #660011;
	--tvpce-btn-hover: #3D0009;
	--tvpce-btn-text: #FFFFFF;
	--tvpce-link: #1F5FCC;
	--tvpce-focus: #1F5FCC;
	display: flex;
	flex-direction: column;
	gap: 40px;
}
.tvpce *,
.tvpce *::before,
.tvpce *::after { box-sizing: border-box; }
.tvpce :focus-visible { outline: 3px solid var(--tvpce-focus); outline-offset: 2px; }
.tvpce .screen-reader-text {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Month */
.tvpce .tvpce-month__title {
	margin: 0 0 8px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--tvpce-accent);
	color: var(--tvpce-accent);
	font-size: 26px;
	font-weight: 600;
	line-height: 1.25;
}
.tvpce .tvpce-list { list-style: none; margin: 0; padding: 0; }

/* Event row: date tile | text | picture */
.tvpce .tvpce-event {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 20px;
	align-items: start;
	margin: 0;
	padding: 24px 0;
	border-bottom: 1px solid var(--tvpce-rule);
}
.tvpce .tvpce-event.has-image { grid-template-columns: 72px minmax(0, 1fr) 200px; }
.tvpce .tvpce-list > .tvpce-event:last-child { border-bottom: 0; padding-bottom: 0; }

.tvpce .tvpce-date {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 10px 4px;
	border-radius: 12px;
	background: var(--tvpce-tile);
	line-height: 1;
	text-align: center;
}
.tvpce .tvpce-date__wd,
.tvpce .tvpce-date__mon {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--tvpce-muted);
}
.tvpce .tvpce-date__day {
	margin: 4px 0;
	font-size: 34px;
	font-weight: 600;
	color: var(--tvpce-accent);
}

.tvpce .tvpce-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tvpce .tvpce-body > * { margin: 0; }
.tvpce .tvpce-title { font-size: 21px; font-weight: 600; line-height: 1.3; color: var(--tvpce-title); }
.tvpce a.tvpce-link { color: var(--tvpce-title); text-decoration: none; }
.tvpce a.tvpce-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.tvpce .tvpce-when { font-size: 16px; color: var(--tvpce-muted); }
.tvpce .tvpce-repeat { font-size: 15px; font-style: italic; color: var(--tvpce-muted); }
.tvpce .tvpce-desc { font-size: 16px; line-height: 1.6; color: var(--tvpce-text); margin-top: 4px; }

.tvpce .tvpce-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	margin-top: 10px;
}
.tvpce a.tvpce-button {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 10px 20px;
	border-radius: 8px;
	background: var(--tvpce-btn);
	color: var(--tvpce-btn-text);
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	line-height: 1.2;
}
.tvpce a.tvpce-button:hover { background: var(--tvpce-btn-hover); color: var(--tvpce-btn-text); text-decoration: none; }
.tvpce a.tvpce-more {
	color: var(--tvpce-link);
	font-size: 16px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.tvpce .tvpce-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 12px;
}

.tvpce-empty { margin: 0; color: #6B6563; }
.tvpce-note {
	padding: 16px 20px;
	border: 2px dashed #A6A09E;
	border-radius: 8px;
	color: #6B6563;
	font-size: 15px;
	background: #F0EFEC;
}

/* Phones: picture across the top, date tile beside the text */
@media (max-width: 767px) {
	.tvpce .tvpce-event,
	.tvpce .tvpce-event.has-image { grid-template-columns: 60px minmax(0, 1fr); gap: 16px; }
	.tvpce .tvpce-image { grid-column: 1 / -1; grid-row: 1; }
	.tvpce .tvpce-date__day { font-size: 28px; }
	.tvpce .tvpce-title { font-size: 19px; }
	.tvpce .tvpce-month__title { font-size: 22px; }
}
