/* wedding.planner – Frontend */
.wedp {
	--wedp-ink: currentColor;
	--wedp-line: color-mix(in srgb, currentColor 16%, transparent);
	--wedp-soft: color-mix(in srgb, var(--wedp-accent) 8%, transparent);
	--wedp-radius: 10px;
	margin: 2em 0;
	line-height: 1.55;
}
.wedp *, .wedp *::before, .wedp *::after { box-sizing: border-box; }
.wedp .wedp-title { margin: 0 0 .6em; }
.wedp .wedp-subtitle { margin: 1.6em 0 .6em; font-size: var(--wedp-subtitle-size, 1.1em); letter-spacing: .02em; }
.wedp-lead { font-size: 1.08em; }
.wedp-muted { opacity: .72; }
.wedp-small { font-size: .88em; }

/* Karten */
.wedp-card {
	border: 1px solid var(--wedp-line);
	border-radius: var(--wedp-radius);
	padding: 1.1em 1.2em 1.2em;
	margin: 0 0 1em;
	background: color-mix(in srgb, Canvas 92%, var(--wedp-accent));
}
fieldset.wedp-card { min-width: 0; }
.wedp-card legend {
	font-weight: 600;
	padding: 0 .4em;
	margin-left: -.4em;
	font-size: 1.05em;
}
.wedp-badge {
	display: inline-block;
	font-size: .72em;
	font-weight: 500;
	padding: .1em .55em;
	border-radius: 99px;
	background: var(--wedp-soft);
	vertical-align: middle;
}

/* Formulare */
.wedp-field { margin: .8em 0 0; }
.wedp-field label, .wedp-codeform > label, .wedp-label {
	display: block;
	font-weight: 500;
	font-size: .92em;
	margin-bottom: .3em;
}
.wedp input[type="text"], .wedp input[type="email"], .wedp select, .wedp textarea {
	width: 100%;
	max-width: 100%;
	font: inherit;
	padding: .6em .75em;
	border: 1px solid var(--wedp-line);
	border-radius: 8px;
	background: Canvas;
	color: CanvasText;
}
.wedp input:focus, .wedp select:focus, .wedp textarea:focus {
	outline: 2px solid var(--wedp-accent);
	outline-offset: 1px;
}
.wedp-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8em; }
.wedp-row .wedp-field { margin-top: 0; }
.wedp-inline { display: flex; gap: .5em; }
.wedp-inline input { flex: 1; text-transform: uppercase; letter-spacing: .12em; font-size: 1.1em; }
.wedp-check { display: inline-flex; gap: .4em; align-items: center; margin-top: .6em; font-size: .92em; }

.wedp-choices { display: flex; flex-wrap: wrap; gap: .5em; margin-top: .6em; }
.wedp-choice {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: .45em;
	padding: .55em 1em;
	border: 1px solid var(--wedp-line);
	border-radius: 99px;
	cursor: pointer;
	user-select: none;
	transition: background .15s, border-color .15s;
}
.wedp-choice input { accent-color: var(--wedp-accent); margin: 0; }
.wedp-choice:has(input:checked) { border-color: var(--wedp-accent); background: var(--wedp-soft); font-weight: 600; }
.wedp-choice:has(input:focus-visible) { outline: 2px solid var(--wedp-accent); outline-offset: 2px; }

.wedp-details { transition: opacity .2s; }
.wedp-guest.is-declined .wedp-details { display: none; }
.wedp-guest--new:not(.has-name) { border-style: dashed; }
.wedp-guest--new .wedp-hint { margin: .2em 0 0; font-size: .88em; opacity: .75; }

/* Zusammenfassung der Antwort */
.wedp-recap { border-left: 4px solid var(--wedp-accent); }
.wedp-recap h3 { margin: 0 0 .5em; font-size: 1.05em; }
.wedp-recap ul { list-style: none; margin: 0; padding: 0; }
.wedp-recap li { padding: .45em 0; border-top: 1px solid var(--wedp-line); }
.wedp-recap li:first-child { border-top: 0; }
.wedp-recap .wedp-recap__meta { display: block; font-size: .9em; opacity: .8; }
.wedp-recap .wedp-recap__no { opacity: .6; }

/* Buttons */
.wedp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4em;
	font: inherit;
	font-weight: 600;
	padding: .65em 1.3em;
	border-radius: 99px;
	border: 1px solid var(--wedp-accent);
	background: transparent;
	color: var(--wedp-accent);
	cursor: pointer;
	text-decoration: none !important;
	line-height: 1.2;
}
.wedp-btn--primary, .wedp-codeform .wedp-btn { background: var(--wedp-accent); color: #fff; }
.wedp-btn--primary:hover, .wedp-codeform .wedp-btn:hover { filter: brightness(1.08); }
.wedp-btn--small { font-size: .85em; padding: .45em .95em; }
.wedp-btn--ghost { border-color: var(--wedp-line); color: inherit; font-weight: 500; }
.wedp-btn[disabled] { opacity: .5; cursor: progress; }
.wedp-form > .wedp-btn { margin-top: .4em; }

/* Hinweise */
.wedp-notice {
	padding: .8em 1em;
	border-radius: 8px;
	background: var(--wedp-soft);
	border-left: 4px solid var(--wedp-accent);
}
.wedp-notice--success { background: color-mix(in srgb, #2e7d32 10%, transparent); border-color: #2e7d32; }
.wedp-notice--error { background: color-mix(in srgb, #c62828 10%, transparent); border-color: #c62828; }
.wedp-summary { white-space: pre-wrap; font: inherit; background: var(--wedp-soft); padding: 1em; border-radius: 8px; }
.wedp-tableinfo ul { margin: .3em 0 0; padding-left: 1.2em; }
.wedp-tableinfo h3 { margin: 0; font-size: 1em; }

/* Ablauf */
.wedp-day { margin-bottom: 1.6em; }
.wedp-day__title { font-size: 1.1em; margin: 0 0 .8em; }
.wedp-timeline {
	--wedp-tl-col: 5.4em;
	--wedp-tl-gap: 1.6em;
	--wedp-tl-x: calc(var(--wedp-tl-col) + var(--wedp-tl-gap) / 2);
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
}
.wedp-timeline.has-badges { --wedp-tl-gap: calc(var(--wedp-badge, 2.6em) + 1.4em); }
.wedp-timeline::before {
	content: "";
	position: absolute;
	left: calc(var(--wedp-tl-x) - 1px);
	top: .5em;
	bottom: .5em;
	width: 2px;
	background: var(--wedp-line);
}
.wedp-timeline__item { display: grid; grid-template-columns: var(--wedp-tl-col) 1fr; gap: var(--wedp-tl-gap); padding: 0 0 1.3em; position: relative; }
.wedp-timeline.has-badges .wedp-timeline__item { padding-bottom: 1.8em; min-height: calc(var(--wedp-badge, 2.6em) * .75); }
.wedp-timeline__item::before {
	content: "";
	position: absolute;
	left: calc(var(--wedp-tl-x) - 6px);
	top: .45em;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--wedp-accent);
	box-shadow: 0 0 0 4px Canvas;
}
/* Icon oder Bild statt Punkt */
.wedp-timeline__badge {
	position: absolute;
	left: var(--wedp-tl-x);
	top: calc(.85em - var(--wedp-badge, 2.6em) / 2);
	width: var(--wedp-badge, 2.6em);
	height: var(--wedp-badge, 2.6em);
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: Canvas;
	border: 1.5px solid var(--wedp-accent);
	color: var(--wedp-accent);
	box-shadow: 0 0 0 4px Canvas;
	overflow: hidden;
	z-index: 1;
}
.wedp-timeline__badge .wedp-icon { width: 60%; height: 60%; }
.wedp-timeline__badge--img { border-width: 2px; }
.wedp-timeline__badge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wedp-timeline__item.has-badge::before { display: none; }
.wedp-timeline__time { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wedp-timeline__time .wedp-muted { font-weight: 400; font-size: .85em; }
.wedp-timeline__body h4 { margin: 0 0 .2em; font-size: 1.05em; }
.wedp-timeline__body p { margin: .2em 0; }
.wedp-timeline__place { font-size: .92em; opacity: .85; }
.wedp-timeline__where, .wedp-timeline__nav { display: block; }
.wedp-timeline__nav { padding-left: 1.45em; }

/* Orte */
.wedp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1em; }
.wedp-location h4 { margin: 0 0 .4em; font-size: 1.08em; }
.wedp-address { margin: 0 0 .6em; opacity: .85; }
.wedp-desc p { margin: .3em 0; }
.wedp-facts { margin: .6em 0; display: grid; gap: .2em; }
.wedp-facts div { display: flex; gap: .5em; }
.wedp-facts dt { font-weight: 600; min-width: 6.5em; }
.wedp-facts dd { margin: 0; }
.wedp-links { display: flex; flex-wrap: wrap; gap: .4em; margin: .8em 0 0; }

/* Countdown */
.wedp-countdown {
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .55em;
	max-width: 30em;
	margin-inline: auto;
	padding: 1.4em 1.2em 1.2em;
	border: 1px solid var(--wedp-accent);
	border-radius: 4px;
}
.wedp-countdown__intro { font-size: .85em; text-transform: uppercase; letter-spacing: .2em; opacity: .8; }
.wedp-countdown__units { display: flex; justify-content: center; gap: clamp(.6em, 4vw, 1.8em); }
.wedp-countdown__unit { display: flex; flex-direction: column; align-items: center; min-width: 3.6em; }
.wedp-countdown__unit + .wedp-countdown__unit { border-left: 1px solid var(--wedp-line); padding-left: clamp(.6em, 4vw, 1.8em); }
.wedp-countdown__num { font-size: 2.4em; line-height: 1.1; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; color: var(--wedp-accent); }
.wedp-countdown__label { font-size: .78em; text-transform: uppercase; letter-spacing: .14em; opacity: .8; }
.wedp-countdown__text { font-size: 1.5em; font-weight: 600; color: var(--wedp-accent); }
.wedp-countdown__date { font-size: .85em; opacity: .75; letter-spacing: .05em; }

/* Upload */
.wedp-dropzone {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .3em;
	padding: 2em 1em;
	margin: 1em 0;
	border: 2px dashed var(--wedp-line);
	border-radius: var(--wedp-radius);
	text-align: center;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.wedp-dropzone:hover, .wedp-dropzone.is-over { border-color: var(--wedp-accent); background: var(--wedp-soft); }
.wedp-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.wedp-dropzone:focus-within { outline: 2px solid var(--wedp-accent); outline-offset: 2px; }
.wedp-dropzone__icon { font-size: 2em; }
.wedp-dropzone__text { font-weight: 600; }
.wedp-uplist { list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: .4em; }
.wedp-uplist li { display: grid; grid-template-columns: 44px 1fr auto; gap: .7em; align-items: center; font-size: .9em; }
.wedp-uplist img, .wedp-uplist .wedp-upicon { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--wedp-soft); display: grid; place-items: center; }
.wedp-uplist .wedp-upname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wedp-uplist progress { width: 100%; height: 6px; accent-color: var(--wedp-accent); display: block; margin-top: .25em; }
.wedp-uplist .is-done { color: #2e7d32; }
.wedp-uplist .is-error { color: #c62828; }
.wedp-uploader__status { font-weight: 600; }

/* Galerie */
.wedp-photogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.wedp-tile { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--wedp-soft); position: relative; }
.wedp-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; display: block; }
.wedp-tile:hover img { transform: scale(1.04); }
.wedp-tile--video, .wedp-tile--file { display: grid; place-items: center; text-decoration: none; font-size: .85em; text-align: center; }
.wedp-tile__play { font-size: 2em; color: var(--wedp-accent); }
.wedp-pager { display: flex; flex-wrap: wrap; gap: .3em; margin-top: 1em; }
.wedp-pager a, .wedp-pager span { padding: .3em .7em; border-radius: 6px; border: 1px solid var(--wedp-line); text-decoration: none; }
.wedp-pager__current { background: var(--wedp-accent); color: #fff; border-color: var(--wedp-accent) !important; }

/* Lightbox */
.wedp-lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(10, 10, 10, .94);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
}
.wedp-lb[hidden] { display: none; }
.wedp-lb__stage { max-width: 94vw; max-height: 84vh; display: flex; }
.wedp-lb__stage img, .wedp-lb__stage video { max-width: 94vw; max-height: 84vh; object-fit: contain; display: block; }
.wedp-lb button {
	position: absolute;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	border: 0;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	font-size: 22px;
	cursor: pointer;
	display: grid;
	place-items: center;
}
.wedp-lb button:hover { background: rgba(255, 255, 255, .25); }
.wedp-lb__close { top: 12px; right: 12px; }
.wedp-lb__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.wedp-lb__next { right: 12px; top: 50%; transform: translateY(-50%); }
.wedp-lb__bar { position: absolute; bottom: 12px; left: 16px; right: 16px; display: flex; justify-content: space-between; gap: 1em; font-size: 14px; opacity: .85; }
.wedp-lb__bar a { color: #fff; }

@media (max-width: 560px) {
	.wedp-row { grid-template-columns: 1fr; }
	.wedp-timeline { --wedp-tl-x: .4em; }
	.wedp-timeline.has-badges { --wedp-badge-m: min(var(--wedp-badge, 2.4em), 3.4em); --wedp-tl-x: calc(var(--wedp-badge-m) / 2 + .1em); }
	.wedp-timeline__item { grid-template-columns: 1fr; gap: .1em; padding-left: 1.6em; }
	.wedp-timeline.has-badges .wedp-timeline__item { padding-left: calc(var(--wedp-badge-m) + .9em); min-height: calc(var(--wedp-badge-m) + .4em); }
	.wedp-timeline__badge { top: -.1em; width: var(--wedp-badge-m); height: var(--wedp-badge-m); }
	.wedp-timeline__time { text-align: left; }
	.wedp-choice { flex: 1 1 auto; justify-content: center; }
	.wedp-photogrid { grid-template-columns: repeat(3, 1fr); gap: 3px; }
	.wedp-lb__prev, .wedp-lb__next { display: none !important; }
}

/* Zusage ohne Code */
.wedp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.wedp-alt { margin-top: 1.2em; font-size: .95em; }
.wedp-codeshow { letter-spacing: .14em; font-size: 1.15em; }

/* Trauzeugen */
.wedp-witnesses .wedp-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.wedp-witness { text-align: center; }
.wedp-witness__role { text-transform: uppercase; letter-spacing: .14em; font-size: .78em; opacity: .75; margin: 0; }
.wedp-witness h3 { margin: .2em 0 .4em; font-size: 1.25em; }
.wedp-witness__note { margin: 0 0 .8em; }
.wedp-witness .wedp-links { justify-content: center; }
.wedp-address a { color: inherit; text-decoration: none; }
.wedp-address a:hover { text-decoration: underline; }

/* Fragen & Antworten */
.wedp-faq__item { border-bottom: 1px solid var(--wedp-line); padding: .9em 0; }
.wedp-faq__item summary { cursor: pointer; font-weight: 600; }
.wedp-faq__answer { margin-top: .5em; }
.wedp-faq__answer > :first-child { margin-top: 0; }
.wedp-faq__answer > :last-child { margin-bottom: 0; }

/* Galerie: Filter nach Gast */
.wedp-uploaders { display: flex; flex-wrap: wrap; gap: .4em; margin: 0 0 1em; }
.wedp-uploaders a { padding: .3em .8em; border: 1px solid var(--wedp-line); border-radius: 99px; text-decoration: none; font-size: .9em; color: inherit; }
.wedp-uploaders a span { opacity: .6; margin-left: .2em; }
.wedp-uploaders a[aria-current] { background: var(--wedp-accent); border-color: var(--wedp-accent); color: #fff; }
.wedp-uploaders a[aria-current] span { opacity: .85; }
.wedp-uploader__more { margin-top: .4em; }

.wedp-inline input.wedp-plain, .wedp-nameform .wedp-inline input { text-transform: none; letter-spacing: normal; }

/* Ortsbild */
.wedp-location.has-image { padding-top: 0; overflow: hidden; }
.wedp-location__media { margin: 0 -1.2em 1em; height: var(--wedp-img-size, auto); aspect-ratio: auto; overflow: hidden; background: var(--wedp-soft); }
.wedp-locgroup:not([style]) .wedp-location__media { aspect-ratio: 3 / 2; }
.wedp-location__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wedp-img-contain .wedp-location__media { background: transparent; padding: .9em 1.2em 0; box-sizing: border-box; }
.wedp-img-contain .wedp-location__img { object-fit: contain; }
.wedp-img-round .wedp-location__media { width: var(--wedp-img-size, 160px); height: var(--wedp-img-size, 160px); max-width: 100%; margin: .4em auto 1em; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--wedp-line); }
@media (max-width: 560px) {
	.wedp-location__media { height: min(var(--wedp-img-size, 240px), 70vw); }
	.wedp-img-round .wedp-location__media { width: min(var(--wedp-img-size, 160px), 60vw); height: min(var(--wedp-img-size, 160px), 60vw); }
}

/* Trauzeugen-Foto */
.wedp-witness__photo { display: block; width: 132px; height: 132px; object-fit: cover; border-radius: 50%; margin: .4em auto .9em; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--wedp-line); }
.wedp-witness__initials { display: grid; place-items: center; background: var(--wedp-soft); color: var(--wedp-accent); font-size: 2.4em; letter-spacing: .05em; margin: 7px auto 15px !important; }

/* Trauzeugen in eigener Farbe */
.wedp-witness.has-color { border-top: 3px solid var(--wedp-witness-color) !important; }
.wedp-witness.has-color .wedp-witness__photo { box-shadow: 0 0 0 2px var(--wedp-witness-color); }
.wedp-witness.has-color .wedp-witness__initials { color: var(--wedp-witness-color); background: color-mix(in srgb, var(--wedp-witness-color) 12%, #fff); }
.wedp-witness.has-color .wedp-witness__role { color: var(--wedp-witness-color); opacity: 1; }

/* Trauzeugen: eigene Farben für alle Karten */
.wedp-witnesses.has-w-bg .wedp-witness { background: var(--wedp-w-bg) !important; }
.wedp-witnesses.has-w-name .wedp-witness h3 { color: var(--wedp-w-name) !important; }
.wedp-witnesses.has-w-role .wedp-witness .wedp-witness__role { color: var(--wedp-w-role) !important; opacity: 1; }
.wedp-witnesses.has-w-button .wedp-witness .wedp-btn { border-color: var(--wedp-w-button) !important; color: var(--wedp-w-button) !important; background: transparent !important; }
.wedp-witnesses.has-w-button .wedp-witness .wedp-btn--primary,
.wedp-witnesses.has-w-button .wedp-witness details[open] > summary.wedp-btn { background: var(--wedp-w-button) !important; color: #fff !important; }

/* Trauzeugen: Kontaktformular */
.wedp-witness .wedp-links { display: flex; flex-wrap: wrap; gap: .5em; margin: 0 0 .6em; }
.wedp-witness__contact { margin-top: .4em; }
.wedp-witness__contact > summary { list-style: none; cursor: pointer; display: inline-block; }
.wedp-witness__contact > summary::-webkit-details-marker { display: none; }
.wedp-witness__form { text-align: left; margin-top: 1em; padding-top: 1em; border-top: 1px solid var(--wedp-line); }
.wedp-witness__form .wedp-field { margin-bottom: .8em; }
.wedp-witness__form input[type="text"], .wedp-witness__form input[type="email"], .wedp-witness__form textarea { width: 100%; box-sizing: border-box; }
.wedp-witness .wedp-notice { text-align: left; font-size: .92em; }
.wedp-rsvp-intro { margin: 0 0 1.2em; text-align: center; }
