/**
 * Websel Announcement Popup Pro — the formats and animations the free core
 * does not ship. Loaded only on pages where a Pro announcement is rendered.
 */

/* ------------------------------------------------------------- bottom bar */

.wsap--bar_bottom .wsap__box {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 56px 12px 20px;
	box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.14);
	transform: translateY(100%);
}

.wsap--bar_bottom.is-open .wsap__box {
	transform: none;
}

.wsap--bar_bottom .wsap__image {
	width: 40px;
	height: 40px;
	flex: 0 0 auto;
	border-radius: 8px;
}

.wsap--bar_bottom .wsap__body {
	display: flex;
	flex: 1 1 auto;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 16px;
	padding: 0;
}

.wsap--bar_bottom .wsap__title {
	margin: 0;
	font-size: 16px;
}

.wsap--bar_bottom .wsap__text {
	font-size: 14px;
}

.wsap--bar_bottom .wsap__cta {
	margin: 0 0 0 auto;
	padding: 9px 20px;
	font-size: 14px;
	white-space: nowrap;
}

.wsap--bar_bottom .wsap__close {
	top: 50%;
	right: 14px;
	transform: translateY(-50%);
}

/* --------------------------------------------------------------- slide-in */

.wsap--slide_in .wsap__box {
	position: absolute;
	bottom: 20px;
	width: min(340px, calc(100% - 32px));
	border-radius: var(--wsap-radius);
	box-shadow: 0 18px 44px rgba(15, 23, 42, 0.26);
	overflow: hidden;
}

.wsap--slide_in.wsap--pos-right .wsap__box {
	right: 20px;
	transform: translateX(24px);
}

.wsap--slide_in.wsap--pos-left .wsap__box {
	left: 20px;
	transform: translateX(-24px);
}

.wsap--slide_in.is-open .wsap__box {
	transform: none;
}

.wsap--slide_in .wsap__body {
	padding: 20px 20px 22px;
}

.wsap--slide_in .wsap__title {
	font-size: 17px;
	margin-bottom: 8px;
}

.wsap--slide_in .wsap__text {
	font-size: 14px;
}

.wsap--slide_in .wsap__cta {
	margin-top: 14px;
	padding: 9px 18px;
	font-size: 14px;
}

.wsap--slide_in .wsap__image {
	max-height: 150px;
}

/* ------------------------------------------------------------- full screen */

.wsap--fullscreen {
	display: flex;
	align-items: center;
	justify-content: center;
}

.wsap--fullscreen .wsap__box {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 24px;
	text-align: center;
	transform: scale(1.02);
}

.wsap--fullscreen.is-open .wsap__box {
	transform: none;
}

.wsap--fullscreen .wsap__body {
	max-width: 620px;
}

.wsap--fullscreen .wsap__title {
	font-size: clamp(26px, 5vw, 42px);
	line-height: 1.15;
}

.wsap--fullscreen .wsap__text {
	font-size: 17px;
}

.wsap--fullscreen .wsap__image {
	max-width: 340px;
	max-height: 200px;
	margin: 0 auto 18px;
	border-radius: var(--wsap-radius);
}

.wsap--fullscreen .wsap__close {
	top: 18px;
	right: 18px;
}

/*
 * Animations replace the resting-state transform only while the announcement is
 * closed. The `:not(.is-open)` is what keeps that true: these rules are more
 * specific than the core's "is-open ⇒ no transform", so without it they would win
 * in the open state too and the box would never settle into place.
 */

.wsap--anim-slide.wsap--modal:not(.is-open) .wsap__box {
	transform: translateY(26px);
}

.wsap--anim-zoom.wsap--modal:not(.is-open) .wsap__box,
.wsap--anim-zoom.wsap--slide_in:not(.is-open) .wsap__box {
	transform: scale(0.94);
}

.wsap--anim-zoom.wsap--fullscreen:not(.is-open) .wsap__box {
	transform: scale(1.05);
}

.wsap--anim-none .wsap__box,
.wsap--anim-none .wsap__overlay {
	transition: none;
}

.wsap--anim-none .wsap__box {
	transform: none;
}

/* ------------------------------------------------------------- reopen tab */

.wsap__reopen {
	position: absolute;
	bottom: 0;
	right: 24px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 18px;
	border: 0;
	border-radius: var(--wsap-radius) var(--wsap-radius) 0 0;
	background: var(--wsap-accent);
	color: var(--wsap-cta-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	pointer-events: auto;
	cursor: pointer;
	box-shadow: 0 -4px 14px rgba(15, 23, 42, 0.18);
}

.wsap--pos-left .wsap__reopen {
	right: auto;
	left: 24px;
}

.wsap__reopen:hover {
	filter: brightness(1.08);
}

.wsap__reopen:focus-visible {
	outline: 2px solid var(--wsap-accent);
	outline-offset: 3px;
}

.wsap__reopen[hidden] {
	display: none;
}

/* ------------------------------------------------------------ small screens */

@media (max-width: 600px) {
	.wsap--slide_in .wsap__box {
		left: 16px;
		right: 16px;
		bottom: 16px;
		width: auto;
	}

	.wsap--bar_bottom .wsap__box {
		align-items: flex-start;
		padding: 12px 48px 12px 16px;
	}

	.wsap--bar_bottom .wsap__cta {
		margin: 4px 0 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wsap--bar_bottom .wsap__box,
	.wsap--slide_in .wsap__box,
	.wsap--fullscreen .wsap__box {
		transform: none;
	}
}
