/*
 * Newsletter-Modal (Lightbox auf Front-Page)
 *
 * Klassennamen 1:1 aus additional/layout/index.html (.nl-modal, .nl-backdrop,
 * .nl-box, .nl-cats, .nl-cat, .nl-row, .nl-email, .nl-btn, .nl-consent).
 */

.nl-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: var(--ln-z-modal);
	align-items: center;
	justify-content: center;
}

.nl-modal.is-open {
	display: flex;
}

.nl-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(2px);
}

.nl-box {
	position: relative;
	background: var(--ln-white);
	border-radius: 8px;
	padding: 40px;
	max-width: 560px;
	width: calc(100% - 32px);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	max-height: calc(100vh - 32px);
	overflow-y: auto;
}

.nl-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 32px;
	height: 32px;
	border: none;
	background: var(--ln-light);
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ln-mid);
	transition: all 0.2s;
}

.nl-close:hover {
	background: var(--ln-border);
	color: var(--ln-dark);
}

.nl-title {
	font-size: 22px;
	font-weight: 900;
	color: var(--ln-dark);
	margin-bottom: 8px;
	text-align: center;
}

.nl-sub {
	font-size: 14px;
	color: var(--ln-mid);
	line-height: 1.6;
	margin-bottom: 20px;
	text-align: center;
}

.nl-cats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
	margin-bottom: 20px;
}

.nl-cat {
	position: relative;
	height: 88px;
	overflow: hidden;
	border-radius: var(--ln-radius-sm);
	cursor: pointer;
	border: 2px solid transparent;
	transition: border-color 0.2s, transform 0.2s;
	display: flex;
	align-items: flex-end;
	padding: 12px;
}

.nl-cat:hover {
	transform: translateY(-1px);
}

.nl-cat.is-selected,
.nl-cat:has(input:checked) {
	border-color: var(--ln-primary);
}

.nl-cat-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	z-index: 0;
}

.nl-cat-ov {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 100%);
	z-index: 1;
}

.nl-cat-name {
	position: relative;
	z-index: 2;
	font-size: 14px;
	font-weight: 800;
	color: var(--ln-white);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.nl-row {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.nl-email {
	flex: 1;
	padding: 12px 14px;
	border: 1px solid var(--ln-border);
	border-radius: var(--ln-radius-sm);
	font-size: 14px;
	color: var(--ln-dark);
	outline: none;
	transition: border-color 0.2s;
	font-family: inherit;
}

.nl-email:focus {
	border-color: var(--ln-primary);
}

.nl-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	background: var(--ln-primary);
	color: var(--ln-white);
	border: none;
	border-radius: var(--ln-radius-sm);
	font-weight: 800;
	font-size: 14px;
	cursor: pointer;
	transition: background 0.2s;
	white-space: nowrap;
}

.nl-btn:hover {
	background: var(--ln-primary-dark);
}

.nl-consent {
	font-size: 11px;
	color: var(--ln-mid);
	text-align: center;
	margin: 0;
	line-height: 1.5;
}

.nl-status {
	min-height: 16px;
	font-size: 12px;
	margin-top: 8px;
	text-align: center;
}

.nl-status.is-success {
	color: #16a34a;
}

.nl-status.is-error {
	color: #dc2626;
}

@media (max-width: 480px) {
	.nl-box {
		padding: 24px;
	}
	.nl-cats {
		grid-template-columns: 1fr;
	}
	.nl-row {
		flex-direction: column;
	}
	.nl-btn {
		justify-content: center;
	}
}
