/**
 * Offer popup (pattern pdfflipbook/offer-popup, assets/js/offer-popup.js).
 * A deep navy card with a soft teal glow: one large number, one code, two quiet buttons.
 */

.pf-offer:not(.is-ready) { display: none; }
html.pf-offer-open { overflow: hidden; }

.pf-offer-dialog {
	box-sizing: border-box;
	position: fixed;
	inset: 0;
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 20px;
	border: 0;
	background: transparent;
	overflow: auto;
}
/* Closed: hidden, whatever other stylesheets say. Some plugins load old CSS resets with
   "dialog { display: block }" that would otherwise leave the closed popup covering the page. */
.pf-offer-dialog:not([open]) { display: none !important; }
.pf-offer-dialog[open] { display: flex; align-items: center; justify-content: center; }
.pf-offer-dialog::backdrop { background: transparent; }
.pf-offer-dialog__backdrop { position: fixed; inset: 0; background: rgba(5, 12, 22, 0.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

.pf-offer-dialog__card {
	position: relative;
	box-sizing: border-box;
	width: min(440px, 100%);
	padding: 56px 44px 40px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 24px;
	background:
		radial-gradient(120% 70% at 50% -10%, rgba(14, 165, 164, 0.28), rgba(14, 165, 164, 0) 60%),
		linear-gradient(180deg, #10243a 0%, var(--wp--preset--color--neutral) 100%);
	box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06);
	color: #fff;
	text-align: center;
}
.pf-offer-dialog__card:focus { outline: none; }
/* A hairline of light along the top edge */
.pf-offer-dialog__card::before { content: ""; position: absolute; top: 0; left: 18%; right: 18%; height: 1px; background: linear-gradient(90deg, transparent, rgba(110, 231, 228, 0.9), transparent); }

.pf-offer-dialog__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: rgba(255, 255, 255, 0.55);
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, transform 0.35s var(--pf-ease);
}
.pf-offer-dialog__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.pf-offer-dialog__close:hover { background: rgba(255, 255, 255, 0.08); color: #fff; transform: rotate(90deg); }
.pf-offer-dialog__close:focus-visible { outline: 2px solid var(--wp--preset--color--secondary); outline-offset: 2px; }

/* Content */
.pf-offer > * { margin: 0; }
.pf-offer .pf-offer__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: #6ee7e4;
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.26em;
	text-transform: uppercase;
}
.pf-offer .pf-offer__eyebrow::before,
.pf-offer .pf-offer__eyebrow::after { content: ""; width: 28px; height: 1px; background: currentColor; opacity: 0.5; }
.pf-offer .pf-offer__title {
	margin-top: 22px;
	color: rgba(255, 255, 255, 0.72);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 20px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.32em;
	text-transform: uppercase;
}
.pf-offer .pf-offer__title strong {
	display: block;
	margin-bottom: 6px;
	background: linear-gradient(180deg, #fff 30%, #9fe3df 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-size: 96px;
	font-weight: 700;
	line-height: 0.95;
	letter-spacing: -0.045em;
	text-transform: none;
}
.pf-offer .pf-offer__text { max-width: 300px; margin: 16px auto 0; color: rgba(255, 255, 255, 0.68); font-size: 15px; line-height: 1.6; }

/* The code, with its Copy button */
.pf-offer .pf-offer__code {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 30px;
	padding: 6px 6px 6px 20px;
	border: 1px dashed rgba(255, 255, 255, 0.28);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.04);
	transition: border-color 0.3s ease, background-color 0.3s ease;
}
.pf-offer__code-value { font: 600 18px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.22em; color: #fff; user-select: all; }
.pf-offer__copy {
	flex-shrink: 0;
	min-width: 84px;
	padding: 10px 16px;
	border: 0;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	font: 600 13px/18px var(--wp--preset--font-family--body);
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease;
}
.pf-offer__copy:hover { background: rgba(255, 255, 255, 0.18); }
.pf-offer__copy:focus-visible { outline: 2px solid var(--wp--preset--color--secondary); outline-offset: 2px; }
.pf-offer .pf-offer__code.is-copied { border-color: rgba(110, 231, 228, 0.7); background: rgba(14, 165, 164, 0.1); }
.pf-offer__code.is-copied .pf-offer__copy { background: var(--wp--preset--color--secondary); }

/* Buttons */
.pf-offer .pf-offer__actions { gap: 10px; margin-top: 14px; flex-wrap: nowrap; }
.pf-offer__actions .wp-block-button { flex: 1 1 0; min-width: 0; }
.pf-offer__actions .wp-block-button__link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 13px 16px;
	border-radius: 10px;
	box-shadow: none;
	font-size: 15px;
	font-weight: 600;
	line-height: 22px;
	letter-spacing: -0.1px;
	white-space: nowrap;
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.pf-offer__primary .wp-block-button__link { border: 1px solid #fff; background: #fff; color: var(--wp--preset--color--neutral); }
.pf-offer__primary .wp-block-button__link::before { width: 20px; height: 20px; }
.pf-offer__primary .wp-block-button__link:hover { border-color: #dff7f6; background: #dff7f6; color: var(--wp--preset--color--neutral); }
.pf-offer__secondary .wp-block-button__link { border: 1px solid rgba(255, 255, 255, 0.24); background: transparent; color: #fff; }
.pf-offer__secondary .wp-block-button__link:hover { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.06); color: #fff; }

@media (max-width: 480px) {
	.pf-offer-dialog__card { padding: 48px 22px 24px; border-radius: 20px; }
	.pf-offer .pf-offer__title strong { font-size: 80px; }
	.pf-offer .pf-offer__actions { flex-direction: column; }
	.pf-offer__actions .wp-block-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.pf-offer-dialog__close:hover { transform: none; }
}
