/* PBN Subscribe — entry-point styles (strip / bar / popup).
   All colors come from :root brand tokens (see class-plugin.php). */

/* ============================================================
   Footer Strip — compact, inherits parent footer background
   ============================================================ */
.pbn-strip {
	width: 100%;
	padding: 0 16px;
	box-sizing: border-box;
	color: inherit;
}
.pbn-strip__inner {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	gap: 16px 32px;
	align-items: center;
	justify-content: space-between;
}
.pbn-strip__copy { flex: 1 1 320px; text-align: left; }
.pbn-strip__heading {
	font-size: 21px;
	line-height: 1.25;
	margin: 0 0 2px;
	font-weight: 700;
	color: inherit;
	letter-spacing: -.01em;
}
.pbn-strip__intro {
	font-size: 14px;
	line-height: 1.5;
	margin: 0;
	opacity: .78;
}
.pbn-strip__form { flex: 0 1 420px; min-width: 280px; }
.pbn-strip .pbn-subscribe-form { max-width: 420px; margin-left: auto; }
.pbn-strip .pbn-subscribe-form .pbn-input { height: 42px; font-size: 14px; }
.pbn-strip .pbn-subscribe-form .pbn-btn { height: 42px; font-size: 14px; padding: 0 18px; }
.pbn-strip .pbn-subscribe-form .pbn-consent { font-size: 11.5px; margin-top: 2px; opacity: .7; }
.pbn-strip .pbn-subscribe-form .pbn-msg { font-size: 12.5px; min-height: 16px; }

/* Inside dark footer backgrounds: lighter input border + flip submit to accent. */
.pbn-strip .pbn-subscribe-form .pbn-input {
	border-color: rgba(255, 255, 255, .18);
	background: rgba(255, 255, 255, .96);
}
.pbn-strip .pbn-subscribe-form .pbn-btn {
	background: var(--pbn-accent, #6EC5E9);
	color: var(--pbn-primary, #1F3A5F);
}
.pbn-strip .pbn-subscribe-form .pbn-btn:hover {
	filter: brightness(1.08);
	box-shadow: 0 4px 16px color-mix(in srgb, var(--pbn-accent, #6EC5E9) 40%, transparent);
}

@media (max-width: 720px) {
	.pbn-strip { padding: 0 14px; }
	.pbn-strip__inner { gap: 12px; }
	.pbn-strip__heading { font-size: 19px; }
	.pbn-strip__intro { font-size: 13.5px; }
	.pbn-strip .pbn-subscribe-form { margin-left: 0; max-width: none; }
}

/* ============================================================
   Announcement Bar
   ============================================================ */
.pbn-bar { position: relative; width: 100%; z-index: 99; font-size: 14px; line-height: 1.5; }
.pbn-bar__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 10px 40px 10px 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	flex-wrap: wrap;
	box-sizing: border-box;
	position: relative;
}
.pbn-bar__text { font-weight: 500; }
.pbn-bar__cta { color: inherit; text-decoration: underline; font-weight: 600; }
.pbn-bar__cta:hover { opacity: .85; }
.pbn-bar__close {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: 0;
	color: inherit;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
	opacity: .75;
}
.pbn-bar__close:hover { opacity: 1; }
.pbn-bar.is-hidden { display: none !important; }
@media (max-width: 480px) {
	.pbn-bar { font-size: 13px; }
	.pbn-bar__inner { padding: 8px 36px 8px 12px; gap: 8px; }
}

/* ============================================================
   Popup Modal — compact card with brand-gradient hero
   ============================================================ */
.pbn-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
	font-family: inherit;
}
.pbn-popup.is-open { display: flex; }

.pbn-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .58);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	cursor: pointer;
}

.pbn-popup__card {
	position: relative;
	width: 100%;
	max-width: 420px;
	background: #ffffff;
	color: #1a1a1a;
	border-radius: var(--pbn-radius-card, 18px);
	box-shadow: 0 30px 80px -20px rgba(15, 23, 42, .5), 0 8px 24px rgba(15, 23, 42, .15);
	overflow: hidden;
	animation: pbn-pop-in .3s cubic-bezier(.2, .8, .2, 1);
	isolation: isolate;
}
@keyframes pbn-pop-in {
	from { transform: translateY(20px) scale(.96); opacity: 0; }
	to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* Hero band: painter canvas off-white. SVG decoration sits on top. */
.pbn-popup__card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 100px;
	background: #FAF8F2;
	border-bottom: 1px solid rgba(31, 58, 95, .06);
	z-index: 0;
}

/* Paint-by-numbers decoration layer (SVG provided inline by PHP). */
.pbn-popup__deco {
	position: absolute;
	inset: 0 0 auto 0;
	height: 100px;
	z-index: 1;
	pointer-events: none;
	overflow: hidden;
}
.pbn-popup__deco-svg {
	width: 100%;
	height: 100%;
	display: block;
}
.pbn-deco-brush { stroke: var(--pbn-primary, #1F3A5F); opacity: .12; }

/* Paint-by-numbers shape blocks, each with a number inside. */
.pbn-deco-block path { stroke: rgba(31, 58, 95, .25); stroke-width: 1; stroke-linejoin: round; }
.pbn-deco-block text { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; pointer-events: none; }

.pbn-deco-block--accent  path { fill: var(--pbn-accent, #6EC5E9); }
.pbn-deco-block--orange  path { fill: #F2994A; }
.pbn-deco-block--yellow  path { fill: #F2C94C; }
.pbn-deco-block--red     path { fill: #EB5757; }
.pbn-deco-block--primary path { fill: var(--pbn-primary, #1F3A5F); }

/* Number color: dark on light blocks, white on dark blocks. */
.pbn-deco-block--accent  text,
.pbn-deco-block--orange  text,
.pbn-deco-block--yellow  text { fill: var(--pbn-primary, #1F3A5F); opacity: .85; }
.pbn-deco-block--red     text,
.pbn-deco-block--primary text { fill: #ffffff; opacity: .95; }

/* Close button: flex-centered SVG icon, ghost-dark on light hero. */
.pbn-popup__close {
	position: absolute;
	right: 12px;
	top: 12px;
	z-index: 4;
	width: 32px;
	height: 32px;
	padding: 0;
	background: rgba(31, 58, 95, .08);
	border: 1.5px solid rgba(31, 58, 95, .22);
	border-radius: 999px;
	color: var(--pbn-primary, #1F3A5F);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background .15s ease, transform .25s ease, border-color .15s ease, color .15s ease;
}
.pbn-popup__close:hover {
	background: var(--pbn-primary, #1F3A5F);
	border-color: var(--pbn-primary, #1F3A5F);
	color: #fff;
	transform: rotate(90deg);
}
.pbn-popup__close svg { display: block; }

/* Optional image takes precedence over the geometric hero. */
.pbn-popup__image {
	position: relative;
	z-index: 2;
	width: 100%;
	aspect-ratio: 16 / 9;
	background-size: cover;
	background-position: center;
}
.pbn-popup__card:has(.pbn-popup__image)::before,
.pbn-popup__card:has(.pbn-popup__image) .pbn-popup__deco { display: none; }

/* Body sits below the hero band with a small overlap for layered look. */
.pbn-popup__body {
	position: relative;
	z-index: 3;
	background: #fff;
	margin-top: 78px;
	padding: 24px 28px 26px;
	border-radius: var(--pbn-radius-card, 18px) var(--pbn-radius-card, 18px) 0 0;
}
.pbn-popup__card:has(.pbn-popup__image) .pbn-popup__body { margin-top: 0; border-radius: 0; }

/* Accent pill badge above the heading. */
.pbn-popup__tag {
	display: inline-block;
	padding: 4px 10px;
	background: color-mix(in srgb, var(--pbn-accent, #6EC5E9) 22%, transparent);
	color: var(--pbn-primary, #1F3A5F);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	border-radius: 999px;
	margin: 0 0 10px;
}

.pbn-popup__heading {
	font-size: 22px;
	line-height: 1.25;
	margin: 0 0 8px;
	font-weight: 800;
	letter-spacing: -.015em;
	color: #1a1a1a;
}
.pbn-popup__intro {
	font-size: 13.5px;
	line-height: 1.55;
	color: #5b6470;
	margin: 0 0 16px;
}

/* Form inside popup: input + button on the same row, consent below. */
.pbn-popup__body .pbn-subscribe-form { gap: 8px; max-width: none; flex-wrap: wrap; }
.pbn-popup__body .pbn-subscribe-form .pbn-input {
	flex: 1 1 180px;
	height: 44px;
	font-size: 14px;
	padding: 0 16px;
}
.pbn-popup__body .pbn-subscribe-form .pbn-btn {
	flex: 0 0 auto;
	height: 44px;
	padding: 0 22px;
	font-size: 14px;
	font-weight: 700;
}
.pbn-popup__body .pbn-subscribe-form .pbn-consent {
	font-size: 11.5px;
	color: #6b7280;
	opacity: 1;
	margin-top: 4px;
}
.pbn-popup__body .pbn-subscribe-form .pbn-msg { font-size: 13px; min-height: 16px; }
.pbn-popup__body .pbn-subscribe-form .pbn-msg.is-success {
	color: var(--pbn-primary, #1F3A5F);
	font-weight: 600;
}

/* Stop browser extensions from styling fragments of intro text. */
.pbn-popup__intro,
.pbn-popup__heading,
.pbn-popup__tag { text-decoration: none !important; }
.pbn-popup__intro a,
.pbn-popup__intro abbr { text-decoration: none !important; border: 0 !important; }

@media (max-width: 480px) {
	.pbn-popup__card { max-width: 100%; }
	.pbn-popup__card::before,
	.pbn-popup__card::after { height: 84px; }
	.pbn-popup__body { margin-top: 64px; padding: 20px 20px 22px; }
	.pbn-popup__heading { font-size: 19px; }
	.pbn-popup__body .pbn-subscribe-form .pbn-input { flex: 1 1 100%; }
	.pbn-popup__body .pbn-subscribe-form .pbn-btn { flex: 1 1 100%; }
}
