/**
 * Simplified HWD popup frontend.
 *
 * One component is shared by desktop, tablet, mobile and the admin preview.
 */

.hwd-sp,
.hwd-sp *,
.hwd-sp *::before,
.hwd-sp *::after,
.hwd-sp__card,
.hwd-sp__card *,
.hwd-sp__card *::before,
.hwd-sp__card *::after {
	box-sizing: border-box;
}

.hwd-sp {
	--hwd-sp-safe-top: calc(18px + env(safe-area-inset-top, 0px));
	--hwd-sp-safe-right: calc(18px + env(safe-area-inset-right, 0px));
	--hwd-sp-safe-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
	--hwd-sp-safe-left: calc(18px + env(safe-area-inset-left, 0px));
	position: fixed;
	z-index: 2147483000;
	width: min(var(--hwd-sp-max-width, 430px), calc(100vw - 36px));
	margin: 0;
	padding: 0;
	color: var(--hwd-sp-text, #fff);
	font-family: inherit;
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	letter-spacing: normal;
	line-height: 1.5;
	text-align: left;
	text-transform: none;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 220ms ease, visibility 220ms ease;
}

.hwd-sp[hidden] {
	display: none !important;
}

.hwd-sp.is-visible {
	visibility: visible;
	opacity: 1;
}

.hwd-sp--position-top-left {
	top: var(--hwd-sp-safe-top);
	left: var(--hwd-sp-safe-left);
}

.hwd-sp--position-top-right {
	top: var(--hwd-sp-safe-top);
	right: var(--hwd-sp-safe-right);
}

.hwd-sp--position-bottom-left {
	bottom: var(--hwd-sp-safe-bottom);
	left: var(--hwd-sp-safe-left);
}

.hwd-sp--position-bottom-right {
	right: var(--hwd-sp-safe-right);
	bottom: var(--hwd-sp-safe-bottom);
}

.hwd-sp--position-center {
	inset: 0;
	display: grid;
	place-items: center;
	width: 100%;
	max-width: none;
	height: 100%;
	min-height: 100dvh;
	padding: max(20px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
}

.hwd-sp--position-top-bar,
.hwd-sp--position-bottom-bar {
	left: 0;
	width: 100%;
	max-width: none;
}

.hwd-sp--position-top-bar {
	top: 0;
}

.hwd-sp--position-bottom-bar {
	bottom: 0;
}

.admin-bar .hwd-sp--position-top-left,
.admin-bar .hwd-sp--position-top-right {
	top: calc(var(--hwd-sp-safe-top) + 32px);
}

.admin-bar .hwd-sp--position-top-bar {
	top: 32px;
}

.hwd-sp__backdrop {
	position: fixed;
	inset: 0;
	display: none;
	background: rgba(17, 16, 15, 0.72);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
	pointer-events: auto;
}

.hwd-sp--position-center .hwd-sp__backdrop {
	display: block;
}

.hwd-sp__card {
	position: relative;
	isolation: isolate;
	display: grid;
	width: 100%;
	max-width: var(--hwd-sp-max-width, 430px);
	max-height: calc(100dvh - 40px);
	margin: 0;
	padding: 0;
	overflow: hidden auto;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 16px;
	background: #24211e;
	box-shadow: 0 24px 70px rgba(22, 17, 11, 0.28), 0 3px 12px rgba(22, 17, 11, 0.14);
	color: var(--hwd-sp-text, #fff);
	font: inherit;
	pointer-events: auto;
	transform: none;
	transform-origin: center;
	transition: opacity 280ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
	-webkit-font-smoothing: antialiased;
}

.hwd-sp:not(.is-visible).hwd-sp--animation-rise .hwd-sp__card {
	transform: translateY(24px);
}

.hwd-sp:not(.is-visible).hwd-sp--animation-zoom .hwd-sp__card {
	transform: scale(0.94);
}

.hwd-sp:not(.is-visible).hwd-sp--animation-slide.hwd-sp--position-top-left .hwd-sp__card,
.hwd-sp:not(.is-visible).hwd-sp--animation-slide.hwd-sp--position-bottom-left .hwd-sp__card {
	transform: translateX(-32px);
}

.hwd-sp:not(.is-visible).hwd-sp--animation-slide.hwd-sp--position-top-right .hwd-sp__card,
.hwd-sp:not(.is-visible).hwd-sp--animation-slide.hwd-sp--position-bottom-right .hwd-sp__card {
	transform: translateX(32px);
}

.hwd-sp:not(.is-visible).hwd-sp--animation-slide.hwd-sp--position-center .hwd-sp__card,
.hwd-sp:not(.is-visible).hwd-sp--animation-slide.hwd-sp--position-top-bar .hwd-sp__card,
.hwd-sp:not(.is-visible).hwd-sp--animation-slide.hwd-sp--position-bottom-bar .hwd-sp__card {
	transform: translateY(24px);
}

.hwd-sp:not(.is-visible) .hwd-sp__card {
	opacity: 0;
	pointer-events: none;
}

.hwd-sp__media {
	position: absolute;
	z-index: -2;
	inset: 0;
	min-width: 0;
	min-height: 0;
	background-color: #3a332c;
	background-image: var(--hwd-sp-image, none);
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

.hwd-sp__shade {
	position: absolute;
	inset: 0;
	display: block;
	background: var(--hwd-sp-overlay, #11100f);
	opacity: var(--hwd-sp-overlay-opacity, 0.55);
}

.hwd-sp__content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 0;
	min-height: 100%;
	padding: 48px 38px 38px;
	text-align: center;
}

.hwd-sp__copy {
	display: flex;
	flex-direction: column;
	align-items: inherit;
	width: 100%;
	min-width: 0;
}

.hwd-sp__eyebrow,
.hwd-sp__title,
.hwd-sp__subtitle,
.hwd-sp__description {
	max-width: 100%;
	margin-right: 0 !important;
	margin-left: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	color: inherit !important;
	font-family: inherit;
	font-style: normal;
	text-decoration: none;
	text-transform: none;
}

.hwd-sp__eyebrow {
	margin-top: 0 !important;
	margin-bottom: 16px !important;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.18em;
	line-height: 1.3;
	text-transform: uppercase;
}

.hwd-sp__title {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	font-size: clamp(30px, 3.2vw, 43px);
	font-weight: 500;
	letter-spacing: -0.035em;
	line-height: 1.04;
	text-wrap: balance;
}

.hwd-sp__subtitle {
	margin-top: 18px !important;
	margin-bottom: 0 !important;
	font-size: 18px;
	font-weight: 600;
	letter-spacing: -0.012em;
	line-height: 1.35;
	text-wrap: balance;
}

.hwd-sp__description {
	margin-top: 18px !important;
	margin-bottom: 0 !important;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.55;
	text-wrap: pretty;
}

.hwd-sp__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: center;
	gap: 10px;
	width: 100%;
	margin-top: 28px;
}

.hwd-sp__button {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 46px;
	margin: 0 !important;
	padding: 11px 19px !important;
	border: 1px solid transparent !important;
	border-radius: 8px;
	box-shadow: none !important;
	font-family: inherit;
	font-size: 14px;
	font-weight: 650;
	letter-spacing: 0;
	line-height: 1.25;
	text-align: center;
	text-decoration: none !important;
	text-transform: none;
	cursor: pointer;
	transition: filter 160ms ease, transform 160ms ease, background-color 160ms ease;
}

.hwd-sp__button--primary {
	background: var(--hwd-sp-button, #f2dfca) !important;
	color: var(--hwd-sp-button-text, #211d19) !important;
}

.hwd-sp__button--secondary {
	border-color: currentColor !important;
	background: transparent !important;
	color: inherit !important;
}

.hwd-sp--preview .hwd-sp__button.is-incomplete {
	border-style: dashed !important;
	opacity: 0.58;
}

.hwd-sp__button:hover,
.hwd-sp__button:focus-visible {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

.hwd-sp__button:focus-visible,
.hwd-sp__close:focus-visible,
.hwd-sp__card:focus-visible {
	outline: 3px solid var(--hwd-sp-accent, #b8925d) !important;
	outline-offset: 3px;
}

.hwd-sp__close {
	position: absolute;
	z-index: 4;
	top: 13px;
	right: 13px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid rgba(255, 255, 255, 0.25) !important;
	border-radius: 999px;
	background: rgba(20, 18, 16, 0.46) !important;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12) !important;
	color: #fff !important;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.hwd-sp__close span,
.hwd-sp__close span::after {
	position: absolute;
	display: block;
	width: 15px;
	height: 1.5px;
	border-radius: 2px;
	background: currentColor;
	content: "";
}

.hwd-sp__close span {
	transform: rotate(45deg);
}

.hwd-sp__close span::after {
	transform: rotate(90deg);
}

/* Immersive offer card, modeled on the supplied hotel offer. */
.hwd-sp__card--offer {
	min-height: min(530px, calc(100dvh - 36px));
	border-radius: 17px;
}

.hwd-sp__card--offer .hwd-sp__content {
	justify-content: space-between;
	padding-top: 64px;
}

.hwd-sp__card--offer .hwd-sp__copy {
	margin-top: auto;
	margin-bottom: auto;
}

.hwd-sp__card--offer .hwd-sp__description {
	max-width: 34ch;
	font-size: 17px;
	font-weight: 520;
}

/* A clean, centered general-purpose popup. */
.hwd-sp__card--classic {
	min-height: 360px;
}

.hwd-sp__card--classic .hwd-sp__content {
	padding: 58px 48px 46px;
}

/* Compact notification; it still supports an optional image. */
.hwd-sp__card--notice {
	min-height: 0;
	border-color: rgba(36, 33, 30, 0.12);
	background: #fff;
	box-shadow: 0 18px 50px rgba(36, 33, 30, 0.18);
}

.hwd-sp__card--notice:not(.hwd-sp__card--has-image) .hwd-sp__media {
	display: none;
}

.hwd-sp__card--notice .hwd-sp__content {
	align-items: flex-start;
	padding: 28px 56px 27px 26px;
	text-align: left;
}

.hwd-sp__card--notice .hwd-sp__eyebrow {
	margin-bottom: 9px !important;
	color: var(--hwd-sp-accent, #b8925d) !important;
}

.hwd-sp__card--notice .hwd-sp__title {
	font-size: clamp(22px, 2.2vw, 28px);
}

.hwd-sp__card--notice .hwd-sp__subtitle,
.hwd-sp__card--notice .hwd-sp__description {
	margin-top: 10px !important;
	font-size: 14px;
}

.hwd-sp__card--notice .hwd-sp__actions {
	justify-content: flex-start;
	margin-top: 18px;
}

.hwd-sp__card--notice .hwd-sp__close {
	border-color: rgba(36, 33, 30, 0.16) !important;
	background: rgba(36, 33, 30, 0.08) !important;
	color: currentColor !important;
}

/* Full-width horizontal banner. */
.hwd-sp__card--banner,
.hwd-sp--position-top-bar .hwd-sp__card,
.hwd-sp--position-bottom-bar .hwd-sp__card {
	width: 100%;
	max-width: none;
	min-height: 90px;
	max-height: min(50dvh, 360px);
	border-width: 0;
	border-radius: 0;
	box-shadow: 0 7px 26px rgba(22, 17, 11, 0.2);
}

.hwd-sp__card--banner .hwd-sp__content,
.hwd-sp--position-top-bar .hwd-sp__content,
.hwd-sp--position-bottom-bar .hwd-sp__content {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	column-gap: 28px;
	width: min(var(--hwd-sp-max-width, 1200px), calc(100% - 100px));
	min-height: 90px;
	margin: auto;
	padding: 16px 0;
	text-align: left;
}

.hwd-sp__card--banner .hwd-sp__copy,
.hwd-sp--position-top-bar .hwd-sp__copy,
.hwd-sp--position-bottom-bar .hwd-sp__copy {
	align-items: flex-start;
}

.hwd-sp__card--banner .hwd-sp__eyebrow,
.hwd-sp--position-top-bar .hwd-sp__eyebrow,
.hwd-sp--position-bottom-bar .hwd-sp__eyebrow {
	margin-bottom: 5px !important;
}

.hwd-sp__card--banner .hwd-sp__title,
.hwd-sp--position-top-bar .hwd-sp__title,
.hwd-sp--position-bottom-bar .hwd-sp__title {
	font-size: clamp(20px, 2.2vw, 30px);
}

.hwd-sp__card--banner .hwd-sp__subtitle,
.hwd-sp__card--banner .hwd-sp__description,
.hwd-sp--position-top-bar .hwd-sp__subtitle,
.hwd-sp--position-top-bar .hwd-sp__description,
.hwd-sp--position-bottom-bar .hwd-sp__subtitle,
.hwd-sp--position-bottom-bar .hwd-sp__description {
	margin-top: 5px !important;
	font-size: 14px;
}

.hwd-sp__card--banner .hwd-sp__actions,
.hwd-sp--position-top-bar .hwd-sp__actions,
.hwd-sp--position-bottom-bar .hwd-sp__actions {
	flex-wrap: nowrap;
	width: auto;
	margin-top: 0;
}

.hwd-sp__card--banner .hwd-sp__close,
.hwd-sp--position-top-bar .hwd-sp__close,
.hwd-sp--position-bottom-bar .hwd-sp__close {
	top: 50%;
	right: 14px;
	transform: translateY(-50%);
}

/* Desktop image/text split using the same content as mobile. */
.hwd-sp__card--split {
	grid-template-columns: minmax(240px, 0.95fr) minmax(300px, 1.05fr);
	min-height: 460px;
	background: #fff;
	color: var(--hwd-sp-text, #24211e);
}

.hwd-sp__card--split .hwd-sp__media {
	position: relative;
	z-index: auto;
	grid-column: 1;
	grid-row: 1;
}

.hwd-sp__card--split .hwd-sp__content {
	grid-column: 2;
	grid-row: 1;
	align-items: flex-start;
	padding: 58px 45px 46px;
	text-align: left;
}

.hwd-sp__card--split .hwd-sp__actions {
	justify-content: flex-start;
}

.hwd-sp__card--split .hwd-sp__close {
	border-color: rgba(36, 33, 30, 0.15) !important;
	background: rgba(36, 33, 30, 0.08) !important;
	color: currentColor !important;
}

/* Editor preview: never fixed, hidden or interactive. */
.hwd-sp--preview {
	position: relative !important;
	z-index: 1;
	inset: auto !important;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: none;
	height: auto;
	min-height: 0;
	padding: 22px;
	visibility: visible;
	opacity: 1;
	pointer-events: none;
}

.hwd-sp--preview .hwd-sp__card {
	max-height: none;
	transform: none !important;
	opacity: 1 !important;
}

.hwd-sp__card--preview {
	max-height: none;
	transform: none !important;
	opacity: 1 !important;
	pointer-events: none;
}

.hwd-sp--preview .hwd-sp__button,
.hwd-sp--preview .hwd-sp__close {
	pointer-events: none;
}

.hwd-sp--preview.hwd-sp--position-top-bar .hwd-sp__card,
.hwd-sp--preview.hwd-sp--position-bottom-bar .hwd-sp__card {
	width: 100%;
}

body.hwd-sp-modal-open {
	overflow: hidden !important;
}

@media (max-width: 1024px) {
	.hwd-sp__card--split {
		grid-template-columns: minmax(210px, 0.8fr) minmax(280px, 1.2fr);
	}

	.hwd-sp__card--split .hwd-sp__content {
		padding-right: 36px;
		padding-left: 36px;
	}
}

@media (max-width: 782px) {
	.admin-bar .hwd-sp--position-top-left,
	.admin-bar .hwd-sp--position-top-right {
		top: calc(var(--hwd-sp-safe-top) + 46px);
	}

	.admin-bar .hwd-sp--position-top-bar {
		top: 46px;
	}
}

@media (max-width: 767px) {
	.hwd-sp {
		--hwd-sp-safe-top: calc(12px + env(safe-area-inset-top, 0px));
		--hwd-sp-safe-right: calc(12px + env(safe-area-inset-right, 0px));
		--hwd-sp-safe-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		--hwd-sp-safe-left: calc(12px + env(safe-area-inset-left, 0px));
		width: min(var(--hwd-sp-max-width, 430px), calc(100vw - 24px));
	}

	.hwd-sp--position-center {
		width: 100%;
		padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
	}

	.hwd-sp--position-top-bar,
	.hwd-sp--position-bottom-bar {
		width: 100%;
	}

	.hwd-sp__card {
		max-height: calc(100dvh - 24px);
		border-radius: 14px;
	}

	.hwd-sp__content,
	.hwd-sp__card--classic .hwd-sp__content {
		padding: 46px 24px 28px;
	}

	.hwd-sp__title {
		font-size: clamp(28px, 9vw, 38px);
	}

	.hwd-sp__subtitle {
		font-size: 17px;
	}

	.hwd-sp__description,
	.hwd-sp__card--offer .hwd-sp__description {
		font-size: 15px;
	}

	.hwd-sp__actions {
		flex-direction: column;
		gap: 9px;
	}

	.hwd-sp__button {
		width: 100%;
	}

	.hwd-sp__card--offer {
		min-height: min(510px, calc(100dvh - 24px));
	}

	.hwd-sp__card--offer .hwd-sp__content {
		padding-top: 57px;
	}

	.hwd-sp__card--notice .hwd-sp__content {
		padding: 25px 52px 24px 22px;
	}

	.hwd-sp__card--notice .hwd-sp__actions {
		align-items: stretch;
	}

	.hwd-sp__card--banner,
	.hwd-sp--position-top-bar .hwd-sp__card,
	.hwd-sp--position-bottom-bar .hwd-sp__card {
		max-height: min(70dvh, 520px);
		border-radius: 0;
	}

	.hwd-sp__card--banner .hwd-sp__content,
	.hwd-sp--position-top-bar .hwd-sp__content,
	.hwd-sp--position-bottom-bar .hwd-sp__content {
		display: flex;
		align-items: flex-start;
		width: 100%;
		padding: 24px 54px 24px 20px;
		text-align: left;
	}

	.hwd-sp__card--banner .hwd-sp__actions,
	.hwd-sp--position-top-bar .hwd-sp__actions,
	.hwd-sp--position-bottom-bar .hwd-sp__actions {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: flex-start;
		width: 100%;
		margin-top: 16px;
	}

	.hwd-sp__card--banner .hwd-sp__button,
	.hwd-sp--position-top-bar .hwd-sp__button,
	.hwd-sp--position-bottom-bar .hwd-sp__button {
		width: auto;
	}

	.hwd-sp__card--banner .hwd-sp__close,
	.hwd-sp--position-top-bar .hwd-sp__close,
	.hwd-sp--position-bottom-bar .hwd-sp__close {
		top: 13px;
		right: 12px;
		transform: none;
	}

	.hwd-sp__card--split {
		grid-template-columns: 1fr;
		grid-template-rows: minmax(190px, 34dvh) auto;
		min-height: 0;
	}

	.hwd-sp__card--split .hwd-sp__media {
		grid-column: 1;
		grid-row: 1;
	}

	.hwd-sp__card--split .hwd-sp__content {
		grid-column: 1;
		grid-row: 2;
		padding: 42px 25px 29px;
	}

	.hwd-sp--preview {
		width: 100%;
		padding: 14px;
	}

	.hwd-sp--preview .hwd-sp__card,
	.hwd-sp--preview .hwd-sp__card--preview {
		max-height: 666px;
	}

	.hwd-sp--preview .hwd-sp__card--banner {
		max-height: 483px;
	}
}

@media (max-width: 480px) {
	.hwd-sp__card--banner .hwd-sp__actions,
	.hwd-sp--position-top-bar .hwd-sp__actions,
	.hwd-sp--position-bottom-bar .hwd-sp__actions {
		flex-direction: column;
	}

	.hwd-sp__card--banner .hwd-sp__button,
	.hwd-sp--position-top-bar .hwd-sp__button,
	.hwd-sp--position-bottom-bar .hwd-sp__button {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hwd-sp,
	.hwd-sp__card,
	.hwd-sp__button {
		scroll-behavior: auto !important;
		transition-duration: 1ms !important;
		animation-duration: 1ms !important;
	}
}
