/**
 * Loving Digitals Promotions Manager — promotional popup.
 *
 * The visual language is the store's own, taken from the Smart Intake Forms
 * stylesheet already running on the site: Arial/Helvetica, #111 ink, white cards
 * with a 14px radius and a soft shadow, and solid #111 buttons at weight 800.
 * Nothing here introduces a new colour, a webfont, or a third-party dependency.
 *
 * Positioning is `fixed` and the element ships `hidden`, so the popup takes no
 * part in the document flow and cannot move the page when it appears.
 */

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

.ldpm-popup {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	font-family: Arial, Helvetica, sans-serif;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.ldpm-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 17, 17, 0.55);
	border: 0;
	cursor: pointer;
}

.ldpm-popup__dialog {
	position: relative;
	width: 100%;
	max-width: 520px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	background: #fff;
	color: #111;
	border: 1px solid #e8e8e8;
	border-radius: 14px;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
	padding: 34px 32px 28px;
	text-align: center;
	box-sizing: border-box;
}

.ldpm-popup__dialog * {
	box-sizing: border-box;
}

/* The close control is a real button, sized to the 44px touch target that a
   thumb on a phone actually needs. */
.ldpm-popup__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 8px;
	color: #444;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.ldpm-popup__close:hover,
.ldpm-popup__close:focus {
	background: #f2f2f2;
	color: #111;
}

.ldpm-popup__headline {
	margin: 6px 0 14px;
	padding: 0 24px;
	color: #111;
	font-size: 25px;
	font-weight: 800;
	letter-spacing: normal;
}

.ldpm-popup__body {
	margin: 0 0 18px;
	color: #111;
	font-size: 16px;
}

.ldpm-popup__body p {
	margin: 0 0 12px;
	color: #111;
}

.ldpm-popup__body p:last-child {
	margin-bottom: 0;
}

.ldpm-popup__code {
	margin: 0 0 20px;
	padding: 12px 14px;
	background: #f7f7f7;
	border-left: 4px solid #111;
	border-radius: 8px;
	text-align: left;
}

.ldpm-popup__code-label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #444;
}

.ldpm-popup__code-value {
	display: block;
	margin-top: 2px;
	font-size: 22px;
	font-weight: 800;
	letter-spacing: 0.08em;
	color: #111;
	word-break: break-all;
}

.ldpm-popup__actions {
	margin: 0 0 16px;
}

.ldpm-popup__button {
	display: inline-block;
	max-width: 100%;
	padding: 15px 24px;
	background: #111;
	color: #fff;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 800;
	text-decoration: none;
	line-height: 1.25;
}

.ldpm-popup__button:hover,
.ldpm-popup__button:focus {
	background: #000;
	color: #fff;
	opacity: 0.92;
	text-decoration: none;
}

.ldpm-popup__disclaimer {
	margin: 0;
	color: #444;
	font-size: 13px;
	line-height: 1.5;
	text-align: left;
}

/* A focus ring that is visible on both the white card and the #111 button.
   Keyboard users have to be able to see where they are. */
.ldpm-popup__close:focus-visible,
.ldpm-popup__button:focus-visible,
.ldpm-popup__dialog:focus-visible {
	outline: 3px solid #d99a00;
	outline-offset: 2px;
}

.ldpm-popup__dialog:focus {
	outline: none;
}

.ldpm-popup .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 600px) {
	.ldpm-popup {
		padding: 12px;
		align-items: flex-end;
	}

	.ldpm-popup__dialog {
		max-height: calc(100vh - 24px);
		padding: 30px 20px 22px;
		text-align: left;
	}

	.ldpm-popup__headline {
		padding: 0 40px 0 0;
		font-size: 22px;
	}

	.ldpm-popup__button {
		display: block;
		width: 100%;
		text-align: center;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.ldpm-popup__dialog {
		animation: ldpm-popup-in 220ms ease-out;
	}

	@keyframes ldpm-popup-in {
		from {
			opacity: 0;
			transform: translateY(12px);
		}

		to {
			opacity: 1;
			transform: none;
		}
	}
}
