/* MAXX Backstage Events — pixel-perfect mockup match */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Standalone page reset ── */

html.maxx-bse-standalone-html,
html:has(body.maxx-bse-standalone-body) {
	height: 100%;
}

body.maxx-bse-standalone-body {
	margin: 0 !important;
	padding: 0 !important;
	min-height: 100vh;
	background: #eceef2 !important;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}

.maxx-bse-standalone {
	min-height: 100vh;
	width: 100%;
	max-width: 100%;
	overflow-x: clip;
	background: #eceef2;
}

/* ── Design tokens ── */

.maxx-bse {
	--maxx-purple: #7b3ff2;
	--maxx-purple-dark: #6930d9;
	--maxx-purple-light: #f5f0ff;
	--maxx-purple-border: #c9b8f8;
	--maxx-text: #111827;
	--maxx-text-muted: #6b7280;
	--maxx-text-light: #9ca3af;
	--maxx-bg: #eceef2;
	--maxx-card-bg: #ffffff;
	--maxx-border: #e2e5ea;
	--maxx-shadow: 0 2px 12px rgba(17, 24, 39, 0.07);
	--maxx-card-radius: 12px;
	--maxx-btn-radius: 6px;
	--maxx-pill-radius: 999px;
	--maxx-container: 1440px;
	--maxx-gutter: 24px;
	--maxx-card-gap: 20px;
	--maxx-columns: 6;
	--maxx-card-width: 210px;
	--maxx-carousel-card-width: 290px;
	--maxx-carousel-nav-size: 40px;
	--maxx-carousel-nav-gap: 16px;

	--cat-concert: #7b3ff2;
	--cat-conference: #3b82f6;
	--cat-networking: #10b981;
	--cat-workshop: #f59e0b;
	--cat-seminar: #ec4899;
	--cat-webinar: #6366f1;
	--cat-services: #14b8a6;
	--cat-others: #6b7280;

	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--maxx-text);
	background: var(--maxx-bg);
	padding: 48px var(--maxx-gutter) 64px;
	max-width: var(--maxx-container);
	margin: 0 auto;
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.maxx-bse *,
.maxx-bse *::before,
.maxx-bse *::after {
	box-sizing: border-box;
}

/* ── Header ── */

.maxx-bse__header {
	display: grid;
	grid-template-columns: var(--maxx-carousel-nav-size) minmax(0, 1fr) var(--maxx-carousel-nav-size);
	column-gap: var(--maxx-carousel-nav-gap);
	align-items: flex-start;
	margin-bottom: 40px;
}

.maxx-bse__header-text {
	grid-column: 2;
	grid-row: 1;
	justify-self: start;
}

.maxx-bse__header-actions {
	grid-column: 2;
	grid-row: 1;
	justify-self: end;
}

.maxx-bse__title {
	font-size: 2.375rem;
	font-weight: 700;
	line-height: 1.12;
	margin: 0 0 8px;
	letter-spacing: -0.02em;
}

.maxx-bse__subtitle {
	font-size: 0.9375rem;
	color: var(--maxx-text-muted);
	margin: 0;
	line-height: 1.5;
}

.maxx-bse__header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	padding-top: 4px;
}

.maxx-bse__search-wrap {
	position: relative;
}

.maxx-bse__search-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--maxx-text-light);
	display: flex;
	pointer-events: none;
}

.maxx-bse__search {
	width: 248px;
	height: 40px;
	padding: 0 14px 0 40px;
	border: 1px solid var(--maxx-border);
	border-radius: var(--maxx-pill-radius);
	background: var(--maxx-card-bg);
	font-family: inherit;
	font-size: 0.875rem;
	color: var(--maxx-text);
	outline: none;
}

.maxx-bse__search:focus {
	border-color: var(--maxx-purple-border);
	box-shadow: 0 0 0 3px rgba(123, 63, 242, 0.12);
}

.maxx-bse__search::placeholder {
	color: var(--maxx-text-light);
}

.maxx-bse__filter-wrap {
	position: relative;
}

.maxx-bse__filter-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 40px;
	padding: 0 16px;
	border: 1px solid var(--maxx-border);
	border-radius: var(--maxx-pill-radius);
	background: var(--maxx-card-bg);
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--maxx-text);
	cursor: pointer;
}

.maxx-bse__filter-btn:hover {
	border-color: var(--maxx-purple-border);
	background: var(--maxx-purple-light);
}

.maxx-bse__filter-icon,
.maxx-bse__filter-chevron {
	display: flex;
	color: var(--maxx-text-muted);
}

.maxx-bse__filter-panel {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 220px;
	background: var(--maxx-card-bg);
	border: 1px solid var(--maxx-border);
	border-radius: var(--maxx-btn-radius);
	box-shadow: var(--maxx-shadow);
	padding: 6px;
	z-index: 100;
}

.maxx-bse__filter-panel[hidden] {
	display: none;
}

.maxx-bse__filter-option {
	display: block;
	width: 100%;
	padding: 9px 12px;
	border: none;
	border-radius: 4px;
	background: transparent;
	font-family: inherit;
	font-size: 0.875rem;
	text-align: left;
	cursor: pointer;
	color: var(--maxx-text);
}

.maxx-bse__filter-option.is-active {
	background: var(--maxx-purple);
	color: #fff;
}

/* ── Sections ── */

.maxx-bse__section {
	margin-bottom: 44px;
}

.maxx-bse__section-title {
	font-size: 1.1875rem;
	font-weight: 700;
	margin: 0 0 16px;
	display: inline-flex;
	align-items: center;
	gap: 2px;
}

.maxx-bse__section-title--plain {
	margin-bottom: 16px;
}

/* Grid section aligns with carousel card column */
.maxx-bse__section--grid {
	display: grid;
	grid-template-columns: var(--maxx-carousel-nav-size) minmax(0, 1fr) var(--maxx-carousel-nav-size);
	column-gap: var(--maxx-carousel-nav-gap);
	row-gap: 16px;
}

.maxx-bse__section--grid > .maxx-bse__section-title,
.maxx-bse__section--grid > .maxx-bse__toolbar,
.maxx-bse__section--grid > .maxx-bse__cards-area {
	grid-column: 2;
}

.maxx-bse__section-chevron {
	color: var(--maxx-text-muted);
	font-size: 1.0625rem;
	font-weight: 400;
}

/* ── Shared cards area (carousel + grid aligned) ── */

.maxx-bse__cards-area {
	width: 100%;
	margin: 0;
	padding: 0;
}

.maxx-bse__section-head,
.maxx-bse__section-title,
.maxx-bse__toolbar,
.maxx-bse__cards-area {
	padding-left: 0;
	padding-right: 0;
}

.maxx-bse__section-head {
	margin-bottom: 0;
}

/* ── Carousel ── */

.maxx-bse__section--carousel {
	display: grid;
	grid-template-columns: var(--maxx-carousel-nav-size) minmax(0, 1fr) var(--maxx-carousel-nav-size);
	column-gap: var(--maxx-carousel-nav-gap);
	row-gap: 16px;
	align-items: center;
}

.maxx-bse__section--carousel .maxx-bse__section-head {
	grid-column: 2;
	grid-row: 1;
}

.maxx-bse__cards-area--carousel {
	display: contents;
}

.maxx-bse__carousel {
	display: contents;
}

.maxx-bse__carousel-nav--prev {
	grid-column: 1;
	grid-row: 2;
	justify-self: center;
	align-self: center;
}

.maxx-bse__carousel-viewport {
	grid-column: 2;
	grid-row: 2;
	width: 100%;
	min-width: 0;
	overflow: hidden;
}

.maxx-bse__carousel-nav--next {
	grid-column: 3;
	grid-row: 2;
	justify-self: center;
	align-self: center;
}

.maxx-bse__carousel-dots {
	grid-column: 2;
	grid-row: 3;
	margin-top: 0;
	width: 100%;
}

.maxx-bse__carousel-track {
	display: flex;
	gap: var(--maxx-card-gap);
	transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
	will-change: transform;
}

.maxx-bse__carousel.is-empty .maxx-bse__carousel-nav {
	display: none;
}

.maxx-bse__carousel-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 120px;
	margin: 0;
	padding: 24px 16px;
	color: var(--maxx-text-muted);
	font-size: 0.9375rem;
	text-align: center;
}

.maxx-bse__carousel-empty[hidden] {
	display: none !important;
}

.maxx-bse__carousel-nav {
	position: relative;
	flex: 0 0 var(--maxx-carousel-nav-size);
	width: var(--maxx-carousel-nav-size);
	height: var(--maxx-carousel-nav-size);
	z-index: 5;
	border-radius: 50%;
	border: 1px solid var(--maxx-border);
	background: var(--maxx-card-bg);
	color: var(--maxx-purple);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: var(--maxx-shadow);
	padding: 0;
}

.maxx-bse__carousel-nav--prev,
.maxx-bse__carousel-nav--next {
	left: auto;
	right: auto;
	transform: none;
}

.maxx-bse__carousel-nav--prev:hover:not(:disabled),
.maxx-bse__carousel-nav--next:hover:not(:disabled) {
	border-color: var(--maxx-purple-border);
	background: var(--maxx-purple-light);
}

.maxx-bse__carousel-nav:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.maxx-bse__carousel-dots {
	display: flex;
	justify-content: center;
	gap: 7px;
	margin-top: 16px;
	width: 100%;
}

.maxx-bse__carousel-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	border: none;
	background: #d1d5db;
	cursor: pointer;
	padding: 0;
}

.maxx-bse__carousel-dot.is-active {
	background: var(--maxx-purple);
}

/* ── Toolbar ── */

.maxx-bse__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.maxx-bse__category-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.maxx-bse__category-tab {
	height: 34px;
	padding: 0 18px;
	border: 1px solid var(--maxx-border);
	border-radius: var(--maxx-pill-radius);
	background: var(--maxx-card-bg);
	font-family: inherit;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--maxx-text);
	cursor: pointer;
	line-height: 34px;
}

.maxx-bse__category-tab.is-active {
	background: var(--maxx-purple);
	border-color: var(--maxx-purple);
	color: #fff;
}

.maxx-bse__sort-wrap {
	position: relative;
}

.maxx-bse__sort {
	appearance: none;
	height: 34px;
	padding: 0 32px 0 14px;
	border: 1px solid var(--maxx-border);
	border-radius: var(--maxx-btn-radius);
	background: var(--maxx-card-bg);
	font-family: inherit;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--maxx-text);
	cursor: pointer;
	outline: none;
}

.maxx-bse__sort-chevron {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	color: var(--maxx-text-muted);
	display: flex;
}

/* ── Grid — 6-column layout on desktop ── */

.maxx-bse__grid {
	display: grid;
	grid-template-columns: repeat(var(--maxx-columns), minmax(0, 1fr));
	gap: var(--maxx-card-gap);
	align-items: stretch;
	width: 100%;
}

/* ── Event card (equal dimensions everywhere) ── */

.maxx-bse__card {
	background: var(--maxx-card-bg);
	border-radius: var(--maxx-card-radius);
	box-shadow: var(--maxx-shadow);
	border: 1px solid rgba(0, 0, 0, 0.05);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 368px;
	max-height: 368px;
	width: 100%;
}

.maxx-bse__grid .maxx-bse__card {
	min-height: 340px;
	max-height: 340px;
}

.maxx-bse__carousel-track .maxx-bse__card {
	flex: 0 0 var(--maxx-carousel-card-width, var(--maxx-card-width));
	width: var(--maxx-carousel-card-width, var(--maxx-card-width));
	min-width: var(--maxx-carousel-card-width, var(--maxx-card-width));
	max-width: var(--maxx-carousel-card-width, var(--maxx-card-width));
	min-height: 368px;
	max-height: 368px;
	position: relative;
	z-index: 1;
}

.maxx-bse__card-image-wrap {
	position: relative;
	width: 100%;
	height: 168px;
	flex-shrink: 0;
	overflow: hidden;
	background: #e5e7eb;
}

.maxx-bse__card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.maxx-bse__date-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: #fff;
	border-radius: 8px;
	padding: 6px 10px 5px;
	text-align: center;
	min-width: 46px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	line-height: 1.05;
}

.maxx-bse__date-badge-day {
	display: block;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--maxx-text);
}

.maxx-bse__date-badge-month {
	display: block;
	font-size: 0.5625rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--maxx-text-muted);
}

.maxx-bse__category-tag {
	position: absolute;
	bottom: 12px;
	left: 12px;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 0.5625rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #fff;
	line-height: 1.3;
}

.maxx-bse__category-tag--CONCERT { background: var(--cat-concert); }
.maxx-bse__category-tag--CONFERENCE { background: var(--cat-conference); }
.maxx-bse__category-tag--NETWORKING { background: var(--cat-networking); }
.maxx-bse__category-tag--WORKSHOP { background: var(--cat-workshop); }
.maxx-bse__category-tag--SEMINAR { background: var(--cat-seminar); }
.maxx-bse__category-tag--WEBINAR { background: var(--cat-webinar); }
.maxx-bse__category-tag--SERVICES { background: var(--cat-services); }
.maxx-bse__category-tag--OTHERS,
.maxx-bse__category-tag--OTHER { background: var(--cat-others); }
.maxx-bse__category-tag--UPCOMMING { background: var(--cat-conference); }

.maxx-bse__card-body {
	padding: 14px 14px 16px;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0;
	min-height: 0;
	overflow: hidden;
}

.maxx-bse__card-title {
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 8px;
	min-height: 2.7em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.maxx-bse__card-meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 12px;
	min-height: 38px;
	flex: 1;
}

.maxx-bse__card-meta-row {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.75rem;
	color: var(--maxx-text-muted);
	line-height: 1.35;
}

.maxx-bse__card-meta-icon {
	flex-shrink: 0;
	display: flex;
	color: var(--maxx-text-light);
}

.maxx-bse__card-meta-text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Card CTA — smaller radius, white bg, purple border */
.maxx-bse__card-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: auto;
	width: 100%;
	height: 38px;
	padding: 0 14px;
	border: 1.5px solid var(--maxx-purple-border);
	border-radius: var(--maxx-btn-radius);
	background: #ffffff;
	color: var(--maxx-purple) !important;
	font-family: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
	flex-shrink: 0;
}

.maxx-bse__card-btn:visited {
	color: var(--maxx-purple) !important;
}

.maxx-bse__card-btn:hover {
	background: var(--maxx-purple-light);
	border-color: var(--maxx-purple);
	color: var(--maxx-purple-dark) !important;
}

.maxx-bse__card-btn svg {
	flex-shrink: 0;
	width: 14px;
	height: 14px;
	color: currentColor;
}

.maxx-bse__card-btn--disabled {
	opacity: 0.55;
	cursor: not-allowed;
	pointer-events: none;
	border-color: var(--maxx-border);
	color: var(--maxx-text-muted) !important;
	background: #f9fafb;
}

/* ── Mehr Events anzeigen — full width, mockup style ── */

.maxx-bse__load-more-wrap {
	width: 100%;
	margin-top: 28px;
}

.maxx-bse__load-more {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 48px;
	padding: 0 20px;
	border: 1.5px solid var(--maxx-purple-border);
	border-radius: var(--maxx-btn-radius);
	background: #ffffff;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--maxx-purple);
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
	box-shadow: none;
}

.maxx-bse__load-more:hover {
	background: var(--maxx-purple-light);
	border-color: var(--maxx-purple);
	color: var(--maxx-purple-dark);
}

.maxx-bse__load-more-icon {
	display: flex;
	align-items: center;
	color: var(--maxx-purple);
}

.maxx-bse__load-more[hidden] {
	display: none;
}

/* ── Status ── */

.maxx-bse__status {
	text-align: center;
	padding: 48px 24px;
	color: var(--maxx-text-muted);
	font-size: 0.9375rem;
}

.maxx-bse__status--loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.maxx-bse__status[hidden] {
	display: none !important;
}

.maxx-bse__status--error {
	color: #dc2626;
}

.maxx-bse__spinner {
	width: 20px;
	height: 20px;
	border: 2px solid var(--maxx-border);
	border-top-color: var(--maxx-purple);
	border-radius: 50%;
	animation: maxx-bse-spin 0.7s linear infinite;
}

@keyframes maxx-bse-spin {
	to { transform: rotate(360deg); }
}

.maxx-bse.is-loaded .maxx-bse__status--loading {
	display: none;
}

.maxx-bse--fallback {
	padding: 40px 24px;
	text-align: center;
}

.maxx-bse__card-image--placeholder {
	background: linear-gradient(135deg, #7b3ff2, #6366f1, #3b82f6);
	width: 100%;
	height: 100%;
}

.maxx-bse__card--invalid {
	display: none;
}

/* ── Responsive ── */

@media (max-width: 1280px) {
	.maxx-bse {
		--maxx-columns: 4;
	}
}

@media (max-width: 1024px) {
	.maxx-bse {
		--maxx-columns: 2;
	}
}

@media (max-width: 1100px) {
	.maxx-bse {
		--maxx-gutter: 20px;
	}

	.maxx-bse__card {
		min-height: 340px;
		max-height: 340px;
	}

	.maxx-bse__carousel-track .maxx-bse__card {
		min-height: 340px;
		max-height: 340px;
	}
}

@media (max-width: 860px) {
	.maxx-bse {
		--maxx-carousel-nav-size: 36px;
	}
}

@media (max-width: 768px) {
	.maxx-bse {
		padding: 32px 16px 48px;
		--maxx-gutter: 16px;
		--maxx-columns: 1;
		--maxx-carousel-nav-size: 32px;
		--maxx-carousel-nav-gap: 8px;
	}

	.maxx-bse__header {
		grid-template-columns: var(--maxx-carousel-nav-size) minmax(0, 1fr) var(--maxx-carousel-nav-size);
		row-gap: 16px;
	}

	.maxx-bse__header-text {
		grid-column: 2;
		grid-row: 1;
		justify-self: stretch;
	}

	.maxx-bse__header-actions {
		grid-column: 2;
		grid-row: 2;
		justify-self: stretch;
		width: 100%;
		padding-top: 0;
	}

	.maxx-bse__search {
		flex: 1;
		width: auto;
		min-width: 0;
	}

	.maxx-bse__title {
		font-size: 1.875rem;
	}

	.maxx-bse__toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.maxx-bse__sort-wrap {
		align-self: flex-end;
	}

	.maxx-bse__card,
	.maxx-bse__grid .maxx-bse__card {
		min-height: auto;
		max-height: none;
	}

	.maxx-bse__carousel-track .maxx-bse__card {
		min-height: auto;
		max-height: none;
	}

	.maxx-bse__carousel-nav svg {
		width: 16px;
		height: 16px;
	}

	.maxx-bse__category-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 2px;
	}

	.maxx-bse__category-tabs::-webkit-scrollbar {
		display: none;
	}

	.maxx-bse__category-tab {
		flex-shrink: 0;
	}
}

@media (max-width: 600px) {
	.maxx-bse__header-actions {
		flex-direction: column;
	}

	.maxx-bse__filter-btn {
		width: 100%;
		justify-content: center;
	}
}
