.tff-events-calendar {
	--tff-events-accent: #d81362;
	--tff-events-accent-dark: #a80e49;
	--tff-events-accent-soft: #fceaf2;
	--tff-events-highlight: #efc62c;
	--tff-events-border: #d9d4d2;
	--tff-events-text: #303030;
	--tff-events-muted: #717171;
	--tff-events-surface: #fff;
	position: relative;
	color: var(--tff-events-text);
	font: inherit;
}

.tff-events-calendar *,
.tff-events-calendar *::before,
.tff-events-calendar *::after {
	box-sizing: border-box;
}

.tff-events-calendar__toolbar {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 16px;
	margin-bottom: 18px;
}

.tff-events-calendar__heading {
	margin: 0;
	font-size: clamp(1.25rem, 3vw, 1.75rem);
	line-height: 1.2;
	text-align: center;
}

.tff-events-calendar__navigation,
.tff-events-calendar__views {
	display: flex;
	align-items: center;
	gap: 6px;
}

.tff-events-calendar__views {
	justify-content: flex-end;
}

.tff-events-calendar__button {
	min-height: 40px;
	padding: 7px 13px;
	border: 1px solid var(--tff-events-border);
	border-radius: 25px;
	background: var(--tff-events-surface);
	color: var(--tff-events-text);
	font: inherit;
	font-weight: 650;
	cursor: pointer;
}

.tff-events-calendar__button:hover,
.tff-events-calendar__button:focus-visible {
	border-color: var(--tff-events-accent);
	outline: 2px solid transparent;
}

.tff-events-calendar__button[aria-pressed="true"] {
	border-color: var(--tff-events-accent);
	background: var(--tff-events-accent);
	color: #fff;
}

.tff-events-calendar__button--icon {
	min-width: 40px;
	padding: 3px 10px 7px;
	font-size: 1.7rem;
	line-height: 1;
}

.tff-events-calendar__status {
	min-height: 1.4em;
	margin: 0 0 8px;
	color: var(--tff-events-muted);
}

.tff-events-calendar__grid-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.tff-events-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(110px, 1fr));
	min-width: 770px;
	border-top: 1px solid var(--tff-events-border);
	border-left: 1px solid var(--tff-events-border);
	background: var(--tff-events-border);
	gap: 1px;
}

.tff-events-grid__weekday {
	padding: 10px 8px;
	background: #f5f3f2;
	color: var(--tff-events-muted);
	font-size: .78rem;
	font-weight: 750;
	letter-spacing: .04em;
	text-align: center;
	text-transform: uppercase;
}

.tff-events-grid__day {
	min-height: 132px;
	padding: 8px;
	background: var(--tff-events-surface);
}

.tff-events-grid--week .tff-events-grid__day {
	min-height: 300px;
}

.tff-events-grid__day.is-outside-month {
	background: #f8f7f7;
}

.tff-events-grid__day.is-outside-month .tff-events-grid__date {
	color: #99918e;
}

.tff-events-grid__day.is-today {
	box-shadow: inset 0 0 0 3px var(--tff-events-highlight);
}

.tff-events-grid__date {
	margin: 0 0 8px;
	font-size: .88rem;
	font-weight: 750;
}

.tff-event-card {
	display: block;
	width: 100%;
	margin: 0 0 6px;
	padding: 7px 8px;
	border: 0;
	border-left: 4px solid var(--tff-events-accent);
	border-radius: 2px;
	background: var(--tff-events-accent-soft);
	color: var(--tff-events-text);
	font: inherit;
	line-height: 1.25;
	text-align: left;
	cursor: pointer;
}

.tff-event-card:hover,
.tff-event-card:focus-visible {
	background: var(--tff-events-accent);
	color: #fff;
	outline: 2px solid var(--tff-events-accent-dark);
	outline-offset: 1px;
}

.tff-event-card__time {
	display: block;
	font-size: .72rem;
	font-weight: 750;
}

.tff-event-card__title {
	display: block;
	margin-top: 2px;
	font-size: .82rem;
	font-weight: 650;
	overflow-wrap: anywhere;
}

.tff-event-modal[hidden] {
	display: none;
}

.tff-event-modal {
	position: fixed;
	z-index: 999999;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 20px;
	background: rgba(28, 23, 22, .72);
}

.tff-event-modal__panel {
	position: relative;
	width: min(650px, 100%);
	max-height: min(820px, calc(100vh - 40px));
	overflow-y: auto;
	border-radius: 6px;
	background: var(--tff-events-surface);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
}

.tff-event-modal__content {
	padding: 28px;
}

.tff-event-modal__close {
	position: absolute;
	z-index: 2;
	top: 10px;
	right: 10px;
	width: 42px;
	height: 42px;
	padding: 0 0 4px;
	border: 1px solid var(--tff-events-border);
	border-radius: 50%;
	background: #fff;
	color: var(--tff-events-text);
	font: 400 1.8rem/1 sans-serif;
	cursor: pointer;
}

.tff-event-modal__close:hover,
.tff-event-modal__close:focus-visible {
	border-color: var(--tff-events-accent);
	outline: 2px solid var(--tff-events-accent);
}

.tff-event-modal__poster {
	display: block;
	width: calc(100% + 56px);
	max-width: none;
	height: min(420px, 60vh);
	margin: -28px -28px 24px;
	object-fit: cover;
	object-position: center;
}

.tff-event-modal__title {
	margin: 0 50px 8px 0;
	font-size: clamp(1.5rem, 4vw, 2rem);
	line-height: 1.15;
}

.tff-event-modal__date,
.tff-event-modal__price {
	margin: 5px 0;
	font-weight: 700;
}

.tff-event-modal__price {
	color: var(--tff-events-accent);
	font-size: 1.12rem;
}

.tff-event-modal__description {
	margin-top: 20px;
}

.tff-event-modal__description > :last-child {
	margin-bottom: 0;
}

.tff-event-modal__action {
	display: inline-block;
	margin-top: 22px;
	padding: 11px 18px;
	border-radius: 25px;
	background: var(--tff-events-accent);
	color: #fff !important;
	font-weight: 750;
	text-decoration: none !important;
}

.tff-event-modal__action:hover,
.tff-event-modal__action:focus-visible {
	background: var(--tff-events-accent-dark);
	outline: 2px solid var(--tff-events-accent-dark);
	outline-offset: 2px;
}

.tff-event-modal-open {
	overflow: hidden;
}

@media (max-width: 720px) {
	.tff-events-calendar__toolbar {
		grid-template-columns: 1fr;
	}

	.tff-events-calendar__heading {
		grid-row: 1;
	}

	.tff-events-calendar__navigation,
	.tff-events-calendar__views {
		justify-content: center;
	}

	.tff-event-modal {
		padding: 10px;
	}

	.tff-event-modal__panel {
		max-height: calc(100vh - 20px);
	}

	.tff-event-modal__content {
		padding: 22px;
	}

	.tff-event-modal__poster {
		width: calc(100% + 44px);
		height: min(360px, 45vh);
		margin: -22px -22px 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tff-events-calendar *,
	.tff-events-calendar *::before,
	.tff-events-calendar *::after {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
