/* Simply Pop-Up — styles */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */

.spu-popup {
	position: fixed;
	inset: 0;
	z-index: 100010;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.4s ease;
}

.spu-popup.is-visible {
	opacity: 1;
}

.spu-popup[hidden] {
	display: none;
}

/* ── Overlay ─────────────────────────────────────────────────────────────── */

.spu-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

/* ── Box ─────────────────────────────────────────────────────────────────── */

.spu-popup__box {
	position: relative;
	background: #fff;
	border-radius: var(--client-radius, 0px);
	width: calc(100% - 40px);
	max-width: 800px;
	overflow: hidden;
	z-index: 1;
	display: flex;
	flex-direction: column;
}

.spu-popup__box.has-border {
	border: 10px solid var(--spu-border-color, var(--client-accent, #333));
}

/* ── Close button ────────────────────────────────────────────────────────── */

.spu-popup__close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	font-size: 52px;
	line-height: 1;
	cursor: pointer;
	color: #fff;
	opacity: 1;
	z-index: 2;
	padding: 0;
}

.spu-popup__close:hover {
	opacity: 0.5;
}

/* ── Image ───────────────────────────────────────────────────────────────── */

.spu-popup__image img {
	display: block;
	width: 100%;
	height: auto;
}

/* ── Body (title + content + cta) ───────────────────────────────────────── */

.spu-popup__body {
	padding: 24px 28px 28px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* ── Title ───────────────────────────────────────────────────────────────── */

.spu-popup__title {
	margin-bottom: 0;
}

.spu-popup__title h2 {
	margin: 0;
	font-family: var(--client-font-display, inherit);
	color: var(--client-heading, #333);
	font-size: 1.5rem;
	line-height: 1.2;
}

/* ── Extra content ───────────────────────────────────────────────────────── */

.spu-popup__content {
	margin-bottom: 16px;
	font-family: var(--client-font-primary, inherit);
	color: var(--client-text, #333);
	font-size: 1rem;
	line-height: 1.5;
}

.spu-popup__content p:last-child {
	margin-bottom: 0;
}

/* ── CTA ─────────────────────────────────────────────────────────────────── */

.spu-popup__cta .ss-btn {
	display: inline-block;
}

/* ── Content alignment ───────────────────────────────────────────────────── */

.spu-align--left .spu-popup__body {
	align-items: flex-start;
	text-align: left;
}

.spu-align--center .spu-popup__body {
	align-items: center;
	text-align: center;
}

.spu-align--right .spu-popup__body {
	align-items: flex-end;
	text-align: right;
}

/* ── Layout: left / right (side-by-side) ────────────────────────────────── */

.spu-layout--left .spu-popup__close {
	color: var(--client-heading, #333);
}

.spu-layout--left .spu-popup__box,
.spu-layout--right .spu-popup__box {
	flex-direction: row;
	align-items: stretch;
}

.spu-layout--left .spu-popup__image,
.spu-layout--right .spu-popup__image {
	flex: 0 0 50%;
	overflow: hidden;
}

.spu-layout--left .spu-popup__image img,
.spu-layout--right .spu-popup__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.spu-layout--left .spu-popup__body,
.spu-layout--right .spu-popup__body {
	flex: 1;
}

/* Image right: swap order */
.spu-layout--right .spu-popup__image {
	order: 2;
}

.spu-layout--right .spu-popup__body {
	order: 1;
}

/* ── Layout: image only ──────────────────────────────────────────────────── */

.spu-layout--image_only .spu-popup__box {
	width: auto;
	max-width: none;
}

.spu-layout--image_only .spu-popup__image a {
	display: block;
}

.spu-layout--image_only .spu-popup__image img {
	max-height: 75vh;
	max-width: min(800px, calc(100vw - 40px));
	width: auto;
	height: auto;
	display: block;
}

/* ── Sticky bar ──────────────────────────────────────────────────────────── */

.spu-sticky {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 100010;
	background: var(--client-section-dark-bg, #1a1a1a);
	color: #fff;
	padding: 12px 20px;
	border-top: 2px solid #fff;
	box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
}

.spu-sticky[hidden] {
	display: none;
}

.spu-sticky__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	max-width: 1200px;
	margin: 0 auto;
	flex-wrap: wrap;
}

.spu-sticky__text {
	font-size: 0.95rem;
	line-height: 1.4;
}

.spu-sticky__text a {
	color: inherit;
	text-decoration: underline;
}

.spu-sticky__btn {
	white-space: nowrap;
	background: var(--client-accent, #fff);
	color: #fff;
	padding: 6px 18px;
	border-radius: var(--client-radius, 4px);
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	flex-shrink: 0;
}

.spu-sticky__btn:hover {
	opacity: 0.85;
	color: #fff;
}

.spu-sticky__close {
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.6;
	padding: 0 4px;
}

.spu-sticky__close:hover {
	opacity: 1;
}

@media (max-width: 600px) {
	.spu-sticky__inner {
		justify-content: flex-start;
	}
	.spu-sticky__text {
		font-size: 0.875rem;
	}
}

/* ── Mobile: always stack, cap image, pin box to top ────────────────────── */

@media (max-width: 600px) {
	.spu-popup {
		align-items: flex-start;
		padding-top: 16px;
		overflow-y: auto;
	}

	.spu-popup__image img {
		max-height: 45vh;
		object-fit: cover;
		width: 100%;
	}

	.spu-layout--image_only .spu-popup__image img {
		max-height: 70vh;
	}

	.spu-layout--left .spu-popup__box,
	.spu-layout--right .spu-popup__box {
		flex-direction: column;
		max-width: 100%;
	}

	.spu-layout--right .spu-popup__image {
		order: 0;
	}

	.spu-layout--right .spu-popup__body {
		order: 0;
	}

	.spu-popup.spu-hide-mobile {
		display: none !important;
	}
}
