.eip-modal {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.eip-modal[hidden] {
	display: none;
}

.eip-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	animation: eip-fade-in 0.2s ease-out;
}

.eip-modal__dialog {
	position: relative;
	z-index: 1;
	background: var(--eip-bg, #fff);
	color: var(--eip-color, #1a1a1a);
	border-radius: 0.5rem;
	max-width: 28rem;
	width: calc(100% - 2rem);
	padding: 2rem 1.75rem 1.5rem;
	box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.25);
	animation: eip-pop-in 0.25s ease-out;
	font-family: var(--eip-font, inherit);
}

.eip-modal__close {
	position: absolute;
	top: 0.5rem;
	right: 0.75rem;
	background: none;
	border: none;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	opacity: 0.6;
}

.eip-modal__close:hover {
	opacity: 1;
}

.eip-modal__content {
	margin-bottom: 1.25rem;
}

.eip-modal__content p:last-child {
	margin-bottom: 0;
}

.eip-modal__form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.eip-modal__input {
	flex: 1 1 12rem;
	padding: 0.65rem 0.85rem;
	border: 1px solid #ccc;
	border-radius: 0.35rem;
	font-size: 1rem;
}

.eip-modal__submit {
	flex: 0 0 auto;
	padding: 0.65rem 1.25rem;
	border: none;
	border-radius: 0.35rem;
	background: var(--eip-accent, #206bc4);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

.eip-modal__submit:disabled {
	opacity: 0.6;
	cursor: default;
}

.eip-modal__submit:hover:not(:disabled) {
	filter: brightness(1.05);
}

.eip-modal__honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.eip-modal__feedback {
	flex-basis: 100%;
	margin: 0.5rem 0 0;
	font-size: 0.9rem;
}

.eip-modal__feedback.is-success {
	color: #2f9e44;
}

.eip-modal__feedback.is-error {
	color: #d6336c;
}

body.eip-no-scroll {
	overflow: hidden;
}

@keyframes eip-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes eip-pop-in {
	from { opacity: 0; transform: scale(0.95) translateY(0.5rem); }
	to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Mobile Optimierung für Exit-Intent-Popup */
@media (max-width: 600px) {

	.eip-modal {
		padding: 1rem;
	}

	.eip-modal__dialog {
		width: calc(100% - 1rem);
		max-width: none;
		max-height: calc(100vh - 2rem);
		overflow-y: auto;

		padding: 1.25rem 1rem 1rem;

		border-radius: 0.4rem;
		font-size: 0.9rem;
	}

	.eip-modal__content {
		margin-bottom: 1rem;
	}

	.eip-modal__content p {
		margin-bottom: 0.75rem;
	}

	.eip-modal__close {
		top: 0.35rem;
		right: 0.5rem;
		font-size: 1.5rem;
	}

	.eip-modal__form {
		flex-direction: column;
		gap: 0.6rem;
	}

	.eip-modal__input {
		width: 100%;
		flex: none;
		font-size: 1rem;
		padding: 0.55rem 0.7rem;
	}

	.eip-modal__submit {
		width: 100%;
		padding: 0.6rem 1rem;
		font-size: 1rem;
	}
}