/**
 * Calendar styles.
 *
 * Colour comes from four custom properties set on each element by
 * WOWE_Palette::inline_style(), so a CSS-combining plugin dropping an inline
 * stylesheet can never leave a bar unpainted with white text on white:
 *
 *   --wowe-bg     the calendar's colour
 *   --wowe-ink    white or dark, whichever clears 3:1 against it
 *   --wowe-scrim  a matching overlay for date panels
 *   --wowe-pill   a matching tint for tag pills
 *
 * Fonts deliberately fall through to Divi's stack when Nunito isn't loaded.
 */

/* ── Shell ───────────────────────────────────────────────────────────────── */

.wowe-cal {
	--wowe-line: #e6e3ec;
	--wowe-muted: #6c6579;
	--wowe-surface: #fff;
	--wowe-outside: #faf9fb;
	font-family: "Nunito", "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #2a1540;
	position: relative;
}

.wowe-cal.is-loading .wowe-cal__viewport {
	opacity: .45;
	transition: opacity .12s ease;
	pointer-events: none;
}

/*
 * The filter hides elements with the `hidden` property, and the browser's own
 * [hidden] { display: none } is specificity 0-1-0, exactly the same as a class.
 * Any `display` this stylesheet sets on a class therefore beat it and filtering
 * appeared to do nothing at all. These rules settle it.
 */
.wowe-cal [hidden],
.wowe-card [hidden] {
	display: none !important;
}

/* ── Toolbar ─────────────────────────────────────────────────────────────── */

.wowe-cal__toolbar {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.wowe-cal__nav {
	display: flex;
	align-items: center;
	gap: .35rem;
}

.wowe-cal__arrow,
.wowe-cal__today {
	border: 1px solid var(--wowe-line);
	background: #fff;
	border-radius: 999px;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	color: #2a1540;
	transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

.wowe-cal__arrow {
	width: 2.25rem;
	height: 2.25rem;
	display: grid;
	place-items: center;
	padding: 0;
}

.wowe-cal__arrow svg {
	width: 1.1rem;
	height: 1.1rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.wowe-cal__today {
	padding: .45rem 1rem;
	font-size: .875rem;
}

.wowe-cal__arrow:hover:not(:disabled),
.wowe-cal__today:hover {
	background: #f4f1f8;
	border-color: #d6d0e0;
}

.wowe-cal__arrow:disabled {
	opacity: .3;
	cursor: default;
}

.wowe-cal__title {
	flex: 1 1 auto;
	margin: 0;
	font-size: clamp(1.25rem, 2.4vw, 1.75rem);
	font-weight: 800;
	letter-spacing: -.01em;
}

.wowe-cal__views {
	display: inline-flex;
	border: 1px solid var(--wowe-line);
	border-radius: 999px;
	overflow: hidden;
	background: #fff;
}

.wowe-cal__views button {
	border: 0;
	background: transparent;
	padding: .5rem .9rem;
	font: inherit;
	font-size: .8125rem;
	font-weight: 700;
	color: var(--wowe-muted);
	cursor: pointer;
	transition: background .12s ease, color .12s ease;
}

.wowe-cal__views button:hover {
	background: #f4f1f8;
	color: #2a1540;
}

.wowe-cal__views button.is-active {
	background: var(--wowe-purple, #3b1f59);
	color: #fff;
}

.wowe-cal__noscript {
	display: flex;
	gap: 1rem;
	margin: 0 0 1rem;
	font-weight: 700;
}

/* ── Filter chips ────────────────────────────────────────────────────────── */

.wowe-cal__filters {
	display: flex;
	align-items: center;
	gap: .4rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.wowe-cal__filters-label {
	font-size: .8125rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--wowe-muted);
	margin-right: .25rem;
}

.wowe-chip,
.wowe-chip-static {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	border: 1px solid var(--wowe-line);
	background: #fff;
	border-radius: 999px;
	padding: .35rem .75rem;
	font: inherit;
	font-size: .8125rem;
	font-weight: 700;
	color: #2a1540;
	cursor: pointer;
	transition: border-color .12s ease, background .12s ease;
}

.wowe-chip-static {
	cursor: default;
}

.wowe-chip__dot {
	width: .6rem;
	height: .6rem;
	border-radius: 50%;
	background: var(--wowe-chip, #3b1f59);
	flex: 0 0 auto;
}

.wowe-chip:hover {
	border-color: #c9c1d8;
	background: #faf9fb;
}

.wowe-chip.is-active {
	border-color: var(--wowe-chip, #3b1f59);
	box-shadow: inset 0 0 0 1px var(--wowe-chip, #3b1f59);
}

/* ── Month grid ──────────────────────────────────────────────────────────── */

.wowe-cal__grid {
	border: 1px solid var(--wowe-line);
	border-radius: 14px;
	overflow: hidden;
	background: var(--wowe-surface);
}

.wowe-cal__dows,
.wowe-cal__week {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
}

.wowe-cal__dow {
	padding: .6rem .5rem;
	text-align: center;
	font-size: .75rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--wowe-muted);
	background: #faf9fb;
	border-bottom: 1px solid var(--wowe-line);
}

.wowe-cal__dow abbr {
	text-decoration: none;
	border: 0;
}

.wowe-cal__day {
	min-height: 7.5rem;
	padding: .4rem;
	border-right: 1px solid var(--wowe-line);
	border-bottom: 1px solid var(--wowe-line);
	display: flex;
	flex-direction: column;
	gap: .25rem;
}

.wowe-cal__week:last-child .wowe-cal__day {
	border-bottom: 0;
}

.wowe-cal__day:nth-child(7n) {
	border-right: 0;
}

.wowe-cal__day.is-outside {
	background: var(--wowe-outside);
}

.wowe-cal__day.is-outside .wowe-cal__daynum-n {
	color: #b9b2c6;
}

.wowe-cal__daynum {
	font-size: .8125rem;
	font-weight: 800;
	color: var(--wowe-muted);
	line-height: 1;
	padding: .15rem .1rem .1rem;
}

.wowe-cal__day.is-today .wowe-cal__daynum-n {
	background: var(--wowe-red, #ff0158);
	color: #fff;
	border-radius: 999px;
	padding: .25rem .5rem;
	display: inline-block;
	line-height: 1;
}

.wowe-cal__events {
	display: flex;
	flex-direction: column;
	gap: .2rem;
}

/* ── Event bar ───────────────────────────────────────────────────────────── */

.wowe-cal__ev {
	display: flex;
	align-items: stretch;
	gap: .4rem;
	padding: .2rem .35rem .25rem 0;
	border-radius: 5px;
	text-decoration: none;
	color: inherit;
	font-size: .75rem;
	line-height: 1.25;
	transition: background .12s ease;
	overflow: hidden;
}

.wowe-cal__ev:hover,
.wowe-cal__ev:focus-visible {
	background: color-mix(in srgb, var(--wowe-bg) 12%, transparent);
	color: inherit;
}

.wowe-cal__ev-bar {
	width: 3px;
	border-radius: 3px;
	background: var(--wowe-bg, #3b1f59);
	flex: 0 0 3px;
}

.wowe-cal__ev-body {
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.wowe-cal__ev-time {
	font-weight: 700;
	color: var(--wowe-muted);
	font-size: .6875rem;
}

.wowe-cal__ev-title {
	font-weight: 700;
	color: #2a1540;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wowe-cal__ev-range {
	font-size: .6875rem;
	color: var(--wowe-muted);
}

/* ── Week view ───────────────────────────────────────────────────────────── */

.wowe-cal__week-view {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	border: 1px solid var(--wowe-line);
	border-radius: 14px;
	overflow: hidden;
	background: var(--wowe-surface);
}

.wowe-cal__wcol {
	border-right: 1px solid var(--wowe-line);
	padding: 0 0 .5rem;
	min-height: 12rem;
}

.wowe-cal__wcol:last-child {
	border-right: 0;
}

.wowe-cal__wcol-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .1rem;
	padding: .6rem .25rem;
	background: #faf9fb;
	border-bottom: 1px solid var(--wowe-line);
	margin-bottom: .5rem;
}

.wowe-cal__wcol-dow {
	font-size: .6875rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--wowe-muted);
}

.wowe-cal__wcol-num {
	font-size: 1.125rem;
	font-weight: 800;
}

.wowe-cal__wcol.is-today .wowe-cal__wcol-head {
	background: color-mix(in srgb, var(--wowe-red, #ff0158) 10%, #fff);
}

.wowe-cal__wcol .wowe-cal__events {
	padding: 0 .35rem;
	gap: .3rem;
}

.wowe-cal__wcol .wowe-cal__ev {
	padding: .3rem .35rem .3rem 0;
	background: color-mix(in srgb, var(--wowe-bg) 8%, transparent);
}

.wowe-cal__wcol .wowe-cal__ev-title {
	white-space: normal;
}

/* ── Day and list rows ───────────────────────────────────────────────────── */

.wowe-cal__day-view,
.wowe-cal__list {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.wowe-cal__lday {
	margin: 0 0 .5rem;
	font-size: .8125rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--wowe-muted);
	padding-bottom: .4rem;
	border-bottom: 1px solid var(--wowe-line);
}

.wowe-cal__row {
	display: flex;
	align-items: stretch;
	gap: 0;
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	background: var(--wowe-bg, #3b1f59);
	color: var(--wowe-ink, #fff);
	transition: transform .12s ease, box-shadow .12s ease;
}

.wowe-cal__row:hover,
.wowe-cal__row:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(42, 21, 64, .18);
	color: var(--wowe-ink, #fff);
}

.wowe-cal__row-when {
	flex: 0 0 4.75rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .05rem;
	padding: .85rem .5rem;
	background: var(--wowe-scrim, rgba(0, 0, 0, .18));
	line-height: 1.1;
}

.wowe-cal__row-dow,
.wowe-cal__row-mon {
	font-size: .6875rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .07em;
	opacity: .85;
}

.wowe-cal__row-day {
	font-size: 1.5rem;
	font-weight: 800;
}

.wowe-cal__row-body {
	flex: 1 1 auto;
	min-width: 0;
	padding: .85rem 1rem;
	display: flex;
	flex-direction: column;
	gap: .2rem;
}

.wowe-cal__row-title {
	font-size: 1.0625rem;
	font-weight: 800;
	line-height: 1.25;
}

.wowe-cal__row-sub {
	font-size: .875rem;
	opacity: .9;
	line-height: 1.4;
}

.wowe-cal__row-meta {
	display: flex;
	align-items: center;
	gap: .5rem;
	flex-wrap: wrap;
	margin-top: .15rem;
	font-size: .8125rem;
	font-weight: 700;
}

.wowe-pill {
	background: var(--wowe-pill, rgba(255, 255, 255, .22));
	border-radius: 999px;
	padding: .1rem .55rem;
	font-size: .6875rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .05em;
}

.wowe-cal__row-go {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: .35rem;
	padding: .85rem 1.1rem;
	font-size: .8125rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .06em;
	background: var(--wowe-scrim, rgba(0, 0, 0, .18));
}

.wowe-cal__row-go svg {
	width: 1rem;
	height: 1rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.wowe-cal__none,
.wowe-cal__empty {
	text-align: center;
	padding: 2.5rem 1rem;
	color: var(--wowe-muted);
}

.wowe-cal__empty-title {
	font-weight: 800;
	font-size: 1.0625rem;
	margin: 0 0 .25rem;
	color: #2a1540;
}

.wowe-cal__empty-sub {
	margin: 0;
}

/* ── Hover card ──────────────────────────────────────────────────────────── */

/*
 * The card is moved to <body> by calendar.js, so nothing on the page clips it
 * or outranks it. The very high z-index is deliberate: Divi's sections and
 * sticky header sit in the low thousands.
 */
.wowe-card {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 2147483000;
	width: min(20rem, 88vw);
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 18px 44px rgba(42, 21, 64, .24);
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity .12s ease, transform .12s ease, visibility .12s;
	/* Interactive, so the button on it can actually be reached and clicked. */
	pointer-events: none;
	font-family: "Nunito", "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #2a1540;
	text-align: left;
}

.wowe-card.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

.wowe-card__media img {
	display: block;
	width: 100%;
	height: 9rem;
	object-fit: cover;
}

.wowe-card__body {
	padding: .85rem 1rem 1rem;
	display: flex;
	flex-direction: column;
	gap: .35rem;
}

.wowe-card__title {
	margin: 0;
	font-size: 1.0625rem;
	font-weight: 800;
	line-height: 1.25;
}

.wowe-card__when {
	margin: 0;
	font-size: .8125rem;
	font-weight: 700;
	color: var(--wowe-muted, #6c6579);
}

.wowe-card__chips {
	margin: .1rem 0;
	display: flex;
	gap: .3rem;
	flex-wrap: wrap;
}

.wowe-card__chips .wowe-chip-static {
	font-size: .6875rem;
	padding: .2rem .55rem;
}

.wowe-card__desc {
	margin: 0;
	font-size: .875rem;
	line-height: 1.45;
	color: #4a4257;
}

.wowe-card__cta {
	align-self: flex-start;
	margin-top: .35rem;
	background: var(--wowe-red, #ff0158);
	color: #fff;
	border-radius: 999px;
	padding: .45rem 1.1rem;
	font-size: .8125rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .05em;
	text-decoration: none;
	transition: background .12s ease;
}

.wowe-card__cta:hover,
.wowe-card__cta:focus {
	background: #cd0046;
	color: #fff;
}

/* Single event pages and the compact embed are styled in single.css, which is
   the stylesheet those pages actually load. */

/* ── Narrow screens ──────────────────────────────────────────────────────── */

@media (max-width: 860px) {
	.wowe-cal__day {
		min-height: 5.5rem;
	}

	.wowe-cal__ev-time {
		display: none;
	}
}

@media (max-width: 640px) {
	.wowe-cal__toolbar {
		gap: .6rem;
	}

	.wowe-cal__title {
		order: -1;
		flex: 1 0 100%;
	}

	.wowe-cal__views button {
		padding: .45rem .7rem;
	}

	.wowe-cal__week-view {
		grid-template-columns: 1fr;
	}

	.wowe-cal__wcol {
		border-right: 0;
		border-bottom: 1px solid var(--wowe-line);
		min-height: 0;
	}

	.wowe-cal__wcol.is-empty {
		display: none;
	}

	.wowe-cal__wcol-head {
		flex-direction: row;
		justify-content: flex-start;
		gap: .5rem;
		margin-bottom: .35rem;
	}

	.wowe-cal__row-go span {
		display: none;
	}

	.wowe-cal__row-go {
		padding: .85rem .75rem;
	}
}

/* ── Print ───────────────────────────────────────────────────────────────── */

@media print {
	.wowe-cal__toolbar,
	.wowe-cal__filters,
	.wowe-cal__noscript,
	.wowe-card {
		display: none !important;
	}

	.wowe-cal__grid {
		border-color: #999;
	}

	.wowe-cal__ev {
		break-inside: avoid;
	}

	.wowe-cal__ev-title {
		white-space: normal;
	}
}
