/* ==========================================================
   Relax Sauna Popup
   Uses the site's own branding (classy-child / Schema theme):
   --pColor #65a2d1 · --sColor #3476b1 · --aColor #dea97d
   Montserrat, uppercase buttons, 10px radius, gradient a.btn
   ========================================================== */

/* ---------- Main menu fit (desktop) ----------
   Keeps the whole main menu, including the Relax Sauna button, on one line.
   Sizes scale with the screen width and reach the theme's original values
   (17px text, 20px spacing, 250px logo) on wide screens. */
@media screen and (min-width: 866px) {
	html body #secondary-navigation {
		--rsp-nav-fs: clamp(12px, calc(0.625vw + 5.125px), 17px);
		--rsp-nav-pad: clamp(6px, calc(1.75vw - 13.25px), 20px);
	}

	html body #header #secondary-navigation .logo-wrap img {
		max-width: clamp(160px, calc(12vw + 22px), 250px);
		height: auto;
	}

	html body #secondary-navigation .navigation > ul.menu {
		margin-left: clamp(10px, calc(2.5vw - 17px), 30px);
	}

	html body #secondary-navigation .navigation > ul.menu > li > a {
		white-space: nowrap;
		font-size: var(--rsp-nav-fs) !important;
	}

	html body #secondary-navigation .navigation > ul.menu > li:not(.relax-sauna-menu-item) > a {
		padding-left: var(--rsp-nav-pad) !important;
		padding-right: var(--rsp-nav-pad) !important;
	}

	html body #secondary-navigation .navigation > ul.menu > li.menu-item-has-children > a {
		padding-right: calc(var(--rsp-nav-pad) + 16px) !important;
	}

	html body #secondary-navigation .navigation > ul.menu > li.menu-item-has-children > a:after {
		right: var(--rsp-nav-pad);
	}
}

/* Small laptops / tablets in landscape (866–1099px): logo on top,
   menu centered underneath so nothing gets squeezed. */
@media screen and (min-width: 866px) and (max-width: 1099px) {
	html body #secondary-navigation {
		flex-wrap: wrap;
		justify-content: center;
		--rsp-nav-fs: 13px;
		--rsp-nav-pad: 9px;
	}

	html body #header #secondary-navigation .logo-wrap {
		display: flex;
		justify-content: center;
		flex: 0 0 100%;
		max-width: 100%;
		padding: 6px 0 4px;
	}

	html body #header #secondary-navigation .logo-wrap img {
		max-width: 200px;
	}

	html body #header #secondary-navigation .navigation {
		width: 100% !important;
		margin: 0 !important;
	}

	html body #secondary-navigation .navigation > ul.menu {
		flex-wrap: wrap;
		justify-content: center;
		margin-left: 0 !important;
	}
}

/* ---------- Menu button (desktop) ---------- */
html body #secondary-navigation .menu > li.relax-sauna-menu-item {
	align-self: center;
	flex-shrink: 0;
	background: transparent !important;
}

html body #secondary-navigation .menu > li.relax-sauna-menu-item > a,
html body #secondary-navigation .menu > li.relax-sauna-menu-item:hover > a {
	display: inline-block;
	padding: 10px clamp(12px, calc(1vw + 2px), 20px) !important;
	border-radius: 10px;
	background: linear-gradient(90deg, var(--aColor, #dea97d) 0%, var(--sColor, #3476b1) 100%);
	color: #fff !important;
	letter-spacing: 1px;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
	text-decoration: none;
	transition: opacity .2s ease;
}

html body #secondary-navigation .menu > li.relax-sauna-menu-item:hover > a {
	opacity: .9;
}

html body #secondary-navigation .menu > li.relax-sauna-menu-item > a:focus-visible {
	outline: 2px solid var(--pColor, #65a2d1);
	outline-offset: 2px;
}

/* ---------- Menu button (mobile slide-out menu, theme breakpoint 865px) ---------- */
@media screen and (max-width: 865px) {
	html body #secondary-navigation .menu > li.relax-sauna-menu-item {
		padding: 16px 20px !important;
		box-sizing: border-box;
	}

	html body #secondary-navigation .menu > li.relax-sauna-menu-item > a,
	html body #secondary-navigation .menu > li.relax-sauna-menu-item:hover > a {
		display: block;
		width: 100% !important;
		margin: 0 !important;
		padding: 12px 16px !important;
		font-size: 16px !important;
		border: 0 !important;
		box-sizing: border-box;
		text-align: center !important;
		text-indent: 0 !important;
	}
}

/* ---------- Popup ---------- */
html.rsp-open,
html.rsp-open body {
	overflow: hidden;
}

.rsp-overlay[hidden] {
	display: none !important;
}

.rsp-overlay {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, .6);
	opacity: 0;
	transition: opacity .25s ease;
	box-sizing: border-box;
}

.rsp-overlay.is-visible {
	opacity: 1;
}

.rsp-overlay *,
.rsp-overlay *::before,
.rsp-overlay *::after {
	box-sizing: border-box;
}

.rsp-dialog {
	position: relative;
	display: flex;
	width: 100%;
	max-width: 960px;
	max-height: calc(100vh - 40px);
	overflow: hidden;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 20px 30px -10px rgba(38, 115, 228, .2), 0 30px 70px rgba(0, 0, 0, .35);
	color: #000;
	text-align: left;
	transform: translateY(16px) scale(.98);
	transition: transform .25s ease;
}

.rsp-overlay.is-visible .rsp-dialog {
	transform: none;
}

/* Image always fills its column, whatever the theme does to <img> */
.rsp-media {
	position: relative;
	flex: 0 0 42%;
	overflow: hidden;
	background: var(--sColor, #3476b1);
}

.rsp-overlay .rsp-media img,
.rsp-overlay .rsp-media .rsp-image {
	position: absolute !important;
	top: 0;
	left: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	border-radius: 0 !important;
	object-fit: cover;
	object-position: 62% 40%;
}

.rsp-body {
	flex: 1 1 auto;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 48px 48px 44px;
}

.rsp-overlay .rsp-title {
	margin: 0 0 6px;
	padding: 0;
	font-family: inherit;
	font-size: 36px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: normal;
	text-transform: none;
	color: #000;
}

.rsp-overlay .rsp-body .rsp-tagline {
	margin: 0 0 22px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--sColor, #3476b1);
}

.rsp-overlay .rsp-body p {
	margin: 0 0 14px;
	font-size: 16px;
	line-height: 1.65;
	color: #000;
}

.rsp-offer {
	margin: 22px 0 26px;
	padding: 18px 20px;
	background: #f4f6f3;
	border-left: 4px solid var(--aColor, #dea97d);
	border-radius: 10px;
}

.rsp-overlay .rsp-offer-title {
	margin: 0 0 8px;
	padding: 0;
	font-family: inherit;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	color: #000;
}

.rsp-overlay .rsp-offer p {
	margin: 0;
}

.rsp-code {
	display: inline-block;
	padding: 0 8px;
	border: 1px dashed var(--sColor, #3476b1);
	border-radius: 6px;
	background: #fff;
	font-weight: 700;
	letter-spacing: 1px;
	color: var(--sColor, #3476b1);
}

/* Same look as the site's a.btn */
.rsp-overlay a.rsp-cta,
.rsp-overlay a.rsp-cta:visited {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 15px 28px;
	border-radius: 10px;
	background: linear-gradient(90deg, var(--aColor, #dea97d) 0%, var(--sColor, #3476b1) 100%);
	color: #fff !important;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-decoration: none !important;
	box-shadow: 0 20px 30px -10px rgba(38, 115, 228, .35);
	transition: opacity .2s ease, transform .2s ease;
}

.rsp-overlay a.rsp-cta:hover,
.rsp-overlay a.rsp-cta:focus-visible {
	opacity: .92;
	color: #fff !important;
	transform: translateY(-1px);
}

.rsp-overlay .rsp-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: 50%;
	background: rgba(255, 255, 255, .95);
	color: #000;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
	transition: background-color .2s ease, color .2s ease;
}

.rsp-overlay .rsp-close:hover {
	background: var(--pColor, #65a2d1);
	color: #fff;
}

.rsp-overlay .rsp-close:focus-visible,
.rsp-overlay a.rsp-cta:focus-visible {
	outline: 3px solid var(--pColor, #65a2d1);
	outline-offset: 2px;
}

/* ---------- Popup on phones ---------- */
@media (max-width: 760px) {
	.rsp-overlay {
		padding: 12px;
	}

	.rsp-dialog {
		display: block;
		max-height: calc(100vh - 24px);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.rsp-media {
		height: 170px;
	}

	.rsp-overlay .rsp-body p {
		font-size: 15px;
		line-height: 1.55;
	}

	.rsp-offer {
		margin: 16px 0 20px;
		padding: 14px 16px;
	}

	.rsp-body {
		max-height: none;
		overflow: visible;
		padding: 22px 20px 24px;
	}

	.rsp-overlay .rsp-title {
		font-size: 26px;
	}

	.rsp-overlay .rsp-body .rsp-tagline {
		margin-bottom: 16px;
		font-size: 13px;
	}

	.rsp-overlay .rsp-offer-title {
		font-size: 18px;
	}

	.rsp-overlay a.rsp-cta {
		display: flex;
		justify-content: center;
		width: 100%;
		padding: 15px 18px;
		font-size: 14px;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rsp-overlay,
	.rsp-dialog,
	.rsp-overlay a.rsp-cta,
	#secondary-navigation .relax-sauna-menu-item > a {
		transition: none !important;
	}
}
