/* Anmeldeformular im Overlay – ausgelöst vom Divi-Button oder vom eigenen. */

/* Auslöser: nur gestalten, wenn es KEIN Divi-Button ist. Sonst würden diese
   Regeln mit den Design-Einstellungen aus dem Divi-Builder streiten. */
.abpnl-popup-trigger:not(.et_pb_button) {
	display: inline-block;
	padding: .65rem 1.4rem;
	border: 0;
	border-radius: 4px;
	background: #1d2327;
	color: #fff;
	font-size: 1rem;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
}

.abpnl-popup-trigger:not(.et_pb_button):hover,
.abpnl-popup-trigger:not(.et_pb_button):focus {
	opacity: .9;
	color: #fff;
}

/* Overlay. Ohne JavaScript öffnet es der Anker über :target,
   mit JavaScript die Klasse is-open. */
.abpnl-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	align-items: flex-start;
	justify-content: center;
	padding: 1.5rem 1rem;
	overflow-y: auto;
}

.abpnl-modal:target,
.abpnl-modal.is-open {
	display: flex;
}

.abpnl-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .55);
}

.abpnl-modal__box {
	position: relative;
	width: 100%;
	max-width: 32rem;
	margin: auto;
	padding: 2rem;
	border-radius: 8px;
	background: #fff;
	color: #1d2327;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}

.abpnl-modal__title {
	margin: 0 0 1rem;
	padding-right: 2rem;
	font-size: 1.35rem;
	line-height: 1.3;
}

.abpnl-modal__close {
	position: absolute;
	top: .5rem;
	right: .5rem;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #50575e;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}

.abpnl-modal__close:hover,
.abpnl-modal__close:focus {
	background: #f0f0f1;
	color: #1d2327;
}

/* Im Overlay soll das Formular die volle Breite nutzen. */
.abpnl-modal .abpnl-form {
	max-width: none;
}

/* Seite hinter dem Overlay nicht mitscrollen lassen. */
body.abpnl-modal-open {
	overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
	.abpnl-modal.is-open .abpnl-modal__box,
	.abpnl-modal:target .abpnl-modal__box {
		animation: abpnl-modal-in .18s ease-out;
	}
}

@keyframes abpnl-modal-in {
	from { opacity: 0; transform: translateY(-.75rem); }
	to   { opacity: 1; transform: none; }
}
