/* bzsc-events-build: 2.1.1 */

.bzsc-events {
	--bzsc-events-cols: 2;
	--bzsc-ev-accent: #0a98d9;
	--bzsc-ev-ink: #1f2937;
	--bzsc-ev-muted: #6b7280;
	--bzsc-ev-surface: #ffffff;
	--bzsc-ev-line: #e5e7eb;
	--bzsc-ev-radius: 14px;
	--bzsc-ev-gap: 24px;
	/* Posters are usually portrait. Capping the height keeps the dates and the
	   buttons in view; the whole thing is one tap away in the lightbox. */
	--bzsc-ev-image-max: 420px;

	display: block;
	margin: 0 0 var(--bzsc-ev-gap);
	color: var(--bzsc-ev-ink);
}

/* --- Filters ---------------------------------------------------------- */

.bzsc-events-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: var(--bzsc-ev-gap);
	padding-bottom: 12px;
	border-bottom: 1px solid var(--bzsc-ev-line);
}

.bzsc-events-periods {
	display: inline-flex;
	gap: 4px;
	padding: 4px;
	background: #f3f4f6;
	border-radius: 999px;
}

html body .bzsc-events a.bzsc-period,
html body .bzsc-events .bzsc-period {
	appearance: none;
	-webkit-appearance: none;
	padding: 7px 16px;
	border: 0 !important;
	border-radius: 999px;
	background: transparent !important;
	color: var(--bzsc-ev-muted) !important;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	text-transform: none;
	text-decoration: none !important;
	display: inline-block;
}

html body .bzsc-events a.bzsc-period:hover,
html body .bzsc-events a.bzsc-period:focus {
	color: var(--bzsc-ev-accent) !important;
	text-decoration: none !important;
}

html body .bzsc-events a.bzsc-period.is-active,
html body .bzsc-events .bzsc-period.is-active {
	background: var(--bzsc-ev-surface) !important;
	color: var(--bzsc-ev-accent) !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.bzsc-events-month {
	display: inline-flex;
	margin: 0;
	align-items: center;
	gap: 8px;
}

/*
 * Themes style every button on the site, and those rules outrank a plain class
 * selector. Same approach as the cards: high specificity plus !important on the
 * properties themes hijack, with the values read from variables so the styling
 * stays customisable.
 *
 * The hidden attribute needs saying twice too — a theme setting
 * `display: inline-block` on [type=submit] beats the browser default that makes
 * [hidden] disappear, so the button JavaScript hides stays on screen.
 */
html body .bzsc-events .bzsc-filter-go[hidden],
html body .bzsc-events [hidden] {
	display: none !important;
}

html body .bzsc-events .bzsc-filter-go {
	appearance: none;
	-webkit-appearance: none;
	padding: 8px 16px !important;
	border: 1px solid var(--bzsc-ev-accent) !important;
	border-radius: 8px !important;
	background: var(--bzsc-ev-accent) !important;
	color: #fff !important;
	font: inherit;
	font-size: 0.9375rem !important;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	text-transform: none;
	text-decoration: none !important;
	cursor: pointer;
	transition: filter 0.2s ease;
}

html body .bzsc-events .bzsc-filter-go:hover,
html body .bzsc-events .bzsc-filter-go:focus,
html body .bzsc-events .bzsc-filter-go:active {
	background: var(--bzsc-ev-accent) !important;
	border-color: var(--bzsc-ev-accent) !important;
	color: #fff !important;
	filter: brightness(0.93);
}

html body .bzsc-events .bzsc-events-month select {
	appearance: none;
	-webkit-appearance: none;
	background-color: var(--bzsc-ev-surface) !important;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 16px;
	padding-right: 32px !important;
	color: inherit !important;
}

.bzsc-events-month select {
	padding: 8px 12px;
	border: 1px solid var(--bzsc-ev-line);
	border-radius: 8px;
	background: var(--bzsc-ev-surface);
	font: inherit;
	font-size: 0.9375rem;
	color: inherit;
}

/* --- Grid ------------------------------------------------------------- */

.bzsc-events-grid {
	display: grid;
	grid-template-columns: repeat(var(--bzsc-events-cols), minmax(0, 1fr));
	gap: var(--bzsc-ev-gap);
	align-items: start;
}

@media (max-width: 900px) {
	.bzsc-events-grid {
		grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
	}
}

.bzsc-events-empty {
	padding: 32px;
	text-align: center;
	color: var(--bzsc-ev-muted);
	background: #f9fafb;
	border-radius: var(--bzsc-ev-radius);
}

/* --- Event ------------------------------------------------------------ */

.bzsc-event {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--bzsc-ev-surface);
	border: 1px solid var(--bzsc-ev-line);
	border-radius: var(--bzsc-ev-radius);
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.bzsc-event:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.bzsc-event.is-past {
	opacity: 0.72;
}

/* Something published in the last few days should read as the newest thing
   on the page without needing a different layout. */
.bzsc-event.is-new {
	border-color: var(--bzsc-ev-accent);
	box-shadow: 0 0 0 3px rgba(10, 152, 217, 0.12);
}

html body .bzsc-event .bzsc-event-figure {
	display: block;
	position: relative;
	width: 100%;
	padding: 0 !important;
	margin: 0;
	border: 0 !important;
	border-radius: 0;
	background: #f3f4f6 !important;
	cursor: zoom-in;
	line-height: 0;
	overflow: hidden;
}

.bzsc-event-figure img {
	display: block;
	width: 100%;
	height: auto;
	max-height: var(--bzsc-ev-image-max, 420px);
	/* Contain, never cover: the poster carries the information, so cropping it
	   would cut off exactly what the visitor came to read. */
	object-fit: contain;
}

.bzsc-zoom {
	position: absolute;
	right: 10px;
	bottom: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(17, 24, 39, 0.62);
	color: #fff;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.bzsc-zoom svg {
	width: 18px;
	height: 18px;
}

.bzsc-event-figure:hover .bzsc-zoom,
.bzsc-event-figure:focus-visible .bzsc-zoom {
	opacity: 1;
}

/* No hover on a phone, so the cue has to be permanent there. */
@media (hover: none) {
	.bzsc-zoom {
		opacity: 1;
	}
}

.bzsc-event-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px;
}

.bzsc-event-flags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.bzsc-flag {
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.bzsc-flag--new {
	background: var(--bzsc-ev-accent);
	color: #fff;
}

.bzsc-flag--upcoming {
	background: #ecfdf5;
	color: #047857;
}

.bzsc-flag--running {
	background: #fef3c7;
	color: #92400e;
}

.bzsc-flag--past {
	background: #f3f4f6;
	color: #6b7280;
}

html body .bzsc-event .bzsc-event-title {
	margin: 0;
	font-size: 1.1875rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--bzsc-ev-ink);
}

.bzsc-event-when,
.bzsc-event-where {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	font-size: 0.875rem;
	color: var(--bzsc-ev-muted);
}

.bzsc-event-icon {
	display: flex;
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin-top: 2px;
	color: var(--bzsc-ev-accent);
}

.bzsc-event-icon svg {
	width: 100%;
	height: 100%;
}

.bzsc-event-intro {
	margin: 4px 0 0;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--bzsc-ev-ink);
}

.bzsc-event-closed {
	margin: 8px 0 0;
	font-size: 0.875rem;
	color: var(--bzsc-ev-muted);
	font-style: italic;
}

/* --- Actions ---------------------------------------------------------- */

.bzsc-event-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

html body .bzsc-event .bzsc-event-interest,
html body .bzsc-event .bzsc-event-wa {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 9px 16px;
	border-radius: 999px;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	cursor: pointer;
	transition: filter 0.2s ease, transform 0.2s ease;
	text-transform: none;
}

html body .bzsc-event .bzsc-event-interest {
	background: transparent !important;
	border: 1.5px solid var(--bzsc-ev-accent) !important;
	color: var(--bzsc-ev-accent) !important;
}

html body .bzsc-event .bzsc-event-interest.is-done {
	background: var(--bzsc-ev-accent) !important;
	color: #fff !important;
	cursor: default;
}

html body .bzsc-event .bzsc-event-wa {
	background: #25d366 !important;
	border: 1.5px solid #25d366 !important;
	color: #fff !important;
}

.bzsc-event-interest:hover,
.bzsc-event-wa:hover {
	transform: translateY(-1px);
	filter: brightness(0.95);
}

.bzsc-event-interest svg,
.bzsc-event-wa svg {
	width: 17px;
	height: 17px;
	flex: 0 0 auto;
}

/* --- Modal ------------------------------------------------------------ */

/*
 * A class setting display beats the hidden attribute, so this has to say so
 * explicitly. Without it the modal sits over the page at opacity 0 — invisible,
 * but swallowing every click on the site.
 */
.bzsc-modal[hidden] {
	display: none !important;
}

.bzsc-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.bzsc-modal.is-open {
	opacity: 1;
}

.bzsc-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.62);
}

.bzsc-modal-dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 40px);
	overflow: auto;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
	transform: translateY(12px) scale(0.98);
	transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.bzsc-modal.is-open .bzsc-modal-dialog {
	transform: none;
}

.bzsc-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px 8px;
}

html body .bzsc-modal .bzsc-modal-title {
	margin: 0;
	font-size: 1.0625rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #6b7280;
}

html body .bzsc-modal .bzsc-modal-close {
	appearance: none;
	-webkit-appearance: none;
	width: 34px;
	height: 34px;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50%;
	background: #f3f4f6 !important;
	color: #4b5563 !important;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.bzsc-modal-body {
	padding: 0 18px;
}

.bzsc-modal-body .bzsc-event {
	border: 0;
	border-radius: 12px;
}

.bzsc-modal-body .bzsc-event:hover {
	transform: none;
	box-shadow: none;
}

.bzsc-modal-lead .bzsc-event {
	background: #f9fafb;
}

.bzsc-modal-lead .bzsc-event-figure {
	border-radius: 12px 12px 0 0;
}

.bzsc-modal-lead .bzsc-event-image {
	max-height: min(44vh, 420px);
}

/* Anything after the headline announcement is a compact reminder. */
.bzsc-modal-more {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--bzsc-ev-line, #e5e7eb);
}

.bzsc-modal-more .bzsc-event-figure,
.bzsc-modal-more .bzsc-event-intro,
.bzsc-modal-more .bzsc-event-where {
	display: none;
}

.bzsc-modal-more .bzsc-event-body {
	padding: 6px 0;
}

.bzsc-modal-more .bzsc-event-title {
	font-size: 1rem;
}

.bzsc-modal-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px 18px;
}

html body .bzsc-modal .bzsc-modal-all {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--bzsc-ev-accent, #0a98d9) !important;
	text-decoration: none !important;
}

html body .bzsc-modal .bzsc-modal-share {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 14px !important;
	border: 1px solid var(--bzsc-ev-line, #e5e7eb) !important;
	border-radius: 999px;
	background: #fff !important;
	color: #4b5563 !important;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	text-transform: none;
}

.bzsc-modal-share svg {
	width: 16px;
	height: 16px;
}

@media (max-width: 600px) {
	.bzsc-modal {
		padding: 0;
		align-items: flex-end;
	}

	.bzsc-modal-dialog {
		max-width: none;
		max-height: 92vh;
		border-radius: 18px 18px 0 0;
	}
}

/* --- Lightbox --------------------------------------------------------- */

.bzsc-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(9, 12, 20, 0.92);
	cursor: zoom-out;
}

.bzsc-lightbox.is-open {
	display: flex;
}

.bzsc-lightbox img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 6px;
}

html body .bzsc-lightbox .bzsc-lightbox-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 42px;
	height: 42px;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14) !important;
	color: #fff !important;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.bzsc-no-scroll {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.bzsc-event,
	.bzsc-modal,
	.bzsc-modal-dialog,
	.bzsc-event-interest,
	.bzsc-event-wa {
		transition-duration: 0.01ms !important;
	}
}
