/* ==========================================================================
   Countdown widget — flip-clock style digits
   ========================================================================== */
.de-sync-countdown {
	text-align: center;
	padding: 24px;
	background: var(--de-sync-card-bg);
	border: 1px solid var(--de-sync-border);
	border-radius: 12px;
}

.de-sync-countdown-eyebrow {
	margin: 0 0 4px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 12px;
	font-weight: 700;
	color: var(--de-sync-accent);
}

.de-sync-countdown-title {
	margin: 0 0 6px;
	font-size: 22px;
}

.de-sync-countdown-title a {
	color: inherit;
	text-decoration: none;
}

.de-sync-countdown-datetime {
	margin: 0 0 18px;
	color: var(--de-sync-muted);
	font-size: 14px;
}

.de-sync-countdown-live {
	margin: 16px 0 0;
	font-weight: 700;
	color: var(--de-sync-accent);
}

.de-sync-flip-row {
	display: flex;
	justify-content: center;
	gap: 14px;
	flex-wrap: wrap;
}

.de-sync-flip-unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.de-sync-flip-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--de-sync-muted);
}

/* --- Style: flip (default) — authentic split-flap, single hinged leaf
   that folds down from the top half to reveal the (already-set) new
   value underneath, like a real split-flap/departure-board clock. --- */
.de-sync-countdown-style-flip .de-sync-flip-digits {
	display: flex;
	gap: 4px;
}

.de-sync-countdown-style-flip .de-sync-flip-digit {
	position: relative;
	width: 38px;
	height: 56px;
	border-radius: 6px;
	background: var(--pv-black, #16171a);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
	perspective: 200px;
	overflow: hidden;
}

.de-sync-countdown-style-flip .de-sync-flip-half {
	position: absolute;
	left: 0;
	right: 0;
	height: 50%;
	overflow: hidden;
	color: #fff;
	font-size: 28px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.de-sync-countdown-style-flip .de-sync-flip-half span {
	position: absolute;
	left: 0;
	right: 0;
	height: 56px;
	line-height: 56px;
	text-align: center;
}

.de-sync-countdown-style-flip .de-sync-flip-half-top {
	top: 0;
}

.de-sync-countdown-style-flip .de-sync-flip-half-top span {
	top: 0;
}

.de-sync-countdown-style-flip .de-sync-flip-half-bottom {
	bottom: 0;
	border-top: 1px solid rgba(0, 0, 0, 0.35);
}

.de-sync-countdown-style-flip .de-sync-flip-half-bottom span {
	top: -28px;
}

.de-sync-countdown-style-flip .de-sync-flip-leaf {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 50%;
	overflow: hidden;
	color: #fff;
	font-size: 28px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	background: var(--pv-black, #16171a);
	transform-origin: bottom center;
	backface-visibility: hidden;
	transform: rotateX( 0deg );
	transition: transform 0.35s cubic-bezier(0.45, 0, 0.55, 1);
	box-shadow: 0 1px 1px rgba(255, 255, 255, 0.05) inset;
}

.de-sync-countdown-style-flip .de-sync-flip-leaf span {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 56px;
	line-height: 56px;
	text-align: center;
}

.de-sync-countdown-style-flip .de-sync-flip-digit.is-flipping .de-sync-flip-leaf {
	transform: rotateX( -90deg );
}

@media (max-width: 480px) {
	.de-sync-countdown-style-flip .de-sync-flip-digit {
		width: 28px;
		height: 42px;
	}

	.de-sync-countdown-style-flip .de-sync-flip-half,
	.de-sync-countdown-style-flip .de-sync-flip-leaf {
		font-size: 20px;
	}

	.de-sync-countdown-style-flip .de-sync-flip-half span,
	.de-sync-countdown-style-flip .de-sync-flip-leaf span {
		height: 42px;
		line-height: 42px;
	}

	.de-sync-countdown-style-flip .de-sync-flip-half-bottom span {
		top: -21px;
	}
}

/* --- Style: led — digital/LED display look, with a faint "ghost" of an
   unlit segment display behind the lit digits for authenticity. --- */
.de-sync-countdown-style-led .de-sync-plain-digits {
	position: relative;
	min-width: 64px;
	padding: 6px 4px;
	background: #0a0a0a;
	border-radius: 6px;
	font-family: 'Courier New', Courier, monospace;
	font-size: 32px;
	font-weight: 700;
	letter-spacing: 2px;
	text-align: center;
	color: #ff3b30;
	text-shadow: 0 0 6px rgba(255, 59, 48, 0.8), 0 0 14px rgba(255, 59, 48, 0.5);
}

.de-sync-countdown-style-led .de-sync-plain-digits::before {
	content: '88';
	position: absolute;
	inset: 0;
	padding: 6px 4px;
	color: rgba(255, 59, 48, 0.12);
	z-index: 0;
}

.de-sync-countdown-style-led .de-sync-plain-digits {
	z-index: 1;
}

/* --- Style: minimal — plain accent-colored numerals, no card. --- */
.de-sync-countdown-style-minimal .de-sync-plain-digits {
	font-size: 32px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--de-sync-accent);
}

.de-sync-countdown-style-minimal .de-sync-flip-unit {
	gap: 2px;
}

/* ==========================================================================
   Carousel widget
   ========================================================================== */
.de-sync-carousel {
	position: relative;
	padding: 0 44px;
}

.de-sync-carousel-viewport {
	overflow: hidden;
}

.de-sync-carousel-track {
	display: flex;
	gap: 20px;
	scroll-snap-type: x mandatory;
	overflow-x: auto;
	scroll-behavior: smooth;
	-ms-overflow-style: none;
	scrollbar-width: none;
	padding: 4px;
}

.de-sync-carousel-track::-webkit-scrollbar {
	display: none;
}

.de-sync-carousel-slide {
	flex: 0 0 calc( (100% - (var(--de-sync-carousel-visible, 3) - 1) * 20px) / var(--de-sync-carousel-visible, 3) );
	scroll-snap-align: start;
	min-width: 220px;
	display: flex; /* stretches the compact card to a uniform height per row */
}

/* Compact carousel card — deliberately smaller/simpler than the full rich
   event card, so slides look neat and uniform instead of tall/irregular. */
.de-sync-carousel-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	background: var(--de-sync-card-bg);
	border: 1px solid var(--de-sync-border);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: var(--de-sync-shadow);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.de-sync-carousel-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--de-sync-shadow-hover);
}

.de-sync-carousel-card-cover {
	position: relative;
	height: 130px;
}

.de-sync-carousel-card-cover img,
.de-sync-carousel-card-cover .de-sync-event-cover-placeholder {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.de-sync-carousel-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 14px 16px;
}

.de-sync-carousel-card-date {
	margin: 0 0 4px;
	font-size: 12px;
	font-weight: 600;
	color: var(--de-sync-accent);
}

.de-sync-carousel-card-title {
	margin: 0 0 10px;
	font-size: 15px;
	line-height: 1.35;
	color: var(--de-sync-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.de-sync-carousel-card-link {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	font-weight: 600;
	color: var(--de-sync-accent);
	text-decoration: none;
}

.de-sync-carousel-card-link:hover {
	text-decoration: underline;
}

.de-sync-carousel-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid var(--de-sync-border);
	background: var(--de-sync-card-bg);
	color: var(--de-sync-text);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: var(--de-sync-shadow);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.de-sync-carousel-nav:hover {
	background: var(--de-sync-accent);
	color: #fff;
}

.de-sync-carousel-prev {
	left: 0;
}

.de-sync-carousel-next {
	right: 0;
}

.de-sync-carousel-dots {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 14px;
}

.de-sync-carousel-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--de-sync-border);
	border: none;
	cursor: pointer;
	padding: 0;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.de-sync-carousel-dot.is-active {
	background: var(--de-sync-accent);
	transform: scale(1.3);
}

@media (max-width: 782px) {
	.de-sync-carousel {
		padding: 0 36px;
	}

	.de-sync-carousel-slide {
		flex-basis: calc( 100% / min( var(--de-sync-carousel-visible, 3), 2 ) - 14px );
	}
}

@media (max-width: 480px) {
	.de-sync-carousel-slide {
		flex-basis: 88%;
	}
}

/* ==========================================================================
   Featured / highlighted event widget
   ========================================================================== */
.de-sync-featured {
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid var(--de-sync-border);
}

.de-sync-featured-cover {
	position: relative;
	min-height: 360px;
	background-size: cover;
	background-position: center;
	background-color: var(--de-sync-accent);
	display: flex;
	align-items: flex-end;
}

.de-sync-featured-cover:not([style*="background-image"]) {
	background-image: linear-gradient(135deg, var(--de-sync-accent), var(--de-sync-accent-light));
}

.de-sync-featured-overlay {
	position: relative;
	width: 100%;
	padding: 28px;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.75) 65%, rgba(0, 0, 0, 0.9) 100%);
	color: #fff;
}

.de-sync-featured-overlay .de-sync-status-badge {
	position: static;
	display: inline-block;
	margin-bottom: 12px;
}

.de-sync-featured-content {
	max-width: 640px;
}

.de-sync-featured-title {
	margin: 0 0 10px;
	font-size: 32px;
	line-height: 1.2;
	color: #fff;
}

.de-sync-featured-datetime {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 8px;
	font-weight: 600;
	color: #fff;
}

.de-sync-featured-description {
	margin: 10px 0;
	color: rgba(255, 255, 255, 0.85);
	max-width: 560px;
}

.de-sync-featured-meta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 6px 0 18px;
	color: rgba(255, 255, 255, 0.85);
	font-size: 13px;
}

.de-sync-featured-cta {
	width: auto;
	display: inline-flex;
}

@media (max-width: 600px) {
	.de-sync-featured-cover {
		min-height: 280px;
	}

	.de-sync-featured-title {
		font-size: 24px;
	}
}

/* ==========================================================================
   Ticket widget
   ========================================================================== */
.de-sync-ticket {
	display: flex;
	background: var(--de-sync-card-bg);
	border: 1px solid var(--de-sync-border);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: var(--de-sync-shadow);
	max-width: 640px;
}

.de-sync-ticket-main {
	flex: 1;
	padding: 22px 24px;
	min-width: 0;
}

.de-sync-ticket-title {
	margin: 0 0 10px;
	font-size: 20px;
}

.de-sync-ticket-datetime,
.de-sync-ticket-main .de-sync-location {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 6px;
	color: var(--de-sync-muted);
	font-size: 13px;
}

.de-sync-ticket-main .de-sync-event-creator {
	margin-top: 10px;
}

.de-sync-ticket-perforation {
	position: relative;
	flex: 0 0 0;
	border-left: 2px dashed var(--de-sync-border);
}

.de-sync-ticket-perforation::before,
.de-sync-ticket-perforation::after {
	content: '';
	position: absolute;
	left: -9px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--de-sync-bg, #f4f4f5);
}

.de-sync-ticket-perforation::before {
	top: -9px;
}

.de-sync-ticket-perforation::after {
	bottom: -9px;
}

.de-sync-ticket-stub {
	flex: 0 0 180px;
	padding: 22px 18px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 10px;
	background: rgba(128, 128, 128, 0.04);
}

.de-sync-ticket-count-number {
	display: block;
	font-size: 28px;
	font-weight: 700;
	color: var(--de-sync-accent);
	line-height: 1;
}

.de-sync-ticket-count-label {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--de-sync-muted);
}

.de-sync-ticket-barcode {
	width: 100%;
	height: 32px;
	background: repeating-linear-gradient( 90deg, var(--de-sync-text) 0, var(--de-sync-text) 2px, transparent 2px, transparent 5px );
	opacity: 0.35;
}

.de-sync-ticket-cta {
	width: 100%;
}

@media (max-width: 560px) {
	.de-sync-ticket {
		flex-direction: column;
	}

	.de-sync-ticket-perforation {
		border-left: none;
		border-top: 2px dashed var(--de-sync-border);
		height: 0;
	}

	.de-sync-ticket-perforation::before,
	.de-sync-ticket-perforation::after {
		left: 50%;
		top: -9px;
		bottom: auto;
		transform: translateX(-50%);
	}

	.de-sync-ticket-perforation::after {
		top: auto;
		bottom: -9px;
	}

	.de-sync-ticket-stub {
		flex: 1;
	}
}

/* ==========================================================================
   Marquee / header ticker widget — pure CSS scrolling, no JS required.
   Content is rendered twice (two ".de-sync-marquee-set" runs back to back)
   and the track animates from translateX(0) to translateX(-50%), so the
   loop has no visible seam or jump.
   ========================================================================== */
.de-sync-marquee {
	overflow: hidden;
	background: var(--de-sync-card-bg);
	border: 1px solid var(--de-sync-border);
	border-radius: 8px;
	padding: 10px 0;
}

.de-sync-marquee-track {
	display: flex;
	width: max-content;
	animation: de-sync-marquee-scroll var(--de-sync-marquee-duration, 30s) linear infinite;
}

.de-sync-marquee:hover .de-sync-marquee-track {
	animation-play-state: paused;
}

.de-sync-marquee-set {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

@keyframes de-sync-marquee-scroll {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-50%);
	}
}

.de-sync-marquee-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0 18px;
	white-space: nowrap;
	text-decoration: none;
	color: var(--de-sync-text);
	font-size: 14px;
}

.de-sync-marquee-chip:hover .de-sync-marquee-title {
	text-decoration: underline;
}

.de-sync-marquee-live {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: #e0245e;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	padding: 2px 8px;
	border-radius: 4px;
}

.de-sync-marquee-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #fff;
	animation: de-sync-marquee-pulse 1.4s ease-in-out infinite;
}

@keyframes de-sync-marquee-pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.3;
	}
}

.de-sync-marquee-date {
	font-weight: 600;
	color: var(--de-sync-accent);
	font-size: 13px;
}

.de-sync-marquee-title {
	font-weight: 600;
}

.de-sync-marquee-interested {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	color: var(--de-sync-muted);
	font-size: 12px;
}

.de-sync-marquee-interested .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

.de-sync-marquee-sep {
	color: var(--de-sync-border);
}

@media (prefers-reduced-motion: reduce) {
	.de-sync-marquee-track {
		animation: none;
	}

	.de-sync-marquee-dot {
		animation: none;
	}
}

/* ==========================================================================
   Events landing page — hero countdown banner + the full events widget.
   ========================================================================== */
.de-sync-landing-hero {
	margin-bottom: 32px;
}

.de-sync-landing-hero .de-sync-countdown {
	border-radius: 16px;
	padding: 40px 24px;
}

.de-sync-landing-body {
	max-width: 1100px;
	margin: 0 auto;
}
