/*
 * Upsell offer pop-up — Arpita's design: badge, headline, navy plan card,
 * the visitor's code in a dashed box, red button, trust row. A centred card
 * on wide screens, a bottom sheet on phones.
 *
 * Plain CSS rather than utility classes: the theme's Tailwind build is not part
 * of the deployed site, so classes not already compiled into app.css would not
 * exist.
 */

.ak-offer {
	--ak-offer-navy: #160a5c;
	--ak-offer-ink: #14085a;
	--ak-offer-muted: #55526e;
	--ak-offer-yellow: #f5c22e;
	--ak-offer-red: #d9161f;
	--ak-offer-soft: #f3f2fb;

	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	font-family: var(--font-sans, "Plus Jakarta Sans"), ui-sans-serif, system-ui, sans-serif;
	color: var(--ak-offer-ink);
}

.ak-offer[hidden] { display: none; }

.ak-offer__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(38, 24, 104, 0.6);
}

.ak-offer__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 540px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	padding: 32px 34px 22px;
	border-radius: 26px;
	background: #fff;
	box-shadow: 0 30px 80px -20px rgba(10, 6, 40, 0.55);
	animation: ak-offer-in 0.2s ease-out both;
}

.ak-offer__handle { display: none; }

.ak-offer__close {
	position: absolute;
	top: 18px;
	right: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 999px;
	background: #ecebf7;
	color: var(--ak-offer-ink);
	cursor: pointer;
}

.ak-offer__close svg { width: 16px; height: 16px; }
.ak-offer__close:hover { background: #dfdcf2; }

.ak-offer__badge {
	display: inline-block;
	margin: 0 0 14px;
	padding: 6px 13px;
	border-radius: 999px;
	background: var(--ak-offer-yellow);
	color: var(--ak-offer-ink);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ak-offer__title {
	margin: 0 44px 10px 0;
	color: var(--ak-offer-ink);
	font-size: 28px;
	font-weight: 800;
	line-height: 1.18;
	letter-spacing: -0.01em;
}

.ak-offer__body {
	margin: 0 0 18px;
	color: var(--ak-offer-muted);
	font-size: 15px;
	line-height: 1.55;
}

.ak-offer__card {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 24px;
	border-radius: 18px;
	background: var(--ak-offer-navy);
	color: #fff;
}

.ak-offer__card-main,
.ak-offer__card-price { display: flex; flex-direction: column; }
.ak-offer__card-main { min-width: 0; }
.ak-offer__card-price { align-items: flex-end; text-align: right; flex-shrink: 0; }

.ak-offer__card-label {
	color: #cbc6ee;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.ak-offer__card-title {
	margin: 6px 0 8px;
	font-size: 27px;
	font-weight: 800;
	line-height: 1.15;
}

.ak-offer__tag {
	display: inline-block;
	margin-left: 6px;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--ak-offer-yellow);
	color: var(--ak-offer-ink);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	vertical-align: middle;
}

.ak-offer__tag:empty { display: none; }

.ak-offer__card-features { color: #dcd9f3; font-size: 13px; line-height: 1.5; }

.ak-offer__regular { color: #cbc6ee; font-size: 13px; }
.ak-offer__regular s { color: #fff; }

.ak-offer__price {
	color: var(--ak-offer-yellow);
	font-size: 46px;
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.ak-offer__gst { margin-top: 2px; color: #cbc6ee; font-size: 12px; }
.ak-offer__gst:empty { display: none; }

.ak-offer__save {
	margin-top: 8px;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--ak-offer-red);
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.ak-offer__coupon { margin-top: 20px; }

.ak-offer__coupon-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ak-offer__valid {
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--ak-offer-red);
	color: #fff;
	font-size: 10.5px;
}

.ak-offer__code {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 58px;
	padding: 8px 12px;
	border: 2px dashed var(--ak-offer-ink);
	border-radius: 14px;
	background: var(--ak-offer-soft);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 24px;
	font-weight: 800;
	letter-spacing: 0.14em;
	user-select: all;
}

.ak-offer__code.is-loading { color: #9a97b5; font-size: 14px; letter-spacing: 0; font-family: inherit; font-weight: 600; }

.ak-offer__buy {
	display: block;
	width: 100%;
	margin-top: 18px;
	padding: 17px 20px;
	border: 0;
	border-radius: 14px;
	background: var(--ak-offer-red);
	color: #fff;
	font: inherit;
	font-size: 17px;
	font-weight: 800;
	cursor: pointer;
}

.ak-offer__buy:hover { background: #bd1019; }
.ak-offer__buy:disabled { opacity: 0.55; cursor: default; }

.ak-offer__footnote {
	margin: 12px 0 0;
	color: var(--ak-offer-muted);
	font-size: 13px;
	text-align: center;
}

.ak-offer__skip-row { margin: 8px 0 0; text-align: center; }

.ak-offer__skip {
	padding: 4px;
	border: 0;
	background: none;
	color: var(--ak-offer-muted);
	font: inherit;
	font-size: 14px;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.ak-offer__skip:hover { color: var(--ak-offer-ink); }

.ak-offer__trust {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid #ebeaf3;
	text-align: center;
}

.ak-offer__trust strong { display: block; font-size: 17px; font-weight: 800; }
.ak-offer__trust span { display: block; color: var(--ak-offer-muted); font-size: 12px; }

.ak-offer--pdf .ak-offer__coupon { display: none; }

@keyframes ak-offer-in {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.ak-offer__dialog { animation: none; }
}

/* Phones: a sheet from the bottom, as in the mobile designs. */
@media (max-width: 640px) {
	.ak-offer { align-items: flex-end; padding: 0; }

	.ak-offer__dialog {
		max-width: none;
		max-height: 92vh;
		padding: 14px 20px 20px;
		border-radius: 24px 24px 0 0;
		animation-name: ak-offer-up;
	}

	.ak-offer__handle {
		display: block;
		width: 44px;
		height: 5px;
		margin: 0 auto 14px;
		border-radius: 999px;
		background: #d9d7e8;
	}

	.ak-offer__close { top: 26px; right: 16px; }
	.ak-offer__title { font-size: 22px; }
	.ak-offer__body { font-size: 14px; margin-bottom: 14px; }
	.ak-offer__card { padding: 16px 18px; }
	.ak-offer__card-title { font-size: 22px; }
	.ak-offer__card-features { display: none; }
	.ak-offer__price { font-size: 34px; }
	.ak-offer__code { min-height: 52px; font-size: 20px; }
	.ak-offer__buy { padding: 15px; font-size: 16px; }
	.ak-offer__trust { display: none; }
}

@keyframes ak-offer-up {
	from { transform: translateY(100%); }
	to { transform: none; }
}

/* The admin preview: in the page, not over it. */
.ak-offer--preview {
	position: static;
	display: block;
	padding: 0;
}

.ak-offer--preview .ak-offer__backdrop { display: none; }
.ak-offer--preview .ak-offer__dialog { animation: none; max-height: none; box-shadow: 0 10px 40px -12px rgba(10, 6, 40, 0.35); }
