/**
 * „Wichtige Hinweise" – Modal (Notfall, rot #c31f30, kompletter Rahmen) + Banner (navy/gelb).
 * Self-contained, alle Klassen unter .swisttal-wh…  (kein Theme-CSS betroffen).
 */

.swisttal-wh {
	--wh-red: #c31f30;
	--wh-navy: #143149;
	--wh-yellow: #ffd700;
	--wh-yellow-hover: #eac500;
	--wh-ink: #15212b;
	--wh-white: #fff;
	box-sizing: border-box;
	font-family: inherit;
}

.swisttal-wh *,
.swisttal-wh *::before,
.swisttal-wh *::after {
	box-sizing: border-box;
}

.swisttal-wh[hidden] {
	display: none !important;
}

/* Gemeinsame Bausteine ------------------------------------------------ */
.swisttal-wh__label {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 44px 12px 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.swisttal-wh__badge {
	display: inline-grid;
	place-items: center;
	width: 24px;
	height: 24px;
	color: #fff;
	border-radius: 50%;
	font-weight: 800;
	line-height: 1;
}

.swisttal-wh__title {
	margin: 0 44px 12px 0;
	font-size: clamp(24px, 3vw, 32px);
	font-weight: 700;
	line-height: 1.15;
}

.swisttal-wh__text {
	margin: 0;
	font-size: 17px;
	line-height: 1.6;
}

.swisttal-wh__text > *:first-child { margin-top: 0; }
.swisttal-wh__text > *:last-child { margin-bottom: 0; }

.swisttal-wh__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
}

.swisttal-wh__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 20px;
	border: 2px solid transparent;
	border-radius: 0;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.swisttal-wh__btn--secondary {
	color: #1d2327;
	background: #e2e4e7;
	border-color: #c3c4c7;
}

.swisttal-wh__btn--secondary:hover {
	background: #d5d8dc;
}

/* „Verstanden" bei mehreren Buttons nach rechts absetzen. */
.swisttal-wh__btn--right {
	margin-left: auto;
}

.swisttal-wh__ext {
	display: inline-flex;
	align-items: center;
	margin-left: 2px;
}

.swisttal-wh__ext svg {
	width: 1em;
	height: 1em;
}

.swisttal-wh__close {
	position: absolute;
	top: 14px;
	right: 14px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 50%;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.swisttal-wh__close:hover {
	background: rgba(0, 0, 0, 0.08);
}

.swisttal-wh :focus-visible {
	outline: 3px solid #1167b1;
	outline-offset: 3px;
}

/* Wiederöffnen-Button (nach dem Schließen) --------------------------- */
.swisttal-wh__reopen {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 999998;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-height: 46px;
	padding: 10px 18px;
	color: #fff;
	background: var(--wh-red, #c31f30);
	border: 0;
	border-radius: 999px;
	box-shadow: 0 9px 28px rgba(0, 0, 0, 0.24);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.swisttal-wh__reopen[hidden] { display: none !important; }

.swisttal-wh__reopen::before {
	content: "!";
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	color: var(--wh-red, #c31f30);
	background: #fff;
	border-radius: 50%;
	font-size: 13px;
	font-weight: 800;
}

/* ===== MODAL (Notfall, rot) ======================================== */
.swisttal-wh--modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 24px;
	background: rgba(12, 24, 33, 0.68);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

.swisttal-wh--modal .swisttal-wh__panel {
	position: relative;
	width: min(100%, 680px);
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	padding: 34px 38px 30px;
	color: var(--wh-ink);
	background: #fff;
	/* Kompletter roter Rahmen rundum. */
	border: 4px solid var(--wh-red, #c31f30);
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
	animation: swisttal-wh-in 220ms ease-out;
}

.swisttal-wh--modal .swisttal-wh__label { color: var(--wh-red, #c31f30); }
.swisttal-wh--modal .swisttal-wh__badge { background: var(--wh-red, #c31f30); }
.swisttal-wh--modal .swisttal-wh__title { color: var(--wh-ink); }
.swisttal-wh--modal .swisttal-wh__close { color: #55616b; }

.swisttal-wh--modal .swisttal-wh__btn--primary {
	color: #fff;
	background: var(--wh-red, #c31f30);
	border-color: var(--wh-red, #c31f30);
}

.swisttal-wh--modal .swisttal-wh__btn--primary:hover { filter: brightness(0.93); }

/* ===== BANNER (Info, navy/gelb) ==================================== */
.swisttal-wh--banner {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 999999;
	width: 100%;
	padding: 16px 0 max(16px, env(safe-area-inset-bottom));
	color: var(--wh-white);
	background: var(--wh-navy);
	box-shadow: 0 -7px 20px rgba(0, 0, 0, 0.18);
	animation: swisttal-wh-up 250ms ease-out;
}

.swisttal-wh--banner .swisttal-wh__panel {
	width: 100%;
	max-width: calc(1152px + 64px);
	margin: 0 auto;
	padding: 0 32px;
}

/* Gelb umrandeter Rahmen um Icon + Inhalt (Design-Vorgabe); X oben rechts darin. */
.swisttal-wh--banner .swisttal-wh__frame {
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 18px;
	align-items: flex-start;
	padding: 18px 56px 18px 22px;
	border: 2px solid var(--wh-yellow);
	border-radius: 0;
}

.swisttal-wh--banner .swisttal-wh__badge {
	width: 46px;
	height: 46px;
	color: var(--wh-navy);
	background: var(--wh-yellow);
	font-size: 24px;
}

/* Beim Banner steht das Badge als eigene Spalte links (kein Label-Flex). */
.swisttal-wh--banner .swisttal-wh__label {
	margin: 0 0 4px;
	color: var(--wh-yellow);
}

.swisttal-wh--banner .swisttal-wh__title { color: var(--wh-white); }
.swisttal-wh--banner .swisttal-wh__text { color: var(--wh-white); }

.swisttal-wh--banner .swisttal-wh__close {
	/* erbt position:absolute / top:14 / right:14 → oben rechts IM gelben Rahmen */
	color: var(--wh-white);
	border: 1px solid rgba(255, 255, 255, 0.5);
}

.swisttal-wh--banner .swisttal-wh__close:hover {
	color: var(--wh-navy);
	background: var(--wh-yellow);
	border-color: var(--wh-yellow);
}

.swisttal-wh--banner .swisttal-wh__btn--primary {
	color: var(--wh-navy);
	background: var(--wh-yellow);
	border-color: var(--wh-yellow);
}

.swisttal-wh--banner .swisttal-wh__btn--primary:hover { background: var(--wh-yellow-hover); }

.swisttal-wh--banner :focus-visible { outline-color: var(--wh-white); }

@keyframes swisttal-wh-in {
	from { opacity: 0; transform: translateY(12px) scale(0.985); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes swisttal-wh-up {
	from { opacity: 0; transform: translateY(100%); }
	to { opacity: 1; transform: translateY(0); }
}

/* Mobil -------------------------------------------------------------- */
@media (max-width: 640px) {
	.swisttal-wh--modal { align-items: end; padding: 12px; }
	.swisttal-wh--modal .swisttal-wh__panel { padding: 28px 22px 22px; }
	.swisttal-wh--banner .swisttal-wh__panel {
		padding: 0 16px;
		gap: 10px;
	}
	.swisttal-wh--banner .swisttal-wh__frame {
		grid-template-columns: 1fr;
		gap: 10px;
		padding: 14px 16px;
	}
	.swisttal-wh__actions .swisttal-wh__btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
	.swisttal-wh--modal .swisttal-wh__panel,
	.swisttal-wh--banner { animation: none; }
}
