/* Simple Popup – Head and Code GmbH */
.hac-sp {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 999999;
	display: none;
	padding: 24px;
	box-sizing: border-box;
	opacity: 0;
	transition: opacity .25s ease;
}

.hac-sp.is-open {
	display: flex;
}

.hac-sp.is-visible {
	opacity: 1;
}

.hac-sp--center       { align-items: center;     justify-content: center; }
.hac-sp--top-right    { align-items: flex-start; justify-content: flex-end; }
.hac-sp--top-left     { align-items: flex-start; justify-content: flex-start; }
.hac-sp--bottom-right { align-items: flex-end;   justify-content: flex-end; }
.hac-sp--bottom-left  { align-items: flex-end;   justify-content: flex-start; }

/* Box: trägt den Schließen-Button, der leicht außerhalb sitzt */
.hac-sp__box {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 480px;
	transform: translateY(10px);
	transition: transform .25s ease;
}

.hac-sp.is-visible .hac-sp__box {
	transform: none;
}

/* Inhalt: scrollt bei Bedarf */
.hac-sp__inner {
	box-sizing: border-box;
	max-height: calc(100vh - 48px);
	overflow: auto;
	padding: 32px 28px;
	background: #fff;
	color: #1d2327;
	border-radius: 10px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
	font-size: 16px;
	line-height: 1.5;
	text-align: left;
}

.hac-sp__headline {
	margin: 0 0 12px;
	padding: 0;
	font-size: 1.5em;
	line-height: 1.25;
	color: inherit;
}

.hac-sp__text {
	color: inherit;
	word-wrap: break-word;
}

.hac-sp__text > :first-child { margin-top: 0; }
.hac-sp__text > :last-child  { margin-bottom: 0; }
.hac-sp__text img,
.hac-sp__text video,
.hac-sp__text iframe { max-width: 100%; height: auto; }

/* Schließen-Button: leicht außerhalb der Box, oben rechts */
.hac-sp .hac-sp__close {
	-webkit-appearance: none;
	appearance: none;
	position: absolute;
	top: -14px;
	right: -14px;
	z-index: 2;
	display: block;
	width: 32px;
	height: 32px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	border-radius: 50%;
	background: #fff;
	color: #1d2327;
	font-size: 0;
	line-height: 0;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
	transition: transform .15s ease;
}

.hac-sp .hac-sp__close:hover {
	transform: scale(1.1);
	background: #fff;
	color: #1d2327;
}

/* Fokus-Ring nur bei Tastatur-Bedienung, dezent */
.hac-sp .hac-sp__close:focus {
	outline: 0;
}

.hac-sp .hac-sp__close:focus-visible {
	box-shadow: 0 2px 10px rgba(0, 0, 0, .35), 0 0 0 2px #fff, 0 0 0 4px #1d2327;
}

.hac-sp__box:focus {
	outline: 0;
}

.hac-sp__close-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 14px;
	transform: translate(-50%, -50%);
}

.hac-sp__close-icon::before,
.hac-sp__close-icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 2px;
	margin-top: -1px;
	background: currentColor;
	border-radius: 1px;
}

.hac-sp__close-icon::before { transform: rotate(45deg); }
.hac-sp__close-icon::after  { transform: rotate(-45deg); }

/* Stil: eckig */
.hac-sp--square .hac-sp__inner,
.hac-sp.hac-sp--square .hac-sp__close {
	border-radius: 0;
}

.hac-sp--square .hac-sp__close-icon::before,
.hac-sp--square .hac-sp__close-icon::after {
	border-radius: 0;
}

html.hac-sp-lock {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.hac-sp,
	.hac-sp__box,
	.hac-sp__close {
		transition: none;
		transform: none;
	}
}
