/* VVB Adventskalender 2.0 – Türchen klappen auf, dahinter stehen die Angaben */
.vvb-advent {
	/* Farben aus dem Winterbild: Nachthimmel (dunkel-petrol) und Fensterlicht (gold) */
	--a-nacht: #071820;
	--a-nacht2: #10303b;
	--a-gold: #f4c95d;
	--a-gold-hell: #ffe7a3;
	--a-papier: #fff8e6;
	--a-text: #f1f6f7;
	--a-muted: #b3c8cc;
	--a-rot: #b3261e;
	position: relative;
	overflow: hidden;
	padding: 72px 0 64px;
	color: var(--a-text);
	background:
		radial-gradient(ellipse at 50% -10%, rgba(85, 155, 161, .32), transparent 62%),
		radial-gradient(ellipse at 50% 112%, rgba(244, 201, 93, .10), transparent 55%),
		linear-gradient(180deg, var(--a-nacht2), var(--a-nacht));
}
.vvb-advent__sterne {
	position: absolute; inset: 0; pointer-events: none; opacity: .5;
	background-image:
		radial-gradient(1.5px 1.5px at 8% 18%, #fff 50%, transparent 51%),
		radial-gradient(1px 1px at 22% 62%, #fff 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 37% 8%, #fff 50%, transparent 51%),
		radial-gradient(2px 2px at 66% 6%, var(--a-gold-hell) 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 91% 30%, #fff 50%, transparent 51%),
		radial-gradient(1px 1px at 4% 88%, #fff 50%, transparent 51%);
}
.vvb-advent__inner { position: relative; }
.vvb-advent__kopf { max-width: 760px; margin: 0 auto 34px; text-align: center; }
.vvb-advent__kicker {
	text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 850;
	color: var(--a-gold); margin: 0 0 14px;
}
.vvb-advent .vvb-advent__titel { color: #fff; font-weight: 850; margin: 0 0 14px; line-height: 1.1; font-size: clamp(28px, 4vw, 44px); }
.vvb-advent__lead { color: var(--a-muted); margin: 0 auto; font-size: 17px; line-height: 1.6; }
.vvb-advent__lead strong { color: var(--a-papier); }
/* Teilen / Drucken */
.vvb-advent__teilen { margin: 20px 0 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.vvb-advent__teilen .vvb-teilen__info { flex-basis: 100%; text-align: center; }
button.vvb-teilen { border: 0; cursor: pointer; font-family: inherit; line-height: inherit; }
.vvb-teilen.vvb-teilen--hell { background: rgba(255, 255, 255, .12); color: var(--a-papier) !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.vvb-teilen.vvb-teilen--hell:hover { background: rgba(255, 255, 255, .2); }
.vvb-teilen {
	display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px 10px 14px; border-radius: 999px;
	background: var(--a-gold); color: #1d1a0e !important; font-weight: 800; font-size: 15px; text-decoration: none !important;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .25); transition: transform .15s ease, background .15s ease;
}
.vvb-teilen:hover { background: var(--a-gold-hell); transform: translateY(-1px); }
.vvb-teilen:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.vvb-teilen__icon { display: inline-grid; width: 22px; height: 22px; }
.vvb-teilen__icon svg { width: 100%; height: 100%; }
.vvb-teilen__info { font-size: 14px; color: var(--a-gold-hell); min-height: 1em; }
.vvb-teilen__info:empty { display: none; }
.vvb-advent__heute {
	display: inline-block; margin: 22px 0 0; padding: 10px 18px; border-radius: 999px;
	background: rgba(244, 201, 93, .14); border: 1px solid rgba(244, 201, 93, .45);
	color: var(--a-gold-hell); font-weight: 700; font-size: 15px;
}
.vvb-advent__heute[hidden] { display: none; }
.vvb-advent__heute button {
	all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-weight: 800;
}

/* ---------- Kalender ---------- */
.vvb-advent__raster {
	/* Platzhalter-Bild (Winternacht), wird durch hintergrund.jpg ersetzt */
	--vvb-motiv:
		radial-gradient(120% 60% at 30% 118%, #fff 54%, transparent 55%),
		radial-gradient(110% 55% at 85% 120%, #eef4f8 54%, transparent 55%),
		radial-gradient(circle at 78% 22%, #fff6d0 0 5%, rgba(255, 246, 208, .25) 5.5% 9%, transparent 9.5%),
		radial-gradient(1.5px 1.5px at 12% 20%, #fff 50%, transparent 51%),
		radial-gradient(2px 2px at 30% 35%, #fff 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 48% 12%, #fff 50%, transparent 51%),
		radial-gradient(2px 2px at 60% 40%, #fff 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 92% 52%, #fff 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 6% 58%, #fff 50%, transparent 51%),
		linear-gradient(180deg, #0f2550 0%, #1d3f7a 55%, #31609f 100%);
	position: relative;
	list-style: none; margin: 0 auto; padding: 0; max-width: 1000px;
	display: grid; grid-template-columns: repeat(6, 1fr);
	border: 3px solid rgba(255, 255, 255, .85); border-radius: 18px; overflow: visible;
	background: #2a1d0e;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.vvb-zelle {
	position: relative; margin: 0; aspect-ratio: 1 / 1.05;
	perspective: 900px;
	container-type: inline-size;
}

/* Innenseite – was hinter dem Türchen steht */
.vvb-innen {
	position: absolute; inset: 0; padding: 9% 8% 8%;
	display: flex; flex-direction: column; justify-content: center; gap: .35em;
	background:
		radial-gradient(circle at 50% 30%, #fffdf3, var(--a-papier) 60%, #f6e5b8);
	box-shadow: inset 0 0 0 1px rgba(120, 80, 20, .25), inset 0 6px 14px rgba(120, 80, 20, .28);
	color: #2b2012; text-align: center;
	font-size: clamp(10px, 8.2cqi, 14.5px); line-height: 1.25;
	opacity: 0; transition: opacity .35s ease .25s;
	cursor: pointer;
}
.vvb-zelle.is-offen .vvb-innen { opacity: 1; }
.vvb-innen p { margin: 0; }
.vvb-innen__datum {
	font-size: .78em; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; color: #08763f;
}
.vvb-innen__wer { font-weight: 800; font-size: 1em; overflow-wrap: anywhere; }
.vvb-innen__ort { font-size: .92em; color: #4b3c22; }
a.vvb-innen__ort {
	display: inline-flex; align-items: flex-start; justify-content: center; gap: .25em; align-self: center;
	color: #08763f; text-decoration: underline; text-underline-offset: 2px; font-weight: 700;
}
a.vvb-innen__ort:hover { color: #0c5c36; }
.vvb-pin { flex: none; width: 1.15em; height: 1.15em; margin-top: -.05em; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .2)); }
.vvb-innen__zeit {
	display: inline-flex; align-items: center; justify-content: center; gap: .3em; align-self: center;
	margin-top: .15em !important; padding: .15em .6em .15em .3em; border-radius: 999px;
	background: rgba(179, 38, 30, .1); border: 1px solid rgba(179, 38, 30, .35);
	color: #8f2018; font-weight: 800; font-size: .85em;
}
.vvb-tasse { display: inline-grid; place-items: center; width: 1.45em; height: 1.45em; border-radius: 50%; }
.vvb-tasse svg { width: 100%; height: 100%; }

/* Das Türchen */
.vvb-tuer {
	position: absolute; inset: 0; padding: 0; margin: 0; border: 0; background: none; cursor: pointer;
	transform-origin: 0 50%;
	transform-style: preserve-3d;
	transition: transform .85s cubic-bezier(.3, 1.35, .45, 1);
	z-index: 1; font: inherit;
}
.vvb-tuer__vorne, .vvb-tuer__hinten {
	position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.vvb-tuer__vorne {
	background-image: var(--vvb-motiv);
	background-repeat: no-repeat;
	/* Perforation wie bei einem echten Kalender */
	outline: 1.5px dashed rgba(255, 255, 255, .7); outline-offset: -5px;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25);
	display: grid; place-items: center;
	transition: filter .2s ease;
}
.vvb-tuer__nr {
	font-size: clamp(26px, 30cqi, 54px); font-weight: 900; line-height: 1; color: #fff;
	-webkit-text-stroke: 1.5px rgba(30, 30, 50, .55);
	text-shadow: 0 2px 0 rgba(0, 0, 0, .35), 0 0 14px rgba(0, 0, 0, .45);
	font-family: Georgia, "Times New Roman", serif;
}
/* Getränke-Symbol auf dem geschlossenen Türchen – dezent */
.vvb-tuer__tasse {
	position: absolute; right: 7%; top: 7%; width: clamp(18px, 17cqi, 28px); height: clamp(18px, 17cqi, 28px);
	padding: 3px; box-sizing: border-box; border-radius: 50%;
	background: rgba(179, 38, 30, .55); color: rgba(255, 255, 255, .9);
	box-shadow: 0 0 0 1px rgba(255, 255, 255, .35);
	display: grid; place-items: center;
}
.vvb-tuer__tasse svg { width: 100%; height: 100%; }
.vvb-tuer__hinten {
	transform: rotateY(180deg);
	background:
		repeating-linear-gradient(45deg, rgba(0, 0, 0, .03) 0 6px, transparent 6px 12px),
		linear-gradient(90deg, #e9dcc0, #f8efd9);
	box-shadow: inset 0 0 0 1px rgba(120, 80, 20, .3);
}
.vvb-tuer:hover .vvb-tuer__vorne { filter: brightness(1.12); }
.vvb-tuer:hover { transform: rotateY(-12deg); }
.vvb-tuer:focus-visible { outline: 3px solid var(--a-gold); outline-offset: -3px; z-index: 3; }

/* Offen: das Türchen wird abgerissen und fällt weg */
.vvb-zelle.is-offen { z-index: 2; }
.vvb-zelle.is-offen .vvb-tuer {
	animation: vvb-abreissen .95s cubic-bezier(.45, .05, .55, .95) forwards;
	pointer-events: none; /* Klick geht auf die Innenseite (Route-Link / wieder schliessen) */
}
.vvb-zelle.is-offen.ohne-animation .vvb-tuer { animation-duration: 0s; }
@keyframes vvb-abreissen {
	0%   { transform: none; opacity: 1; }
	30%  { transform: rotateY(-55deg); opacity: 1; }
	45%  { transform: rotateY(-62deg) rotateZ(-6deg) translateY(4px); opacity: 1; }
	100% { transform: translate(-25%, 120%) rotateY(-80deg) rotateZ(-28deg); opacity: 0; }
}
/* Abriss-Kante: Perforation bleibt am Fensterrand sichtbar */
.vvb-zelle.is-offen .vvb-innen {
	outline: 1.5px dashed rgba(120, 80, 20, .45); outline-offset: -5px;
}
/* Wieder schliessen: Türchen erscheint wieder */
.vvb-zelle.is-zurueck .vvb-tuer { animation: vvb-zurueck .35s ease-out; }
@keyframes vvb-zurueck { from { opacity: 0; transform: scale(.94); } }
/* Vergangene Tage bleiben abgerissen */
.vvb-zelle.is-vorbei .vvb-innen { cursor: default; }
.vvb-zelle.is-vorbei .vvb-innen__datum { color: #617068; }

/* Heute */
.vvb-zelle.is-heute .vvb-tuer__vorne {
	box-shadow: inset 0 0 0 3px var(--a-gold), inset 0 0 30px rgba(244, 201, 93, .75);
	animation: vvb-leuchten 2.4s ease-in-out infinite;
}
.vvb-zelle.is-heute .vvb-tuer__vorne::after {
	content: "Heute"; position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%);
	background: var(--a-rot); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em;
	text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
}
@keyframes vvb-leuchten {
	50% { box-shadow: inset 0 0 0 3px var(--a-gold-hell), inset 0 0 44px rgba(255, 231, 163, 1); }
}
@media (prefers-reduced-motion: reduce) {
	.vvb-tuer { transition: none; }
	.vvb-zelle.is-offen .vvb-tuer { animation-duration: 0s; }
	.vvb-zelle.is-zurueck .vvb-tuer { animation: none; }
	.vvb-zelle.is-heute .vvb-tuer__vorne { animation: none; }
}

.vvb-advent__legende {
	max-width: 760px; margin: 30px auto 0; text-align: center; color: var(--a-muted); font-size: 15px; line-height: 1.6;
}
.vvb-tasse--legende {
	width: 26px; height: 26px; padding: 4px; vertical-align: middle; margin-right: 6px;
	background: var(--a-rot); color: #fff; box-sizing: border-box;
}

/* Tablet */
@media (max-width: 860px) {
	.vvb-advent__raster { grid-template-columns: repeat(4, 1fr); }
}
/* Smartphone: 3 Spalten, damit die Angaben lesbar bleiben */
@media (max-width: 560px) {
	.vvb-advent { padding: 52px 0 46px; }
	.vvb-advent__lead { font-size: 15px; }
	.vvb-advent__raster { grid-template-columns: repeat(3, 1fr); border-radius: 14px; }
	.vvb-zelle { aspect-ratio: 1 / 1.12; }
	.vvb-innen { font-size: clamp(10px, 9.6cqi, 13px); padding: 7% 6%; }
}

/* ---------- Druckansicht A4 (alle Fenster offen, nach Datum sortiert) ---------- */
.vvb-druckbereich { display: none; }
@media print {
	@page { size: A4 portrait; margin: 10mm 12mm; }
	html.vvb-druck, html.vvb-druck body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
	html.vvb-druck body > *:not(.vvb-druckbereich) { display: none !important; }
	html.vvb-druck #wpadminbar { display: none !important; }
	html.vvb-druck .vvb-druckbereich { display: block !important; }
	.vvb-druckbereich {
		-webkit-print-color-adjust: exact; print-color-adjust: exact;
		font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
		color: #1d1a0e; width: 186mm; margin: 0 auto;
	}
	.vvb-druck__banner {
		position: relative; height: 40mm; border-radius: 4mm; overflow: hidden;
		background: #1a1f4d center 62% / cover no-repeat;
		display: flex; flex-direction: column; justify-content: flex-end; padding: 0 6mm 4mm;
		box-sizing: border-box; color: #fff;
	}
	.vvb-druck__banner::before {
		content: ""; position: absolute; inset: 0;
		background: linear-gradient(180deg, rgba(10, 20, 45, 0) 30%, rgba(10, 20, 45, .75));
	}
	.vvb-druck__banner > * { position: relative; margin: 0; }
	.vvb-druck__kicker { font-size: 7.5pt; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #f4c95d; }
	.vvb-druck__titel { font-size: 22pt; font-weight: 850; line-height: 1.1; }
	.vvb-druck__lead { margin: 3mm 0 3.5mm; font-size: 9pt; text-align: center; color: #3b3424; }
	.vvb-druck__raster {
		display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 30.5mm; gap: 2.4mm;
	}
	.vvb-druck__karte {
		position: relative; box-sizing: border-box; padding: 2.2mm 2.4mm 2mm 2.4mm; overflow: hidden;
		border: .35mm dashed #c9a85a; border-radius: 2mm; background: #fff8e6;
		display: flex; flex-direction: column; justify-content: center; text-align: center; gap: .8mm;
		break-inside: avoid;
	}
	.vvb-druck__nr {
		position: absolute; left: 1.6mm; top: 1.4mm; width: 6.4mm; height: 6.4mm; border-radius: 50%;
		background: #1a2a5e; color: #fff; font: 800 8.5pt/6.4mm Georgia, "Times New Roman", serif; text-align: center;
	}
	.vvb-druck__karte p, .vvb-druck__karte span { margin: 0; }
	.vvb-druck__karte .vvb-innen__datum { font-size: 6.5pt; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #08763f; padding: 0 6mm; }
	.vvb-druck__karte .vvb-innen__wer { font-size: 8.3pt; font-weight: 800; line-height: 1.2; }
	.vvb-druck__karte .vvb-innen__ort { font-size: 7.4pt; color: #4b3c22; display: block; }
	.vvb-druck__karte .vvb-pin { width: 2.6mm; height: 2.6mm; vertical-align: -.3mm; margin-right: .5mm; }
	.vvb-druck__karte .vvb-innen__zeit {
		align-self: center; display: inline-flex; align-items: center; gap: .8mm; margin-top: .4mm;
		padding: .3mm 1.8mm .3mm .8mm; border-radius: 3mm; font-size: 6.8pt; font-weight: 800;
		color: #8f2018; background: #f8e4df; border: .25mm solid #e0a59d;
	}
	.vvb-druck__karte .vvb-tasse { width: 3mm; height: 3mm; }
	.vvb-druck__fuss { margin-top: 3mm; display: flex; justify-content: space-between; gap: 4mm; font-size: 7.5pt; color: #4b4535; }
	.vvb-druck__fuss strong { color: #08763f; }
}

/* ---------- Fotos: Kamera-Knopf im Türchen, Link, Upload-Formular ---------- */
.vvb-innen__fotos {
	display: flex; align-items: center; justify-content: center; gap: .4em; margin-top: .25em;
}
.vvb-kamera {
	display: inline-grid; place-items: center; width: 2.1em; height: 2.1em; min-width: 30px; min-height: 30px;
	padding: .35em; border: 0; border-radius: 50%; cursor: pointer;
	background: #0f3a4a; color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.vvb-kamera svg { width: 100%; height: 100%; }
.vvb-kamera:hover { background: #08763f; }
.vvb-kamera:focus-visible { outline: 2px solid var(--a-gold); outline-offset: 2px; }
.vvb-fotozahl {
	font-size: .78em; font-weight: 800; color: #0f3a4a !important; text-decoration: underline; text-underline-offset: 2px;
}
.vvb-fotozahl[hidden] { display: none; }

.vvb-advent__fotolink { margin: 22px 0 0; text-align: center; }
.vvb-advent__fotohinweis { margin: 10px auto 0; max-width: 620px; text-align: center; color: var(--a-muted); font-size: 14px; }

.vvb-upload {
	border: 0; padding: 0; background: transparent; width: min(440px, calc(100% - 24px)); max-height: calc(100% - 24px);
	color: #102019;
}
.vvb-upload::backdrop { background: rgba(5, 15, 22, .75); backdrop-filter: blur(3px); }
.vvb-upload__form {
	position: relative; display: grid; gap: 14px; padding: 26px 22px 20px; border-radius: 20px;
	background: #fffdf6; border-top: 8px solid var(--a-gold); box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
	font-family: inherit; font-size: 15px;
}
.vvb-upload__zu {
	position: absolute; right: 10px; top: 8px; width: 38px; height: 38px; border: 0; border-radius: 50%;
	background: #f3f6f4; font-size: 24px; line-height: 1; cursor: pointer; color: #102019;
}
.vvb-upload__kicker { margin: 0; font-size: 12px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; color: #08763f; }
.vvb-upload__titel { margin: -8px 0 0; font-size: 20px; line-height: 1.25; padding-right: 34px; }
.vvb-upload__wahl {
	position: relative; display: grid; place-items: center; min-height: 120px; border: 2px dashed #9fb7ad; border-radius: 14px;
	background: #f3f6f4; cursor: pointer; overflow: hidden; text-align: center;
}
.vvb-upload__wahl input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.vvb-upload__wahl-text { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: #0f3a4a; padding: 16px; }
.vvb-upload__wahl-text svg { width: 26px; height: 26px; }
.vvb-upload__vorschau { width: 100%; max-height: 240px; object-fit: contain; background: #e9eeeb; }
.vvb-upload__vorschau[hidden] { display: none; }
.vvb-upload__wahl.hat-bild .vvb-upload__wahl-text { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .9); font-size: 13px; white-space: nowrap; }
.vvb-upload__wahl.hat-bild .vvb-upload__wahl-text svg { width: 18px; height: 18px; }
.vvb-upload__feld { display: grid; gap: 6px; font-weight: 700; }
.vvb-upload__feld small { font-weight: 400; color: #617068; }
.vvb-upload__feld input {
	font: inherit; padding: 10px 12px; border: 1px solid #cfdad4; border-radius: 10px; background: #fff;
}
.vvb-upload__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.vvb-upload__check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.vvb-upload__check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: #08763f; }
.vvb-upload__status { margin: 0; min-height: 1.2em; font-weight: 700; font-size: 14px; }
.vvb-upload__status.ist-fehler { color: #b3261e; }
.vvb-upload__status.ist-ok { color: #08763f; }
.vvb-upload__knoepfe { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.vvb-upload__knoepfe button {
	font: inherit; font-weight: 800; border: 0; border-radius: 10px; padding: 11px 16px; cursor: pointer;
}
.vvb-upload__abbrechen { background: #f3f6f4; color: #102019; }
.vvb-upload__senden { background: #08763f; color: #fff; }
.vvb-upload__senden:disabled { opacity: .6; cursor: wait; }

@media print {
	.vvb-druck__karte .vvb-innen__fotos { display: none !important; }
}

/* Smartphone: Türchen etwas höher, damit Angaben + Kamera-Knopf Platz haben */
@media (max-width: 560px) {
	.vvb-zelle { aspect-ratio: 1 / 1.34; }
	.vvb-innen { gap: .22em; padding: 6% 5% 5%; }
	.vvb-innen__fotos { margin-top: .1em; }
	.vvb-kamera { width: 26px; height: 26px; min-width: 26px; min-height: 26px; padding: 5px; }
}
