/* The Events Calendar keeps its rendering and controls inside the shared shell. */
.tl-event-main,
.tl-calendar-main,
body:has(.tl-calendar-main) .tribe-events-tooltip-theme {
	--tec-font-family-base: Arial, Helvetica, sans-serif;
	--tec-font-family-sans-serif: Arial, Helvetica, sans-serif;
	--tec-color-text-primary: #424242;
	--tec-color-text-secondary: #666;
	--tec-color-text-events-title: #424242;
	--tec-color-text-event-title: #424242;
	--tec-color-text-event-title-list: #424242;
	--tec-color-text-event-date: #666;
	--tec-color-accent-primary: #925a00;
	--tec-color-accent-primary-hover: #6f4400;
	--tec-color-accent-primary-active: #6f4400;
	--tec-color-accent-primary-background: #f8ecd0;
	--tec-color-accent-secondary: #535353;
	--tec-color-link-primary: #925a00;
	--tec-color-link-accent: #925a00;
	--tec-color-link-accent-hover: #6f4400;
	--tec-color-button-primary: #925a00;
	--tec-color-button-primary-background: #535353;
	--tec-color-button-primary-hover: #424242;
	--tec-color-button-primary-active: #424242;
	--tec-color-background-events-bar-submit-button: #535353;
	--tec-color-background-events-bar-submit-button-hover: #424242;
	--tec-color-background-events-bar-submit-button-active: #424242;
	--tec-color-text-events-bar-submit-button: #fff;
	--tec-color-text-events-bar-submit-button-hover: #fff;
	--tec-color-text-events-bar-submit-button-active: #fff;
	--tec-color-background-primary-multiday: #f8ecd0;
	--tec-color-background-primary-multiday-hover: #f1ddb4;
	--tec-color-text-events-title-month-multiday: #424242;
	--tec-color-background-messages: #f5f5f3;
	--tec-color-background-subscribe-list-item-hover: #f5f5f3;
	--tec-color-background-view-selector-list-item-hover: #f5f5f3;
	--tec-color-text-view-selector-list-item-hover: #424242;
	--tec-color-accent-primary-background-datepicker: #f8ecd0;
	--tec-color-background-secondary-datepicker: #f5f5f3;
	--tec-color-border-default: #ccc;
	--tec-color-border-secondary: #ddd;
	--tec-outline-color-default: #005fcc;
}

/* The calendar gets the existing wide measure; event prose stays at 60rem. */
.tl-calendar-main {
	--wp--style--global--content-size: 68rem;
	--wp--style--global--wide-size: 68rem;
	padding-block: clamp(1.5rem, 3vw, 2.5rem);
}
.tl-calendar-main .tribe-events {
	width: 100%;
	max-width: 68rem;
	margin-inline: auto;
}
.tl-shell .tl-calendar-main .tribe-events .tribe-events-l-container {
	width: 100%;
	max-width: none;
	min-height: 0;
	padding: 0;
}
/* Native calendar heading/paragraph spacing must not inherit article margins. */
.tl-calendar-main .tribe-events :is(h1, h2, h3, h4, h5, h6) {
	margin: 0;
	letter-spacing: normal;
}
.tl-calendar-main .tribe-events h1::after { content: none; }
.tl-calendar-main .tribe-events p { margin-block: 0; }
.tl-calendar-main .tribe-events :is(button, input, select) { font-family: Arial, Helvetica, sans-serif; }
.tl-calendar-main .tribe-events :is(.tribe-common-c-btn, .tribe-common-c-btn-border, .tribe-events-c-search__button) {
	min-height: 2.75rem;
	border-radius: 0;
}
.tl-calendar-main .tribe-events .tribe-events-c-search__button {
	background: #535353;
	color: #fff;
}
.tl-calendar-main .tribe-events .tribe-events-c-search__button:hover { background: #424242; }
.tl-calendar-main .tribe-events :is(a, button, input, select):focus-visible,
.tl-event-main :is(a, button, input, select):focus-visible {
	outline: 2px solid #005fcc;
	outline-offset: 2px;
}

/* Legacy and Gutenberg single-event renderers share the same readable boundary. */
.tl-event-main #tribe-events-pg-template {
	max-width: 60rem;
	margin-inline: auto;
	padding: 0;
}
.tl-event-main .tribe-events-single-event-title {
	margin-block: 0 1.5rem;
	color: #424242;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: 700;
	line-height: 1.25;
}
.tl-event-main .tribe-events-schedule { margin-block: 0 1.5rem; }
.tl-event-main .tribe-events-schedule :is(h2, h3) {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 400;
	line-height: 1.65;
}
.tl-event-main .tribe-events-schedule .tribe-events-cost {
	display: inline-block;
	margin-inline-start: .75rem;
}
.tl-event-main :is(.tribe-events-event-image, .tribe-block__event-image) { margin-block: 1.5rem; }
.tl-event-main :is(.tribe-events-event-image, .tribe-block__event-image) img {
	display: block;
	max-width: 100%;
	height: auto;
}
.tl-event-main :is(.tribe-events-meta-group, .tribe-block__organizer, .tribe-block__venue) {
	font-size: 1rem;
	line-height: 1.65;
	overflow-wrap: anywhere;
}
.tl-event-main .tribe-events-c-subscribe-dropdown__button {
	min-height: 2.75rem;
	border-color: #925a00;
	border-radius: 0;
	color: #925a00;
	font-family: Arial, Helvetica, sans-serif;
}
.tl-event-main .tribe-events-c-subscribe-dropdown__button:hover {
	border-color: #6f4400;
	background: #f8ecd0;
	color: #6f4400;
}

/* Put padding on the real button, including the area beneath decorative icons. */
.tl-shell :is(.tl-event-main, .tl-calendar-main) .tribe-events-c-subscribe-dropdown .tribe-events-c-subscribe-dropdown__button {
	position: relative;
	display: block;
	max-width: 100%;
	padding: 0;
	transition: none;
}
.tl-shell :is(.tl-event-main, .tl-calendar-main) .tribe-events-c-subscribe-dropdown button.tribe-events-c-subscribe-dropdown__button-text {
	display: block;
	width: 100%;
	min-height: 2.75rem;
	min-width: 0;
	padding: .65rem 2.25rem .65rem 1rem;
	font-family: Arial, Helvetica, sans-serif;
	line-height: 1.4;
	white-space: normal;
	overflow-wrap: anywhere;
	transition: none;
}
.tl-shell .tl-event-main .tribe-events-c-subscribe-dropdown__button:has(.tribe-events-c-subscribe-dropdown__export-icon) .tribe-events-c-subscribe-dropdown__button-text {
	padding-inline-start: 2.5rem;
}
.tl-shell :is(.tl-event-main, .tl-calendar-main) .tribe-events-c-subscribe-dropdown__button > :is(.tribe-events-c-subscribe-dropdown__export-icon, .tribe-events-c-subscribe-dropdown__button-icon) {
	position: absolute;
	top: 50%;
	margin: 0;
	transform: translateY(-50%);
	pointer-events: none;
}
.tl-shell .tl-event-main .tribe-events-c-subscribe-dropdown__export-icon { left: .75rem; }
.tl-shell :is(.tl-event-main, .tl-calendar-main) .tribe-events-c-subscribe-dropdown__button-icon { right: .75rem; }
.tl-shell :is(.tl-event-main, .tl-calendar-main) .tribe-events-c-subscribe-dropdown__button--active > .tribe-events-c-subscribe-dropdown__button-icon {
	transform: translateY(-50%) rotate(180deg);
}

/* TEC's tooltip measuring clone must reserve image space before it decodes. */
body:has(.tl-calendar-main) .tribe-events-tooltip-theme .tribe-events-calendar-month__calendar-event-tooltip-featured-image-wrapper {
	position: relative;
	aspect-ratio: 16 / 9;
}
body:has(.tl-calendar-main) .tribe-events-tooltip-theme .tribe-events-calendar-month__calendar-event-tooltip-featured-image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Seven day columns must fit the phone popup rather than widen its table. */
@media (max-width: 23rem) {
	.tl-calendar-main .tribe-events .datepicker table {
		width: 100%;
		max-width: 100%;
		table-layout: fixed;
	}
	.tl-calendar-main .tribe-events .datepicker-days :is(td, th) {
		width: 14.2857%;
		min-width: 0;
		padding-inline: 0;
	}
	.tl-calendar-main .tribe-events .datepicker-days button.day {
		width: 100%;
		max-width: 100%;
		min-width: 0;
		min-height: 2.5rem;
		padding: .25rem;
	}
	.tl-calendar-main .tribe-events .datepicker-days thead button { max-width: 100%; }
}
