/*
 * ARMED Banners — banner on the site.
 * Desktop (768 px and wider): card 340 × 410 at the bottom right, above the WPFront "scroll to top" button.
 * Mobile (up to 767 px): full-width sheet at the bottom of the screen.
 * Fonts come from the theme: its Montserrat-SemiBold and Montserrat-Medium faces are declared
 * with font-weight: normal, so every rule keeps font-weight: 400 to avoid synthetic bold.
 */

.armed-banner {
	/* WPFront button: 90 px from the bottom + 64 px high + 16 px gap. */
	--armed-banner-bottom: 170px;
	--armed-banner-max-height: calc(100vh - var(--armed-banner-bottom) - 16px);

	position: fixed;
	right: 32px;
	bottom: var(--armed-banner-bottom);
	z-index: 900;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	width: 340px;
	min-height: min(410px, var(--armed-banner-max-height));
	max-height: var(--armed-banner-max-height);
	margin: 0;
	padding: 12px;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	border: 0;
	border-radius: 24px;
	background: #40508e;
	box-shadow: 0 12px 32px rgba(24, 25, 28, .2);
	color: #5f6577;
	font-family: "Montserrat-Medium", "Montserrat", Arial, sans-serif;
	font-weight: 400;
	font-style: normal;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	animation: armed-banner-in .2s ease-out both;
}

@supports (height: 100dvh) {
	.armed-banner {
		--armed-banner-max-height: calc(100dvh - var(--armed-banner-bottom) - 16px);
	}
}

.armed-banner[hidden],
.armed-banner__bg[hidden] {
	display: none;
}

.armed-banner *,
.armed-banner *::before,
.armed-banner *::after {
	box-sizing: border-box;
}

@keyframes armed-banner-in {
	from {
		opacity: 0;
		transform: translateY(16px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.armed-banner__bg {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	object-fit: cover;
	object-position: 50% 20%;
}

.armed-banner__close,
.armed-banner__btn {
	-webkit-appearance: none;
	appearance: none;
	min-width: 0;
	min-height: 0;
	margin: 0;
	border: 0;
	font-family: "Montserrat-SemiBold", "Montserrat", Arial, sans-serif;
	font-weight: 400;
	font-style: normal;
	text-transform: none;
	letter-spacing: normal;
	text-decoration: none;
	cursor: pointer;
}

.armed-banner__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(24, 25, 28, .18);
	color: #2a357a;
	line-height: 1;
}

.armed-banner__close svg {
	display: block;
	width: 12px;
	height: 12px;
}

.armed-banner__plate {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	gap: 10px;
	/* Pushes the plate to the bottom; extra content scrolls instead of being cut at the top. */
	margin-top: auto;
	padding: 20px;
	border-radius: 16px;
	background: #daeaf9;
}

.armed-banner__deco {
	position: absolute;
	top: 24px;
	right: 20px;
	display: block;
	width: 40px;
	height: 14px;
	color: #40508e;
}

.armed-banner__title,
.armed-banner__text {
	margin: 0;
	padding: 0;
	overflow-wrap: break-word;
}

.armed-banner__title {
	font-family: "Montserrat-SemiBold", "Montserrat", Arial, sans-serif;
	font-weight: 400;
}

.armed-banner__title-big {
	display: block;
	/* Keeps a long title clear of the chevrons. */
	padding-right: 52px;
	color: #40508e;
	font-size: 40px;
	line-height: 1;
	letter-spacing: .01em;
	text-transform: uppercase;
}

.armed-banner__title-rest {
	display: block;
	margin-top: 6px;
	color: #2a357a;
	font-size: 18px;
	line-height: 1.3;
}

.armed-banner__text {
	color: #5f6577;
	font-size: 14px;
	line-height: 1.5;
}

.armed-banner__btn {
	align-self: flex-start;
	height: 44px;
	margin-top: 4px;
	padding: 0 28px;
	border-radius: 100px;
	background: #40508e;
	box-shadow: none;
	color: #fff;
	font-size: 14px;
	line-height: 44px;
	white-space: nowrap;
	transition: background-color .2s;
}

.armed-banner__btn:hover {
	background: #2a357a;
	color: #fff;
}

/* Mouse clicks get no ring; keyboard focus gets the ring below. Browsers without :focus-visible keep their default. */
.armed-banner__close:focus:not(:focus-visible),
.armed-banner__btn:focus:not(:focus-visible) {
	outline: none;
}

.armed-banner__close:focus-visible,
.armed-banner__btn:focus-visible {
	/* Transparent outline stays visible in Windows high-contrast mode. */
	outline: 2px solid transparent;
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2a357a;
}

@media (max-width: 767px) {
	.armed-banner {
		--armed-banner-max-height: calc(100vh - 16px);

		right: 0;
		bottom: 0;
		left: 0;
		width: auto;
		min-height: min(calc(400px + env(safe-area-inset-bottom, 0px)), var(--armed-banner-max-height));
		padding: 12px 12px calc(16px + env(safe-area-inset-bottom, 0px));
		border-radius: 24px 24px 0 0;
		box-shadow: 0 -8px 32px rgba(24, 25, 28, .2);
	}

	@supports (height: 100dvh) {
		.armed-banner {
			--armed-banner-max-height: calc(100dvh - 16px);
		}
	}

	.armed-banner__close {
		width: 44px;
		height: 44px;
	}

	.armed-banner__close svg {
		width: 16px;
		height: 16px;
	}

	.armed-banner__text {
		font-size: 15px;
	}

	.armed-banner__btn {
		align-self: stretch;
		height: 48px;
		padding: 0 16px;
		font-size: 15px;
		line-height: 48px;
	}

	/* The sheet covers the WPFront "scroll to top" button while it's open. */
	html.armed-banner-open #wpfront-scroll-top-container {
		visibility: hidden;
	}
}

@media (prefers-reduced-motion: reduce) {
	.armed-banner {
		animation: none;
	}

	.armed-banner__btn {
		transition: none;
	}
}

@media (forced-colors: active) {
	.armed-banner,
	.armed-banner__plate {
		border: 1px solid CanvasText;
	}
}

@media print {
	.armed-banner {
		display: none !important;
	}
}
