/**
 * Story reward modal — Figma 1380:10382 desktop / 1380:10553 mobile.
 */

.psp-story-modal {
	position: fixed;
	inset: 0;
	z-index: 10001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--space-inline);
	box-sizing: border-box;
}

.psp-story-modal[hidden] {
	display: none !important;
}

.psp-newsletter-hp {
	display: none !important;
}

.psp-story-modal__overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.8);
}

.psp-story-modal__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: row;
	align-items: stretch;
	width: 60.6875rem; /* 468 + 503 */
	max-width: calc(100vw - (var(--space-inline) * 2));
	height: 31.0625rem; /* 497px — Figma */
	max-height: calc(100vh - (var(--space-inline) * 2));
	background-color: #fff;
	overflow: hidden;
}

.psp-story-modal__media {
	flex: 0 0 29.25rem; /* 468px */
	width: 29.25rem;
	max-width: 48.2%;
	height: 100%;
	align-self: stretch;
	background-color: #d9d9d9;
	overflow: hidden;
}

.psp-story-modal__image,
.psp-story-modal__image-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.psp-story-modal__image-placeholder {
	background-color: #564d3b;
}

.psp-story-modal__content {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	flex: 1 1 auto;
	box-sizing: border-box;
	width: 31.4375rem; /* 503px */
	min-width: 0;
	height: 100%;
	min-height: 0;
	/* Figma 1380:10385 — pt 120 / px 20 / pb 20 */
	padding: 7.5rem 1.25rem 1.25rem;
	background-color: #fff;
	overflow: hidden;
}

.psp-story-modal__form {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	flex-shrink: 0;
	gap: 1.25rem; /* 20px */
	width: 100%;
	/* Flexible space above form ≈ Figma gap 80px; keeps pb 20px intact */
	margin-top: auto;
}

.psp-story-modal__close {
	position: absolute;
	top: 1.25rem; /* 20px */
	right: 1.25rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem; /* 24px */
	height: 1.5rem;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	outline: none;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.psp-story-modal__close:focus,
.psp-story-modal__close:focus-visible {
	outline: none;
	box-shadow: none;
}

.psp-story-modal__close-icon {
	position: relative;
	display: block;
	width: 1rem; /* 16px */
	height: 1rem;
	pointer-events: none;
}

.psp-story-modal__close-icon::before,
.psp-story-modal__close-icon::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 1.2729375rem; /* 20.367px */
	height: 0.1414375rem; /* 2.263px */
	background-color: var(--color-dark);
	transform-origin: center;
}

.psp-story-modal__close-icon::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.psp-story-modal__close-icon::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.psp-story-modal__copy {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex-shrink: 0;
	gap: 1.875rem; /* 30px */
	width: 100%;
	max-width: 25.3125rem; /* 405px */
	text-align: center;
	text-transform: uppercase;
	color: var(--color-dark);
}

.psp-story-modal__title {
	margin: 0;
	width: 100%;
	font-family: var(--font-serif);
	font-size: 3rem; /* 48px */
	font-weight: 400;
	line-height: 1.1;
	text-transform: uppercase;
	color: var(--color-dark);
	/* Figma text-box-trim — keeps copy height so pb 20px stays visible */
	text-box-trim: trim-both;
	text-box-edge: cap alphabetic;
}

.psp-story-modal__subtitle {
	margin: 0;
	width: 100%;
	max-width: 24.5rem; /* 392px */
	font-family: var(--font-sans);
	font-size: 0.875rem; /* 14px */
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -0.0175rem; /* -0.28px */
	text-transform: uppercase;
	color: var(--color-dark);
	text-box-trim: trim-both;
	text-box-edge: cap alphabetic;
}

.psp-story-modal__form.is-invalid .psp-story-modal__input {
	border-color: #c0392b;
}

.psp-story-modal__input {
	box-sizing: border-box;
	width: 100%;
	height: 3.375rem; /* 54px */
	margin: 0;
	padding: 0 1.375rem; /* 22px */
	border: 0.0625rem solid var(--color-stroke);
	border-radius: 0;
	background: transparent;
	font-family: var(--font-sans);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -0.0175rem;
	text-transform: uppercase;
	color: var(--color-dark);
	appearance: none;
	-webkit-appearance: none;
}

.psp-story-modal__input::placeholder {
	opacity: 0.6;
	color: var(--color-dark);
}

.psp-story-modal__input:focus {
	outline: none;
	border-color: var(--color-dark);
}

.psp-story-modal__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	height: 3.375rem; /* 54px */
	margin: 0;
	padding: 0 3.125rem; /* 50px */
	border: 0.0625rem solid var(--color-dark);
	border-radius: 0;
	background: transparent;
	font-family: var(--font-sans);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -0.0175rem;
	text-transform: uppercase;
	color: var(--color-dark);
	cursor: pointer;
	transition: opacity 0.2s ease;
	appearance: none;
	-webkit-appearance: none;
}

.psp-story-modal__submit:hover {
	opacity: 0.75;
}

.psp-story-modal__submit:focus,
.psp-story-modal__submit:focus-visible {
	outline: none;
}

.psp-story-modal__success {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	min-height: 3.375rem;
	margin-top: auto;
	padding: 0 1.25rem;
	font-family: var(--font-sans);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: -0.0175rem;
	text-align: center;
	text-transform: uppercase;
	color: var(--color-dark);
}

.psp-story-modal__success[hidden] {
	display: none !important;
}

.psp-story-modal.is-success .psp-story-modal__form {
	display: none !important;
}

.psp-story-modal.is-success .psp-story-modal__subtitle {
	display: none;
}

body.is-psp-story-modal-open {
	overflow: hidden;
}

body.is-psp-story-modal-open .psp-story-modal {
	/* overlay itself scrolls on short viewports */
	pointer-events: auto;
}

/* Mobile — Figma 1380:10553 */
@media (max-width: 75rem) {
	.psp-story-modal {
		padding: 1.25rem; /* 20px */
		align-items: flex-start;
		justify-content: center;
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
		/* Keep dim while dialog scrolls (absolute overlay only covers scrollport) */
		background-color: rgba(0, 0, 0, 0.8);
	}

	.psp-story-modal__overlay {
		position: fixed;
		inset: 0;
	}

	.psp-story-modal__dialog {
		flex-direction: column;
		width: 100%;
		max-width: 21.875rem; /* 350px */
		height: auto;
		max-height: none;
		margin: auto 0;
		overflow: visible;
	}

	.psp-story-modal__media {
		flex: 0 0 auto;
		width: 100%;
		max-width: none;
		height: 14.5rem; /* 232px */
	}

	.psp-story-modal__content {
		width: 100%;
		height: auto;
		padding: 5rem 1.25rem 1.25rem; /* 80 20 20 — mobile Figma */
		gap: 2.5rem; /* 40px */
		overflow: visible;
	}

	.psp-story-modal__form {
		margin-top: 0;
	}

	.psp-story-modal.is-success .psp-story-modal__success {
		margin-top: 0;
	}

	.psp-story-modal__copy {
		max-width: none;
	}

	.psp-story-modal__title {
		max-width: 16.9375rem; /* 271px */
		font-size: 1.875rem; /* 30px */
	}

	.psp-story-modal__subtitle {
		max-width: none;
	}
}
