/**
 * OKS calendar: spacious month grid and a stacked event list.
 * Only existing legacy-calendar containers are styled. Native TEC markup,
 * breakpoints, links, view switching and AJAX remain in charge of behavior.
 */

body.oks-calendar-landing-page .site-content .ast-container {
	max-width: 1440px;
}

body.oks-calendar-landing-page article.page .entry-content {
	padding: clamp(20px, 3vw, 44px) !important;
	background: #FAF9F7 !important;
	box-shadow: none !important;
}

body.oks-legacy-divi .oks-legacy-calendar {
	--tec-color-text-primary: #212121;
	--tec-color-text-secondary: #686868;
	--tec-color-accent-primary: #B30000;
	--tec-color-background: #FFFFFF;
	--tec-color-border-default: #E2DFDA;
	--tec-color-border-secondary: #E2DFDA;
	--tec-color-day-marker-current-month: #212121;
	--tec-color-day-marker-past-month: #77736D;
	--tec-color-day-marker-current-month-hover: #B30000;
	--tec-color-day-marker-current-month-hover-background: #F4F1ED;
	--tec-color-day-marker-current-month-selected-background: #B30000;
	--tec-color-day-marker-current-month-selected: #FFFFFF;
	color: #212121;
	font-family: "Roboto", Arial, sans-serif;
	color-scheme: light;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-common-l-container {
	padding-inline: 0 !important;
	max-width: none !important;
}

/* Search and view controls retain TEC's own responsive layout. */
body.oks-legacy-divi .oks-legacy-calendar .tribe-events-c-events-bar {
	background: #FFFFFF !important;
	border: 1px solid #E2DFDA !important;
	border-radius: 6px;
	box-shadow: none !important;
	margin-bottom: 28px !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-c-events-bar__search-container,
body.oks-legacy-divi .oks-legacy-calendar .tribe-events-c-events-bar__views {
	background: #FFFFFF !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-c-search__input {
	color: #212121 !important;
	background: transparent !important;
	font-family: "Roboto", Arial, sans-serif !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-c-search__button {
	background: #B30000 !important;
	border-color: #B30000 !important;
	border-radius: 5px !important;
	color: #FFFFFF !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-c-top-bar {
	margin-bottom: 28px !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-c-top-bar__datepicker-button {
	color: #212121 !important;
	font-family: "Playfair Display", Georgia, serif !important;
	font-size: clamp(22px, 2.4vw, 32px) !important;
	line-height: 1.25;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-c-top-bar__today-button {
	color: #212121 !important;
	background: #FFFFFF !important;
	border-color: #D8D4CE !important;
	border-radius: 5px !important;
}

/* Month: fine grid lines, breathing room, restrained red event markers. */
body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-month {
	background: #FFFFFF;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-month__header-column {
	padding-block: 16px !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-month__header-column-title {
	color: #686868 !important;
	font-family: "Roboto", Arial, sans-serif !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	letter-spacing: .08em;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-month__day {
	background: #FFFFFF !important;
	border-color: #E2DFDA !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-month__day--past {
	background: #FBFAF8 !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-month__day-date {
	margin: 0 !important;
	padding: 12px !important;
	font-family: "Roboto", Arial, sans-serif !important;
	font-size: 14px !important;
	font-weight: 500 !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-month__day-date-link {
	color: #212121 !important;
	text-decoration: none !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-month__day--other-month .tribe-events-calendar-month__day-date,
body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-month__day--other-month .tribe-events-calendar-month__day-date-link {
	color: #8B877F !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-month__day--current .tribe-events-calendar-month__day-date-link {
	color: #B30000 !important;
	font-weight: 700 !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-month__calendar-event {
	margin: 0 8px 8px !important;
	padding: 9px 10px !important;
	background: #F4F1ED !important;
	border: 0 !important;
	border-left: 3px solid #B30000 !important;
	border-radius: 3px;
}

/* Grid events stay compact; their native popovers can still show photos. */
body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-month__calendar-event-featured-image-wrapper {
	display: none !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-month__calendar-event-title,
body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-month__calendar-event-title a {
	margin: 0 !important;
	color: #212121 !important;
	font-family: "Roboto", Arial, sans-serif !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1.35 !important;
	text-decoration: none !important;
	overflow-wrap: anywhere;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-month__calendar-event-datetime {
	color: #686868 !important;
	font-size: 11px !important;
	line-height: 1.4 !important;
}

/* List: events stacked under each other. Date to the left, text in the
   middle, a small photo to the right only when the event has one. */
body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list {
	display: block !important;
	max-width: 1040px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__month-separator {
	display: flex !important;
	align-items: center;
	gap: 20px;
	margin: 40px 0 4px !important;
	padding: 0 !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__month-separator:first-child {
	margin-top: 0 !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__month-separator::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: #E2DFDA;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__month-separator-text {
	flex: 0 0 auto;
	color: #212121 !important;
	font-family: "Playfair Display", Georgia, serif !important;
	font-size: 26px !important;
	font-weight: 500 !important;
	text-transform: lowercase;
}

/* Hide TEC's own separator line; ::after draws ours. */
body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__month-separator::before {
	display: none !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-row {
	display: flex !important;
	align-items: flex-start;
	gap: clamp(16px, 3vw, 36px);
	width: auto !important;
	min-width: 0;
	margin: 0 !important;
	padding: 28px 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-bottom: 1px solid #E2DFDA !important;
	border-radius: 0;
	box-shadow: none;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-row:last-child {
	border-bottom: 0 !important;
}

/* Date column: weekday small, day number large in Playfair red. */
body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-date-tag {
	position: static;
	flex: 0 0 64px;
	width: 64px !important;
	max-width: 64px !important;
	margin: 0 !important;
	padding: 2px 0 0 !important;
	background: transparent !important;
	border: 0;
	text-align: center;
	box-shadow: none;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-date-tag-datetime {
	display: flex !important;
	flex-direction: column;
	align-items: center;
	padding: 0 !important;
	border: 0 !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-date-tag-weekday {
	color: #686868 !important;
	font-family: "Roboto", Arial, sans-serif !important;
	font-size: 12px !important;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-date-tag-daynum {
	color: #B30000 !important;
	font-family: "Playfair Display", Georgia, serif !important;
	font-size: 38px !important;
	font-weight: 500 !important;
	line-height: 1.05 !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-wrapper {
	flex: 1 1 auto;
	width: auto !important;
	min-width: 0;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event {
	display: flex !important;
	flex-direction: row;
	align-items: flex-start;
	justify-content: space-between;
	gap: clamp(16px, 3vw, 32px);
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
}

/* Photo (only if the event has one) as a small thumbnail on the right. */
body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-featured-image-wrapper {
	display: block !important;
	order: 2;
	flex: 0 0 240px;
	width: 240px !important;
	max-width: 240px !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 6px;
	overflow: hidden;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-featured-image-link {
	display: block;
	text-decoration: none !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-featured-image {
	display: block !important;
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: 0 !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-details {
	flex: 1 1 auto;
	width: auto !important;
	min-width: 0;
	max-width: 680px !important;
	margin: 0 !important;
	padding: 0 !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-header {
	display: flex;
	flex-direction: column;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-datetime-wrapper {
	order: -1;
	margin: 0 0 6px !important;
	color: #B30000 !important;
	font-family: "Roboto", Arial, sans-serif !important;
	font-size: 14px !important;
	font-weight: 500;
	line-height: 1.5 !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-datetime-wrapper a {
	color: #660000 !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-title,
body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-title a {
	margin: 0 !important;
	color: #212121 !important;
	font-family: "Playfair Display", Georgia, serif !important;
	font-size: clamp(22px, 2.2vw, 28px) !important;
	font-weight: 500 !important;
	line-height: 1.25 !important;
	text-decoration: none !important;
	overflow-wrap: anywhere;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-venue {
	margin: 8px 0 0 !important;
	color: #686868 !important;
	font-style: normal !important;
	font-family: "Roboto", Arial, sans-serif !important;
	font-size: 14px !important;
	line-height: 1.5 !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-venue-title {
	color: #212121 !important;
	font-weight: 600 !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-description {
	margin: 10px 0 0 !important;
	color: #212121 !important;
	font-family: "Roboto", Arial, sans-serif !important;
	font-size: 15px !important;
	line-height: 1.6 !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-description p {
	margin: 0 !important;
	font-size: inherit !important;
	line-height: inherit !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-cost {
	margin: 10px 0 0 !important;
	font-size: 14px !important;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-title a:hover,
body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-month__calendar-event-title a:hover {
	color: #B30000 !important;
}

body.oks-legacy-divi .oks-legacy-calendar a:focus-visible,
body.oks-legacy-divi .oks-legacy-calendar button:focus-visible {
	outline: 2px solid #B30000;
	outline-offset: 4px;
}

body.oks-legacy-divi .oks-legacy-calendar .tribe-events-c-nav {
	margin-top: 30px !important;
}

/* Keep native month mobile day buttons/dots/list; don't force a desktop grid. */
@media (min-width: 768px) {
	body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-month__day-cell {
		min-height: 144px !important;
	}
}

@media (max-width: 1100px) {
	body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-featured-image-wrapper {
		flex-basis: 180px;
		width: 180px !important;
		max-width: 180px !important;
	}
}

@media (max-width: 700px) {
	body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-row {
		gap: 14px;
		padding: 22px 0 !important;
	}

	body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-date-tag {
		flex-basis: 44px;
		width: 44px !important;
		max-width: 44px !important;
	}

	body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-date-tag-weekday {
		font-size: 11px !important;
	}

	body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-date-tag-daynum {
		font-size: 30px !important;
	}

	/* Photo goes above the text on phones. */
	body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event {
		flex-direction: column;
		gap: 12px;
	}

	body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-featured-image-wrapper {
		order: 0;
		flex-basis: auto;
		width: 100% !important;
		max-width: 100% !important;
	}

	body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__month-separator-text {
		font-size: 22px !important;
	}

	body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-month__day-date {
		padding: 8px 4px !important;
	}
}

/* Featured events: TEC's blue marker becomes OKS red. */
body.oks-legacy-divi .oks-legacy-calendar .tribe-events-calendar-list__event-row--featured .tribe-events-calendar-list__event-date-tag-datetime::after {
	background-color: #B30000 !important;
}
