/* ==========================================================================
   Components: configurator shell (Gestalten / Finisher), finisher poster,
   side panel controls.
   ========================================================================== */

/* ---------- Configurator layout ---------- */
.lp-cfg { display: grid; grid-template-columns: minmax(0, 1fr) 440px; min-height: calc(100vh - var(--lp-header-h)); }
.lp-stage { position: sticky; top: var(--lp-header-h); height: calc(100vh - var(--lp-header-h)); display: flex; flex-direction: column; padding: 28px var(--lp-pad); }
.lp-stage__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--lp-muted); }
.lp-stage__pills { display: flex; gap: 10px; align-items: center; }
.lp-stage__canvas { flex: 1; display: grid; place-items: center; min-height: 0; padding: 20px 0; }
.lp-stage__poster { width: min(100%, 380px);}
.lp-stage__poster.lp-poster--landscape { width: min(100%, 560px); max-height: 100%; box-shadow: 0 40px 80px rgba(28, 27, 25, .18), 0 0 0 1px rgba(0, 0, 0, .06); border: 0; }
.lp-stage__foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--lp-muted); }

.lp-panel-side { border-left: 1px solid var(--lp-line-08); display: flex; flex-direction: column; }
.lp-panel-side__head { padding: 36px 36px 0; }
.lp-panel-side__block { padding: 28px 36px 0; }
.lp-panel-side__block:last-of-type { padding-bottom: 36px; }
.lp-panel-side__cta { margin-top: auto; position: sticky; bottom: 0; background: var(--lp-bg); border-top: 1px solid var(--lp-line-08); padding: 20px 36px 28px; }
.lp-panel-side__total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.lp-panel-side__price { font-family: var(--lp-font-display); font-weight: 800; font-size: 28px; line-height: 1; letter-spacing: -.02em; }
.lp-form-grid { display: flex; flex-direction: column; gap: 14px; }
.lp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lp-panel-side .lp-input { padding: 12px 14px; }
.lp-panel-side .lp-field__label { margin-bottom: 6px; }

/* Size list with radio dot (configurator) */
.lp-size-list__row--radio { grid-template-columns: 20px 36px 1fr auto; gap: 12px; align-items: center; padding: 13px 0; font-size: 15px; cursor: pointer; }
.lp-size-list__row--radio:hover { padding-left: 6px; }
.lp-size-list__row--radio .lp-size-list__dims { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lp-size-list__row--radio .lp-dot { box-shadow: inset 0 0 0 3px var(--lp-bg); }
.lp-size-list__row--radio.is-active .lp-dot { background: var(--lp-ink); }

/* Style tiles (Finisher: Papier / Nacht / Startnummer) */
.lp-style-tile { display: flex; flex-direction: column; gap: 8px; transition: all .15s; }
.lp-style-tile__swatch { width: 100%; aspect-ratio: 1 / 1.3; border: 1.5px solid rgba(0, 0, 0, .1); outline: 2px solid transparent; outline-offset: 2px; padding: 10px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; font-family: var(--lp-font-display); font-weight: 800; font-size: 18px; line-height: 1; letter-spacing: -.04em; }
.lp-style-tile.is-active .lp-style-tile__swatch { outline-color: var(--lp-ink); }
.lp-style-tile__line { height: 1px; background: currentColor; opacity: .6; }
.lp-frame-swatch { width: 22px; height: 22px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .15); flex: none; }

/* ---------- Finisher poster ---------- */
.lp-finisher-poster { position: relative; aspect-ratio: 1 / 1.414; container-type: inline-size; padding: 8%; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; transition: background .25s, color .25s; }
.lp-finisher-poster__top { display: flex; justify-content: space-between; font-family: var(--lp-font-mono); font-weight: 500; font-size: 2.6cqw; line-height: 1; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.lp-finisher-poster__name { font-family: var(--lp-font-display); font-weight: 800; font-size: 6cqw; line-height: 1; letter-spacing: -.02em; margin-bottom: 3cqw; text-wrap: balance; }
.lp-finisher-poster__time { font-family: var(--lp-font-display); font-weight: 800; font-size: 17cqw; line-height: .9; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.lp-finisher-poster__meta { display: flex; gap: 5cqw; margin-top: 4cqw; padding-top: 3cqw; border-top: 1px solid currentColor; font-family: var(--lp-font-mono); font-weight: 500; font-size: 2.8cqw; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.lp-finisher-poster--framed { outline: 4.5cqw solid #c9a876; outline-offset: 2.2cqw; box-shadow: 0 0 0 2.2cqw var(--lp-bg), 0 40px 80px rgba(28, 27, 25, .25); }

/* Small finisher poster (Danke page / cross-sell) */
.lp-finisher-mini { width: 200px; aspect-ratio: 1 / 1.414; background: var(--lp-paper); color: var(--lp-ink); padding: 18px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); justify-self: end; }
.lp-finisher-mini__event { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--lp-muted); }
.lp-finisher-mini__time { font-family: var(--lp-font-display); font-weight: 800; font-size: 44px; line-height: .9; letter-spacing: -.04em; }
.lp-finisher-mini__meta { font-size: 12px; color: var(--lp-body); margin-top: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
	.lp-cfg { grid-template-columns: 1fr; }
	.lp-stage { position: static; height: auto; padding: 24px 20px; }
	.lp-stage__canvas { padding: 20px 0; }
	.lp-stage__poster { width: min(100%, 420px); }
	.lp-panel-side { border-left: 0; border-top: 1px solid var(--lp-line-08); }
}
@media (max-width: 860px) {
	.lp-panel-side__head, .lp-panel-side__block { padding-left: 20px; padding-right: 20px; }
	.lp-panel-side__cta { padding: 16px 20px 24px; }
	.lp-form-row { grid-template-columns: 1fr; }
	.lp-cfg .lp-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Finisher stage: frame + photo */
.lp-fin-wrap { position: relative; width: min(100%, 380px); max-height: 100%; }
.lp-fin-wrap .lp-finisher-poster { width: 100% !important; }
.lp-fin-frame { position: absolute; inset: -4.5%; box-shadow: 0 40px 80px rgba(28, 27, 25, .25), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.lp-fin-frame::after { content: ""; position: absolute; inset: 2.3%; background: var(--lp-bg); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .18); }
.lp-fin-wrap.is-framed .lp-finisher-poster { box-shadow: none; }
.lp-fin-photo { position: absolute; inset: 0; z-index: 0; }
.lp-fin-photo img { width: 100%; height: 100%; object-fit: cover; }
.lp-fin-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .7)); }
.lp-finisher-poster__top { position: relative; z-index: 1; }

/* Configurator on small screens: no min-content overflow, wrapping controls */
@media (max-width: 1000px) {
	.lp-cfg { grid-template-columns: minmax(0, 1fr); }
	.lp-stage, .lp-panel-side { min-width: 0; }
	.lp-stage__bar { font-size: 12px; }
	.lp-stage__pills { flex-wrap: wrap; }
	.lp-cfg-row-head { flex-wrap: wrap; gap: 10px; }
	.lp-size-list__row--radio { grid-template-columns: 20px 32px 1fr auto; gap: 8px; font-size: 14px; }
	.lp-panel-side__cta { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* Poster configurator on mobile: sticky compact preview, tools directly below, fixed price bar */
@media (max-width: 1000px) {
	body:has(.lp-cfg--poster) { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
	.lp-cfg--poster .lp-stage { position: sticky; top: var(--lp-header-h); z-index: 20; background: var(--lp-bg); padding: 10px 20px 10px; box-shadow: 0 10px 24px rgba(28, 27, 25, .08); }
	.lp-cfg--poster .lp-stage__canvas { padding: 10px 0 8px; }
	.lp-cfg--poster .lp-cfg-poster { width: min(100%, calc(31vh / 1.414)); box-shadow: 0 12px 30px rgba(28, 27, 25, .14), 0 0 0 1px rgba(0, 0, 0, .06); }
	.lp-cfg--poster .lp-cfg-poster.is-landscape { width: min(100%, calc(31vh * 1.414)); }
	.lp-cfg--poster .lp-stage__foot span:last-child, .lp-cfg--poster .lp-stage__bar .lp-crumb { display: none; }
	.lp-cfg--poster .lp-stage__bar { justify-content: center; }
	.lp-cfg--poster .lp-panel-side { border-top: 0; }
	.lp-cfg--poster .lp-panel-side__head { padding-top: 22px; }
	.lp-cfg--poster .lp-panel-side__head .lp-h2 { font-size: 26px !important; margin-bottom: 4px !important; }
	.lp-cfg--poster .lp-panel-side__head .lp-small { font-size: 14px !important; }
	.lp-cfg--poster .lp-panel-side__block { padding-top: 22px; }
	.lp-cfg--poster .lp-panel-side__cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; margin: 0; padding: 10px 20px calc(12px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; align-items: center; background: #fff; border-top: 1px solid var(--lp-line-08); box-shadow: 0 -10px 30px rgba(28, 27, 25, .08); }
	.lp-cfg--poster .lp-panel-side__total { flex-direction: column; align-items: flex-start; gap: 2px; margin: 0; min-width: 0; }
	.lp-cfg--poster .lp-panel-side__total .lp-small { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
	.lp-cfg--poster .lp-panel-side__price { font-size: 22px; }
	.lp-cfg--poster .lp-panel-side__cta .lp-btn--block { width: auto; padding: 14px 22px; white-space: nowrap; }
	.lp-cfg--poster .lp-panel-side__cta [data-error] { grid-column: 1 / -1; margin-top: 8px; }
	.lp-cfg--poster .lp-panel-side__cta .lp-note { display: none; }
}
