/* HÖHER Katalog-Popup — Styles. Komplett unter #hkp-popup gescoped, blutet nicht ins Theme. */
/* Basis-Datei: Variablen, Overlay/Dialog/Steps/Rubbellos/Buttons. Formular/Erfolg/Mobile-
   Verdichtung liegen in popup-form.css, das per wp_enqueue_style-Abhaengigkeit NACH dieser
   Datei laedt (siehe hoeher-katalog-popup.php). */

/* Selbst gehostet, kein Google-Fonts-CDN (DSGVO). Datei + Lizenzhinweis: assets/fonts/. */
@font-face {
	font-family: "Rowan";
	src: url("fonts/rowan-regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

#hkp-popup {
	--hkp-orange-100: #FDF1D7;
	--hkp-orange-200: #FAE0B0;
	--hkp-orange-300: #FFC46A;
	--hkp-orange-400: #FFAF54;
	--hkp-neutral-50: #F7F5F1;
	--hkp-beige: #F5EFE6;
	--hkp-border: #E9E2D9;
	--hkp-border-2: #E4D6C4;
	--hkp-neutral-500: #7C7C7C;
	--hkp-ink: #27252A;
	--hkp-font-text: "DM Sans", system-ui, -apple-system, sans-serif;
	--hkp-font-display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
	--hkp-font-serif: "Rowan", Georgia, serif;

	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	font-family: var(--hkp-font-text);
	color: var(--hkp-ink);
}

#hkp-popup.hkp-root--open {
	display: block;
}

/* Globale Sicherung: ohne !important gewinnt die Spezifitaet dieser #hkp-popup-Regeln gegen das UA-[hidden]{display:none}. */
#hkp-popup [hidden] {
	display: none !important;
}

/* Größenstabilität: alle Schritte liegen im selben Grid-Feld übereinander, unsichtbare bleiben im Layout (visibility statt display). */
#hkp-popup .hkp-step {
	grid-area: 1 / 1;
}

#hkp-popup .hkp-step[hidden] {
	display: block !important;
	visibility: hidden;
	pointer-events: none;
}

#hkp-popup .hkp-form-step[hidden] {
	display: flex !important;
	visibility: hidden;
	pointer-events: none;
}

/* Glückwunsch-Zeile/CTA/Caption reservieren ihren Platz schon vor dem Reveal, sonst wächst der Dialog mitten in der Interaktion. */
#hkp-popup .hkp-reveal-fade[hidden],
#hkp-popup .hkp-cover-caption[hidden] {
	display: block !important;
	visibility: hidden;
	pointer-events: none;
}

body.hkp-locked {
	overflow: hidden;
}

/* Solange das Popup offen ist, verschwindet das Trustami-Overlay-Badge, sonst
   kollidiert es mobil mit dem Submit-Button des Bottom-Sheets. */
body.hkp-locked #trustami-mobile-view,
body.hkp-locked [class*="widget_container_overlay"] {
	visibility: hidden !important;
}

/* Overlay */

#hkp-popup .hkp-overlay {
	position: absolute;
	inset: 0;
	background: rgba(39, 37, 42, 0.45);
	opacity: 0;
	transition: opacity 220ms ease;
}

#hkp-popup.hkp-root--visible .hkp-overlay {
	opacity: 1;
}

/* Dialog: eine feste Größe über alle Schritte, damit nichts springt. */

#hkp-popup .hkp-dialog {
	position: absolute;
	left: 50%;
	top: 50%;
	width: min(420px, calc(100vw - 32px));
	height: auto;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	background: #FFFFFF;
	border-radius: 20px;
	box-shadow: 0 30px 60px -24px rgba(39, 37, 42, 0.32), 0 8px 24px -8px rgba(39, 37, 42, 0.18);
	padding: 32px 24px 24px;
	display: grid;
	align-items: center;
	transform: translate(-50%, calc(-50% + 14px)) scale(0.98);
	opacity: 0;
	transition: opacity 220ms ease, transform 220ms ease;
}

#hkp-popup.hkp-root--visible .hkp-dialog {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 767px) {
	#hkp-popup .hkp-dialog {
		left: 0;
		top: auto;
		bottom: 0;
		width: 100%;
		height: auto;
		max-height: 88vh;
		border-radius: 20px 20px 0 0;
		padding: 24px 20px calc(32px + env(safe-area-inset-bottom, 0px));
		transform: translate(0, 100%);
	}

	#hkp-popup.hkp-root--visible .hkp-dialog {
		transform: translate(0, 0);
	}
}

/* Schließen-Button */

#hkp-popup .hkp-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	border-radius: 999px;
	border: none;
	background: transparent;
	color: var(--hkp-neutral-500);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 150ms ease;
}

#hkp-popup .hkp-close:hover {
	background: var(--hkp-orange-100);
}

#hkp-popup .hkp-close:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(255, 175, 84, 0.45);
}

/* Panels: Outer- und innere Formular-Schritte teilen sich dieselbe Bewegung, ein exponentielles Ease-out beim Eintreten. */

#hkp-popup .hkp-panel {
	transition: opacity 320ms cubic-bezier(0.16, 1, 0.3, 1), transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

#hkp-popup .hkp-step--enter {
	opacity: 0;
	transform: translateY(8px);
}

#hkp-popup .hkp-reveal-fade {
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 250ms ease, transform 250ms ease;
}

#hkp-popup .hkp-reveal-fade.is-visible {
	opacity: 1;
	transform: translateY(0);
}

#hkp-popup .hkp-heading {
	font-family: var(--hkp-font-serif);
	font-size: 1.35rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.3;
	margin: 8px 0 14px;
	outline: none;
}

/* Zentrierte Buehne. Margin-top haelt die Headline unter dem X: X reicht bis 46px, +20px Pflichtabstand = 66px; Padding-top 32px -> min. 34px margin-top, 36px Puffer. */
#hkp-popup [data-hkp-step="scratch"] {
	text-align: center;
}

#hkp-popup .hkp-heading--scratch {
	font-size: 1.7rem;
	line-height: 1.25;
	margin: 36px 0 10px;
}

#hkp-popup .hkp-scratch-sub {
	margin: 0 0 20px;
	font-size: 0.92rem;
	line-height: 1.5;
	color: var(--hkp-neutral-500);
}

#hkp-popup .hkp-body {
	font-size: 0.95rem;
	line-height: 1.55;
	color: var(--hkp-ink);
	margin: 0 0 12px;
}

#hkp-popup .hkp-effort {
	margin: 0 0 16px;
	font-size: 0.82rem;
	color: var(--hkp-neutral-500);
}

#hkp-popup .hkp-progress {
	margin: 0 0 4px;
	font-size: 0.76rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--hkp-neutral-500);
}

#hkp-popup .hkp-back-link {
	display: inline-block;
	margin: 0 0 10px;
	padding: 2px 0;
	background: none;
	border: none;
	border-radius: 4px;
	font-family: var(--hkp-font-display);
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--hkp-neutral-500);
	text-decoration: underline;
	cursor: pointer;
}

#hkp-popup .hkp-back-link:hover {
	color: var(--hkp-ink);
}

#hkp-popup .hkp-back-link:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(255, 175, 84, 0.45);
}

/* Rubbellos */

#hkp-popup .hkp-scratch-card {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	border-radius: 20px;
	overflow: hidden;
	border: 1px solid var(--hkp-border-2);
	margin-top: 4px;
}

#hkp-popup .hkp-cover {
	position: absolute;
	inset: 0;
	background: var(--hkp-beige);
}

#hkp-popup .hkp-cover-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* Schaufenster-Innenschatten. Kein z-index: liegt per DOM-Reihenfolge (nach Cover/Konfetti, vor Canvas) automatisch obenauf. */
#hkp-popup .hkp-card-shade {
	position: absolute;
	inset: 0;
	pointer-events: none;
	border-radius: inherit;
	box-shadow: inset 0 14px 28px -14px rgba(39, 37, 42, 0.45), inset 0 -12px 24px -14px rgba(39, 37, 42, 0.35), inset 16px 0 28px -18px rgba(39, 37, 42, 0.28), inset -16px 0 28px -18px rgba(39, 37, 42, 0.28);
}

#hkp-popup .hkp-cover-caption {
	margin: 10px 0 0;
	font-size: 0.78rem;
	color: var(--hkp-neutral-500);
	text-align: center;
}

#hkp-popup .hkp-scratch-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	touch-action: none;
	cursor: grab;
	transition: opacity 400ms ease;
}

#hkp-popup .hkp-scratch-canvas--revealed {
	opacity: 0;
}

#hkp-popup .hkp-scratch-done {
	margin: 10px 0 0;
	color: var(--hkp-ink);
	font-size: 0.85rem;
	font-weight: 600;
	text-align: center;
}

#hkp-popup .hkp-scratch-cta {
	display: block;
	width: 100%;
	margin-top: 14px;
}

/* Buttons */

#hkp-popup .hkp-btn {
	font-family: var(--hkp-font-display);
	font-weight: 600;
	font-size: 0.98rem;
	border: none;
	border-radius: 999px;
	padding: 15px 22px;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	display: inline-block;
	transition: background 150ms ease, transform 150ms ease;
}

#hkp-popup .hkp-btn--primary {
	background: var(--hkp-orange-300);
	color: var(--hkp-ink);
}

#hkp-popup .hkp-btn--primary:hover {
	background: var(--hkp-orange-400);
}

#hkp-popup .hkp-btn--primary:active {
	transform: scale(0.98);
}

#hkp-popup .hkp-btn--block {
	display: block;
	width: 100%;
	min-height: 48px;
}

#hkp-popup .hkp-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

#hkp-popup .hkp-btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(255, 175, 84, 0.45);
}
