/*
 * Promotion module styling. Only enqueued when a hero or popup actually
 * resolves for the current request (see includes/frontend/*-render.php).
 * Reuses the theme's own CSS custom properties (--pink, --navy, --line,
 * --shadow-lg, etc.) and .hero/.page-hero/.button classes so promo markup
 * matches the site's existing design system -- only the promo-specific
 * bits (coupon chip, popup dialog) get new rules here.
 */

/* Hero -- "Image only" display mode: full-width banner, no copy. */
.kzcp-hero-image {
	padding: 20px 0;
}

.kzcp-hero-image picture,
.kzcp-hero-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--radius-lg, 26px);
}

.kzcp-hero-image a {
	display: block;
	border-radius: var(--radius-lg, 26px);
	transition: opacity .2s ease;
}

.kzcp-hero-image a:hover {
	opacity: .92;
}

/* Hero -- "Image only" mode, "Below Newsletter"/"Above Footer" positions:
   full-bleed edge-to-edge banner (no .container, no side padding), flush
   against the footer below it, with generous spacing above it only --
   matches the theme's own section vertical rhythm (96px / 68px <=820px). */
.kzcp-hero-image-fullbleed {
	padding: 0;
	margin: 96px 0 0;
}

.kzcp-hero-image-fullbleed picture,
.kzcp-hero-image-fullbleed img,
.kzcp-hero-image-fullbleed a {
	border-radius: 0;
}

@media (max-width: 820px) {
	.kzcp-hero-image-fullbleed {
		margin-top: 68px;
	}
}

.kzcp-coupon-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 4px 0 18px;
	padding: 10px 16px;
	background: var(--cream, #fff3df);
	border: 1px dashed var(--gold, #ffc300);
	border-radius: 12px;
	font-size: .92rem;
	color: var(--ink, #12233d);
}

.kzcp-coupon-chip strong {
	letter-spacing: .04em;
}

/* Popup dialog -------------------------------------------------------- */

.kzcp-popup {
	position: fixed;
	inset: 0;
	z-index: 300;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

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

.kzcp-popup-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(13, 35, 61, .6);
}

.kzcp-popup-panel {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: var(--radius-lg, 26px);
	box-shadow: var(--shadow-lg, 0 24px 60px rgba(13, 42, 78, .16));
	width: min(460px, 100%);
	max-height: calc(100vh - 40px);
	overflow-y: auto;
}

.kzcp-popup-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 0;
	background: #fff;
	box-shadow: var(--shadow-sm, 0 8px 24px rgba(13, 42, 78, .07));
	display: grid;
	place-items: center;
	cursor: pointer;
	color: var(--navy, #0d2b4e);
}

.kzcp-popup-close:hover {
	background: #f5f7fa;
}

.kzcp-popup-media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--radius-lg, 26px) var(--radius-lg, 26px) 0 0;
}

.kzcp-popup-body {
	padding: 28px 28px 32px;
}

.kzcp-popup-body h2 {
	margin: 0 0 10px;
	padding-right: 24px;
	font-size: 1.3rem;
	color: var(--navy, #0d2b4e);
}

.kzcp-popup-desc {
	margin: 0 0 16px;
	color: var(--muted, #647186);
	font-size: .95rem;
}

.kzcp-popup-coupon {
	margin: 0 0 18px;
}

.kzcp-popup-coupon-label {
	display: block;
	font-size: .8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--muted, #647186);
	margin-bottom: 6px;
}

.kzcp-popup-coupon-row {
	display: flex;
	gap: 10px;
	align-items: stretch;
}

.kzcp-popup-coupon-code {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px dashed var(--gold, #ffc300);
	border-radius: 12px;
	background: var(--cream, #fff3df);
	font-size: 1.05rem;
	font-weight: 800;
	letter-spacing: .06em;
	color: var(--ink, #12233d);
	padding: 0 14px;
}

.kzcp-popup-copy {
	white-space: nowrap;
	min-height: auto;
	padding: 12px 20px;
}

.kzcp-popup-feedback {
	margin: 10px 0 0;
	font-size: .85rem;
	color: var(--green, #53b637);
	font-weight: 650;
	min-height: 1.2em;
}

.kzcp-popup-cta {
	width: 100%;
	text-align: center;
}

body.kzcp-popup-open {
	overflow: hidden;
}

@media (max-width: 560px) {
	.kzcp-popup-panel {
		width: 100%;
	}
}
