/* =========================================================================
   FE Hinweise: Popups und Banner
   ====================================================================== */

:root {
	--fe-notice-banner-height: 0px;
	--fe-notice-red: var(--primary, #e6001e);
	--fe-notice-red-dark: var(--primary2, #b80018);
	--fe-notice-text: var(--black, #291d1e);
	--fe-notice-muted: var(--darkgrey, #6f6f6f);
	--fe-notice-bg: var(--lightgrey, #faf7f7);
	--fe-notice-green: #2e7d32;
	--fe-notice-grey: #8c8c8c;
	--fe-notice-blue: #0076b6;
}

html.fe-notice-lock,
html.fe-notice-lock body {
	overflow: hidden !important;
}

/* -------------------------------------------------------------------------
   Popup
   ---------------------------------------------------------------------- */

#top .fe-notice-popup {
	width: min(760px, calc(100vw - 32px));
	max-width: none;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 5px;
	background: #ffffff;
	color: var(--fe-notice-text);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	overflow: hidden;
}

#top .fe-notice-popup::backdrop {
	background: rgba(41, 29, 30, 0.55);
}

#top .fe-notice-popup.is-visible {
	animation: fe-notice-in 0.25s ease-out;
}

/* Fallback für Browser ohne <dialog> */
#top .fe-notice-popup.is-fallback {
	position: fixed;
	top: 50%;
	left: 50%;
	z-index: 100000;
	transform: translate(-50%, -50%);
	box-shadow: 0 0 0 100vmax rgba(41, 29, 30, 0.55), 0 20px 60px rgba(0, 0, 0, 0.25);
}

@keyframes fe-notice-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

#top .fe-notice-popup.is-fallback.is-visible {
	animation: none;
}

#top .fe-notice-popup__inner {
	position: relative;
	max-height: inherit;
	padding: 32px 32px 24px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

#top .fe-notice-popup__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--fe-notice-bg);
	color: var(--fe-notice-text);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

#top .fe-notice-popup__close:hover,
#top .fe-notice-popup__close:focus-visible {
	background: #ebebeb;
}

#top .fe-notice-popup__kicker {
	margin: 0 0 6px;
	padding-right: 40px;
	color: var(--fe-notice-red);
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	text-transform: none;
}

#top .fe-notice-popup__title {
	margin: 0 0 12px;
	padding-right: 40px;
	color: var(--fe-notice-text);
	font-size: 26px;
	line-height: 1.25;
	font-weight: 600;
}

#top .fe-notice-popup__text {
	font-size: 15px;
	line-height: 1.55;
}

#top .fe-notice-popup__text p {
	margin: 0 0 10px;
}

#top .fe-notice-popup__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	margin-top: 22px;
}

#top .fe-notice-popup__cta {
	display: inline-block;
	padding: 10px 22px;
	border-radius: 5px;
	background: var(--fe-notice-red);
	color: #ffffff;
	font-size: 16px;
	font-weight: 500;
	line-height: 20px;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

#top .fe-notice-popup__cta:hover,
#top .fe-notice-popup__cta:focus-visible {
	background: var(--fe-notice-red-dark);
	color: #ffffff;
	text-decoration: none;
}

#top .fe-notice-popup__dismiss {
	padding: 0;
	border: 0;
	background: none;
	color: var(--fe-notice-text);
	font-size: 15px;
	text-decoration: underline;
	cursor: pointer;
}

/* -------------------------------------------------------------------------
   Fristen (Popup und Shortcode)
   ---------------------------------------------------------------------- */

#top .fe-deadlines {
	margin: 18px 0 0;
}

#top .fe-deadlines ul.fe-deadlines__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

#top .fe-deadlines .fe-deadline {
	margin: 0;
	padding: 14px 16px;
	border: 1px solid #ebebeb;
	border-left: 4px solid var(--fe-notice-green);
	border-radius: 5px;
	background: var(--fe-notice-bg);
	list-style: none;
}

#top .fe-deadline.is-urgent {
	border-left-color: var(--fe-notice-red);
}

#top .fe-deadline.is-closed {
	border-left-color: var(--fe-notice-grey);
}

#top .fe-deadline.is-tbd {
	border-left-color: var(--fe-notice-blue);
}

#top .fe-deadline__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 10px;
	margin-bottom: 8px;
}

#top .fe-deadline__system {
	color: var(--fe-notice-text);
	font-size: 16px;
	font-weight: 700;
	line-height: 22px;
	text-decoration: none;
}

#top a.fe-deadline__system:hover,
#top a.fe-deadline__system:focus-visible {
	color: var(--fe-notice-red);
	text-decoration: underline;
}

#top .fe-deadline__badge {
	display: none;
	padding: 2px 9px;
	border-radius: 999px;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

#top .fe-deadline .fe-deadline__body {
	display: none;
}

#top .fe-deadline.is-open .fe-deadline__badge.fe-show-open {
	display: inline-block;
	background: var(--fe-notice-green);
}

#top .fe-deadline.is-urgent .fe-deadline__badge.fe-show-urgent {
	display: inline-block;
	background: var(--fe-notice-red);
}

#top .fe-deadline.is-closed .fe-deadline__badge.fe-show-closed {
	display: inline-block;
	background: var(--fe-notice-grey);
}

#top .fe-deadline.is-tbd .fe-deadline__badge.fe-show-tbd {
	display: inline-block;
	background: var(--fe-notice-blue);
}

#top .fe-deadline.is-open .fe-show-active,
#top .fe-deadline.is-urgent .fe-show-active,
#top .fe-deadline.is-closed .fe-deadline__body.fe-show-closed,
#top .fe-deadline.is-tbd .fe-deadline__body.fe-show-tbd {
	display: block;
}

#top .fe-deadline__line,
#top .fe-deadline__note,
#top .fe-deadline__countdown,
#top .fe-deadline__info {
	margin: 0;
	font-size: 14px;
	line-height: 21px;
}

#top .fe-deadline__line span {
	color: var(--fe-notice-muted);
}

#top .fe-deadline__line strong {
	color: var(--fe-notice-text);
	font-weight: 700;
}

#top .fe-deadline__note {
	color: var(--fe-notice-muted);
	font-size: 12px;
}

#top .fe-deadline__countdown {
	margin-top: 4px;
	color: var(--fe-notice-green);
	font-size: 13px;
	font-weight: 700;
}

#top .fe-deadline.is-urgent .fe-deadline__countdown {
	color: var(--fe-notice-red);
}

#top .fe-deadline__countdown:empty {
	display: none;
}

#top .fe-deadline__info {
	margin-top: 6px;
	color: var(--fe-notice-muted);
	font-size: 13px;
}

#top .fe-deadline.is-closed .fe-deadline__system {
	color: var(--fe-notice-muted);
}

#top .fe-deadlines__note {
	margin: 12px 0 0;
	color: var(--fe-notice-muted);
	font-size: 13px;
	line-height: 19px;
}

#top .fe-deadlines__all-closed {
	display: none;
	margin: 0 0 12px;
	padding: 12px 15px;
	border-left: 5px solid var(--fe-notice-red);
	border-radius: 5px;
	background: var(--fe-notice-bg);
	font-size: 14px;
	font-weight: 600;
	line-height: 21px;
}

#top .fe-deadlines.is-all-closed .fe-deadlines__all-closed {
	display: block;
}

/* -------------------------------------------------------------------------
   Rabattcode
   ---------------------------------------------------------------------- */

#top .fe-notice-coupon {
	position: relative;
	display: inline-flex;
	align-items: center;
	margin-top: 16px;
}

#top .fe-notice-coupon__code {
	padding: 5px 12px;
	border: 1px dashed var(--fe-notice-red);
	border-radius: 999px;
	background: #ffffff;
	color: var(--fe-notice-red);
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.06em;
	cursor: pointer;
	transition: transform 0.2s ease;
}

#top .fe-notice-coupon__code:hover,
#top .fe-notice-coupon__code:focus-visible {
	transform: translateY(-1px);
}

#top .fe-notice-coupon__message {
	position: absolute;
	left: 0;
	top: calc(100% + 6px);
	padding: 5px 10px;
	border-radius: 4px;
	background: #1f1f1f;
	color: #ffffff;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
	z-index: 2;
}

#top .fe-notice-coupon__message.is-visible {
	opacity: 1;
}

/* -------------------------------------------------------------------------
   Banner
   ---------------------------------------------------------------------- */

body.fe-notice-banner-visible {
	padding-top: var(--fe-notice-banner-height);
}

body.admin-bar.fe-notice-banner-visible {
	padding-top: calc(var(--fe-notice-banner-height) + 32px);
}

#top .fe-notice-banner {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 99999;
	max-width: 100vw;
	background: var(--secondary, #002857);
	color: #ffffff;
	font-family: inherit;
}

body.admin-bar .fe-notice-banner {
	top: 32px;
}

#top .fe-notice-banner[hidden] {
	display: none !important;
}

#top .fe-notice-banner__inner {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 16px;
	max-width: 1380px;
	margin: 0 auto;
	padding: 8px 56px 8px 24px;
	text-align: center;
	line-height: 1.35;
}

#top .fe-notice-banner__text {
	margin: 0;
	color: #ffffff;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
}

#top .fe-notice-banner__text strong {
	color: #ffffff;
	font-weight: 700;
}

#top .fe-notice-banner__text a {
	color: #ffffff;
	text-decoration: underline;
}

#top .fe-notice-banner__kicker {
	margin-right: 4px;
}

#top .fe-notice-banner__next {
	display: inline-block;
	margin-left: 6px;
	font-weight: 700;
}

#top .fe-notice-banner .fe-notice-coupon {
	margin-top: 0;
}

#top .fe-notice-banner .fe-notice-coupon__code {
	border: 1px solid rgba(255, 255, 255, 0.75);
	color: var(--secondary, #002857);
}

#top .fe-notice-banner__cta {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 5px;
	background: #ffffff;
	color: var(--secondary, #002857);
	font-size: 14px;
	font-weight: 600;
	line-height: 18px;
	text-decoration: none;
	white-space: nowrap;
}

#top .fe-notice-banner__cta:hover,
#top .fe-notice-banner__cta:focus-visible {
	background: #f0f0f0;
	color: var(--secondary, #002857);
	text-decoration: none;
}

#top .fe-notice-banner__close {
	position: absolute;
	top: 50%;
	right: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.16);
	color: #ffffff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transform: translateY(-50%);
	transition: background-color 0.2s ease;
}

#top .fe-notice-banner__close:hover,
#top .fe-notice-banner__close:focus-visible {
	background: rgba(255, 255, 255, 0.3);
}

/* -------------------------------------------------------------------------
   Mobil
   ---------------------------------------------------------------------- */

@media (max-width: 782px) {
	body.admin-bar .fe-notice-banner {
		top: 46px;
	}

	body.admin-bar.fe-notice-banner-visible {
		padding-top: calc(var(--fe-notice-banner-height) + 46px);
	}
}

@media (max-width: 640px) {
	#top .fe-notice-popup__inner {
		padding: 24px 18px 18px;
	}

	#top .fe-notice-popup__title {
		font-size: 21px;
	}

	#top .fe-deadlines ul.fe-deadlines__list {
		grid-template-columns: 1fr;
	}

	#top .fe-notice-popup__actions {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}

	#top .fe-notice-banner__inner {
		padding: 10px 44px 10px 14px;
		gap: 6px;
	}

	#top .fe-notice-banner__text {
		font-size: 13px;
		line-height: 18px;
	}

	#top .fe-notice-banner__close {
		right: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	#top .fe-notice-popup.is-visible {
		animation: none;
	}
}
