/* Spack! Info-Popup – Frontend */
html.sip-lock,
html.sip-lock body { overflow: hidden !important; }

.sip-root {
	--sip-primary: #0f6e8c;
	--sip-primary-soft: rgba(15, 110, 140, .12);
	--sip-bg: #fff;
	--sip-text: #1f2933;
	--sip-btn-text: #fff;
	--sip-radius: 14px;
	--sip-overlay: .55;
	--sip-logo-h: 60px;
	position: fixed;
	z-index: 2147483000;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.55;
	color: var(--sip-text);
	-webkit-font-smoothing: antialiased;
}
.sip-root *,
.sip-root *::before,
.sip-root *::after { box-sizing: border-box; }

/* ---------- Grundelemente ---------- */
.sip-root .sip-overlay {
	position: fixed;
	inset: 0;
	background: rgba(10, 14, 20, var(--sip-overlay));
	opacity: 0;
	transition: opacity .25s ease;
}
.sip-root .sip-dialog {
	position: relative;
	background: var(--sip-bg);
	color: var(--sip-text);
	border-radius: var(--sip-radius);
	border-top: 6px solid var(--sip-primary);
	box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .08);
	outline: none;
	opacity: 0;
	transition: opacity .25s ease, transform .3s cubic-bezier(.2, .9, .3, 1.15);
}
.sip-root.sip-open .sip-overlay,
.sip-root.sip-open .sip-dialog { opacity: 1; }

.sip-root .sip-inner { padding: 32px 32px 28px; text-align: center; }

.sip-root .sip-logo { margin: 0 0 20px; }
.sip-root .sip-logo img {
	display: block;
	height: var(--sip-logo-h);
	max-height: var(--sip-logo-h);
	width: auto;
	max-width: 100%;
	margin: 0 auto;
	object-fit: contain;
}

.sip-root .sip-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px;
	padding: 5px 12px 5px 8px;
	border-radius: 999px;
	background: var(--sip-primary-soft);
	color: var(--sip-primary);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	line-height: 1.2;
}
.sip-root .sip-badge svg { width: 18px; height: 18px; flex: none; }
.sip-root .sip-badge:not(:has(span)) { padding: 6px; }

.sip-root .sip-dialog h2.sip-title {
	margin: 0 0 10px;
	padding: 0 28px;
	font-family: inherit;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: normal;
	text-transform: none;
	text-align: center;
	color: var(--sip-text);
}
.sip-root .sip-body { font-size: 16px; color: var(--sip-text); }
.sip-root .sip-body > :first-child { margin-top: 0; }
.sip-root .sip-body > :last-child { margin-bottom: 0; }
.sip-root .sip-body p { margin: 0 0 .8em; color: inherit; font-size: inherit; line-height: inherit; }
.sip-root .sip-body ul,
.sip-root .sip-body ol { margin: 0 0 .8em; padding: 0; list-style-position: inside; }
.sip-root .sip-body a { color: var(--sip-primary); text-decoration: underline; }
.sip-root .sip-body strong { font-weight: 700; }

.sip-root .sip-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin-top: 24px;
}
.sip-root .sip-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 10px 22px;
	border: 2px solid var(--sip-primary);
	border-radius: calc(var(--sip-radius) * .6);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
	transition: filter .15s ease, background-color .15s ease, transform .1s ease;
}
.sip-root .sip-btn--primary { background: var(--sip-primary); color: var(--sip-btn-text); }
.sip-root .sip-btn--primary:hover { filter: brightness(1.08); }
.sip-root .sip-btn--ghost { background: transparent; color: var(--sip-primary); }
.sip-root .sip-btn--ghost:hover { background: var(--sip-primary-soft); color: var(--sip-primary); }
.sip-root .sip-btn:active { transform: translateY(1px); }
.sip-root .sip-btn:focus-visible,
.sip-root .sip-x:focus-visible { outline: 3px solid var(--sip-primary); outline-offset: 2px; }

.sip-root .sip-x {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--sip-text);
	opacity: .65;
	cursor: pointer;
	box-shadow: none;
}
.sip-root .sip-x:hover { opacity: 1; background: rgba(0, 0, 0, .06); }
.sip-root .sip-x svg { width: 20px; height: 20px; }

.sip-root .sip-preview-flag {
	position: absolute;
	top: -6px;
	left: 50%;
	transform: translate(-50%, -100%);
	padding: 4px 12px;
	border-radius: 6px 6px 0 0;
	background: #d63638;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

/* ---------- Layout: Mitte ---------- */
.sip-layout-modal {
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.sip-layout-modal .sip-dialog {
	width: 100%;
	max-width: 540px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	overscroll-behavior: contain;
	transform: translateY(16px) scale(.97);
}
.sip-layout-modal.sip-open .sip-dialog { transform: none; }
.sip-layout-modal .sip-preview-flag { position: sticky; display: table; margin: 0 auto; transform: none; top: 0; border-radius: 0 0 6px 6px; }

/* ---------- Layout: Box unten rechts ---------- */
.sip-layout-corner {
	right: 20px;
	bottom: 20px;
	width: calc(100% - 40px);
	max-width: 400px;
}
.sip-layout-corner .sip-dialog {
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	transform: translateY(24px);
}
.sip-layout-corner.sip-open .sip-dialog { transform: none; }
.sip-layout-corner .sip-inner { padding: 24px 24px 20px; }
.sip-layout-corner .sip-logo { margin-bottom: 14px; }
.sip-layout-corner .sip-logo img { height: calc(var(--sip-logo-h) * .7); }
.sip-layout-corner .sip-dialog h2.sip-title { font-size: 19px; padding: 0 24px; }
.sip-layout-corner .sip-body { font-size: 15px; }
.sip-layout-corner .sip-actions { margin-top: 18px; }

/* ---------- Layout: Leiste unten ---------- */
.sip-layout-bar {
	left: 0;
	right: 0;
	bottom: 0;
}
.sip-layout-bar .sip-dialog {
	border-radius: var(--sip-radius) var(--sip-radius) 0 0;
	max-height: 70vh;
	overflow-y: auto;
	transform: translateY(100%);
}
.sip-layout-bar.sip-open .sip-dialog { transform: none; }
.sip-layout-bar .sip-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	max-width: 900px;
	margin: 0 auto;
	padding: 20px 64px 20px;
}
.sip-layout-bar .sip-logo { margin: 0; flex: none; }
.sip-layout-bar .sip-logo img { height: calc(var(--sip-logo-h) * .75); }
.sip-layout-bar .sip-content { width: 100%; }
.sip-layout-bar .sip-badge { margin-bottom: 6px; }
.sip-layout-bar .sip-dialog h2.sip-title { font-size: 18px; margin-bottom: 4px; }
.sip-layout-bar .sip-body { font-size: 15px; }
.sip-layout-bar .sip-actions { margin: 6px 0 0; }
.sip-layout-bar .sip-x { top: 10px; }

/* ---------- Mobil ---------- */
@media (max-width: 640px) {
	.sip-root .sip-inner { padding: 26px 20px 20px; }
	.sip-root .sip-dialog h2.sip-title { font-size: 21px; padding: 0 28px; }
	.sip-root .sip-btn { padding: 10px 16px; font-size: 14px; }

	.sip-layout-modal { align-items: flex-end; padding: 0; }
	.sip-layout-modal .sip-dialog {
		max-width: none;
		max-height: 88vh;
		max-height: 88dvh;
		border-radius: var(--sip-radius) var(--sip-radius) 0 0;
		transform: translateY(40px);
		padding-bottom: env(safe-area-inset-bottom);
	}
	.sip-layout-corner { right: 10px; bottom: 10px; width: calc(100% - 20px); }
	.sip-layout-bar .sip-inner { padding: 22px 20px calc(18px + env(safe-area-inset-bottom)); }
	.sip-layout-bar .sip-x { top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
	.sip-root .sip-overlay,
	.sip-root .sip-dialog { transition: opacity .01s linear; transform: none !important; }
}

@media print {
	.sip-root { display: none !important; }
}
