/**
 * FXNook visitor review popup.
 *
 * Brand: #9DCC4C green, #231F20 ink, Poppins. Ink sits on green - white on
 * that green does not carry enough contrast - and green text on white is
 * darkened to #4A7515 so it stays readable.
 *
 * Two things about how this file is written:
 *
 * 1. Everything is scoped to the #wcwb-popup-root ID, not to bare classes.
 *    This popup is dropped into somebody else's theme, and a theme rule like
 *    `.site-content button` beats a plain `.wcwb-star` every time. An ID
 *    outranks any stack of classes, so the popup looks the same whatever it
 *    lands in - and the theme's own styles are still left alone.
 *
 * 2. Skins are almost entirely custom-property overrides. A skin sets its
 *    tokens; the structure below does the rest. Adding another one is a dozen
 *    lines, not a second stylesheet.
 */

/* =====================================================================
 * Tokens
 * ================================================================== */

#wcwb-popup-root,
#wcwb-float {
	--wcwb-green: #9dcc4c;
	--wcwb-green-dark: #8bbb3c;
	--wcwb-green-text: #4a7515;
	--wcwb-ink: #231f20;

	/* Skinnable surface tokens. */
	--wcwb-surface: #ffffff;
	--wcwb-surface-2: #fbfbfc;
	--wcwb-text: #231f20;
	--wcwb-text-soft: #55575a;
	--wcwb-border: #e7e8ea;
	--wcwb-accent: #9dcc4c;
	--wcwb-accent-text: #4a7515;
	--wcwb-btn-bg: #9dcc4c;
	--wcwb-btn-bg-hover: #8bbb3c;
	--wcwb-btn-text: #231f20;
	--wcwb-star-off: #dcdee1;
	--wcwb-star-on: #9dcc4c;
	--wcwb-field-bg: #fbfbfc;
	--wcwb-field-border: #e7e8ea;
	--wcwb-shadow: 0 24px 60px -18px rgba(35, 31, 32, 0.32), 0 2px 8px rgba(35, 31, 32, 0.06);
	--wcwb-band: transparent;
	--wcwb-band-height: 0px;

	/* Set per campaign from the admin. */
	--wcwb-width: 420px;
	--wcwb-radius: 20px;

	--wcwb-pad: 30px 28px 24px;
	--wcwb-headline: 21px;
	--wcwb-star-size: 30px;

	font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

/* =====================================================================
 * Reset
 *
 * Themes style buttons and inputs hard - backgrounds, borders, uppercase,
 * letter-spacing, min-heights, gradients. Everything inside the popup is
 * reset back to a known state first, so a skin starts from a blank page.
 * ================================================================== */

#wcwb-popup-root,
#wcwb-popup-root *,
#wcwb-popup-root *::before,
#wcwb-popup-root *::after {
	box-sizing: border-box;
}

#wcwb-popup-root button,
#wcwb-popup-root input,
#wcwb-popup-root textarea,
#wcwb-popup-root a {
	margin: 0;
	font-family: inherit;
	line-height: normal;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
	min-width: 0;
	min-height: 0;
	max-width: none;
	width: auto;
	float: none;
	text-shadow: none;
}

#wcwb-popup-root button {
	-webkit-appearance: none;
	appearance: none;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	background-image: none;
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
	cursor: pointer;
	outline-offset: 2px;
}

#wcwb-popup-root button:hover,
#wcwb-popup-root button:focus {
	background-image: none;
	box-shadow: none;
}

#wcwb-popup-root input[type="text"],
#wcwb-popup-root input[type="email"],
#wcwb-popup-root textarea {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	background-image: none;
}

#wcwb-popup-root p,
#wcwb-popup-root h2,
#wcwb-popup-root h3,
#wcwb-popup-root label,
#wcwb-popup-root span,
#wcwb-popup-root div,
#wcwb-popup-root form {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	text-align: left;
	float: none;
}

#wcwb-popup-root svg {
	display: block;
	max-width: none;
	vertical-align: middle;
}

/* =====================================================================
 * Shell
 * ================================================================== */

#wcwb-popup-root[hidden] {
	display: none !important;
}

#wcwb-popup-root {
	position: fixed;
	z-index: 99998;
	inset: auto;
	color: var(--wcwb-text);
}

#wcwb-popup-root .wcwb-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(35, 31, 32, 0.42);
	opacity: 0;
	transition: opacity 220ms ease;
}

#wcwb-popup-root.is-open .wcwb-popup-overlay {
	opacity: 1;
}

#wcwb-popup-root .wcwb-popup-card {
	position: fixed;
	width: min(var(--wcwb-width), calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: var(--wcwb-pad);
	background: var(--wcwb-surface);
	border: 1px solid var(--wcwb-border);
	border-radius: var(--wcwb-radius);
	box-shadow: var(--wcwb-shadow);
	color: var(--wcwb-text);
	opacity: 0;
	transition: opacity 240ms ease, transform 240ms ease;
}

/* The accent band some skins put across the top. */
#wcwb-popup-root .wcwb-popup-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: var(--wcwb-band-height);
	background: var(--wcwb-band);
	border-radius: var(--wcwb-radius) var(--wcwb-radius) 0 0;
}

/* Position ----------------------------------------------------------- */

#wcwb-popup-root.wcwb-pos-bottom-right .wcwb-popup-card {
	right: 24px;
	bottom: 24px;
}

#wcwb-popup-root.wcwb-pos-bottom-left .wcwb-popup-card {
	left: 24px;
	bottom: 24px;
}

#wcwb-popup-root.wcwb-pos-center .wcwb-popup-card {
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%) scale(0.98);
}

#wcwb-popup-root.wcwb-pos-center.is-open .wcwb-popup-card {
	transform: translate(-50%, -50%) scale(1);
}

/* Animation - restrained on purpose. Nothing bounces. */

#wcwb-popup-root.wcwb-anim-slide .wcwb-popup-card {
	transform: translateY(14px);
}

#wcwb-popup-root.wcwb-anim-slide.wcwb-pos-center .wcwb-popup-card {
	transform: translate(-50%, -46%) scale(0.98);
}

#wcwb-popup-root.is-open .wcwb-popup-card {
	opacity: 1;
}

#wcwb-popup-root.wcwb-anim-slide.is-open .wcwb-popup-card {
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	#wcwb-popup-root .wcwb-popup-card,
	#wcwb-popup-root .wcwb-popup-overlay {
		transition: none;
	}
}

/* =====================================================================
 * Type
 * ================================================================== */

#wcwb-popup-root .wcwb-popup-headline {
	margin: 0 0 8px;
	font-size: var(--wcwb-headline);
	line-height: 1.3;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--wcwb-text);
}

#wcwb-popup-root .wcwb-popup-sub {
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.55;
	color: var(--wcwb-text-soft);
}

#wcwb-popup-root .wcwb-popup-body {
	margin: 0 0 20px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--wcwb-text-soft);
}

/* =====================================================================
 * Close
 * ================================================================== */

#wcwb-popup-root .wcwb-popup-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: transparent;
	color: var(--wcwb-text-soft);
	opacity: 0.7;
	transition: background 150ms ease, opacity 150ms ease;
}

#wcwb-popup-root .wcwb-popup-close:hover {
	background: rgba(127, 127, 127, 0.14);
	opacity: 1;
}

#wcwb-popup-root .wcwb-popup-close svg {
	width: 16px;
	height: 16px;
}

/* =====================================================================
 * Stars
 * ================================================================== */

#wcwb-popup-root .wcwb-stars {
	display: flex;
	gap: 6px;
	margin: 0 0 20px;
	padding: 0;
	background: none;
}

#wcwb-popup-root .wcwb-star {
	padding: 2px;
	line-height: 0;
	background: none;
	border: 0;
	color: var(--wcwb-star-off);
	transition: color 120ms ease, transform 120ms ease;
}

#wcwb-popup-root .wcwb-star svg {
	width: var(--wcwb-star-size);
	height: var(--wcwb-star-size);
	fill: currentColor;
}

#wcwb-popup-root .wcwb-stars-lg .wcwb-star svg {
	width: calc(var(--wcwb-star-size) + 4px);
	height: calc(var(--wcwb-star-size) + 4px);
}

#wcwb-popup-root .wcwb-star:hover {
	transform: translateY(-1px);
	color: var(--wcwb-star-on);
}

#wcwb-popup-root .wcwb-star.is-on {
	color: var(--wcwb-star-on);
}

#wcwb-popup-root .wcwb-star:focus-visible {
	outline: 2px solid var(--wcwb-accent);
	outline-offset: 2px;
	border-radius: 4px;
}

/* =====================================================================
 * Buttons
 * ================================================================== */

#wcwb-popup-root .wcwb-btn {
	display: block;
	width: 100%;
	padding: 13px 20px;
	border: 0;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	transition: background 150ms ease, transform 100ms ease;
}

#wcwb-popup-root .wcwb-btn-primary,
#wcwb-popup-root a.wcwb-btn-primary {
	background: var(--wcwb-btn-bg);
	color: var(--wcwb-btn-text);
}

#wcwb-popup-root .wcwb-btn-primary:hover,
#wcwb-popup-root a.wcwb-btn-primary:hover {
	background: var(--wcwb-btn-bg-hover);
	color: var(--wcwb-btn-text);
}

#wcwb-popup-root .wcwb-btn-primary:active {
	transform: translateY(1px);
}

#wcwb-popup-root .wcwb-btn-primary.is-busy {
	opacity: 0.65;
	cursor: progress;
}

#wcwb-popup-root .wcwb-btn-quiet {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 9px;
	background: none;
	font-size: 13px;
	font-weight: 400;
	color: var(--wcwb-text-soft);
	text-decoration: none;
	text-align: center;
}

#wcwb-popup-root .wcwb-btn-quiet:hover {
	color: var(--wcwb-text);
	text-decoration: underline;
}

/* =====================================================================
 * Form
 * ================================================================== */

#wcwb-popup-root .wcwb-field {
	display: block;
	margin: 0 0 14px;
}

#wcwb-popup-root .wcwb-label {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 600;
	color: var(--wcwb-text);
}

#wcwb-popup-root .wcwb-field input[type="text"],
#wcwb-popup-root .wcwb-field input[type="email"],
#wcwb-popup-root .wcwb-field textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--wcwb-field-border);
	border-radius: 10px;
	background: var(--wcwb-field-bg);
	font-size: 14px;
	color: var(--wcwb-text);
	transition: border-color 150ms ease, background 150ms ease;
}

#wcwb-popup-root .wcwb-field input:focus,
#wcwb-popup-root .wcwb-field textarea:focus {
	outline: 0;
	border-color: var(--wcwb-accent);
	box-shadow: 0 0 0 3px rgba(157, 204, 76, 0.24);
}

#wcwb-popup-root .wcwb-field textarea {
	resize: vertical;
	min-height: 92px;
}

#wcwb-popup-root .wcwb-field-row {
	display: flex;
	gap: 12px;
}

#wcwb-popup-root .wcwb-field-row .wcwb-field {
	flex: 1 1 50%;
	min-width: 0;
}

#wcwb-popup-root .wcwb-consent {
	display: flex;
	gap: 9px;
	align-items: flex-start;
	margin: 4px 0 14px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--wcwb-text-soft);
	cursor: pointer;
}

/*
 * The consent box must always be there to tick. Some themes restyle every
 * checkbox on the site (appearance:none, hidden, or zero-sized for a custom
 * one drawn with a pseudo-element the popup does not have), which left the
 * words with no box beside them and a form that could not be sent.
 */
#wcwb-popup-root .wcwb-consent input[type="checkbox"] {
	-webkit-appearance: checkbox !important;
	appearance: auto !important;
	display: inline-block !important;
	position: static !important;
	visibility: visible !important;
	opacity: 1 !important;
	flex: 0 0 18px;
	width: 18px !important;
	height: 18px !important;
	margin: 1px 0 0 !important;
	padding: 0 !important;
	clip: auto !important;
	accent-color: var(--wcwb-green-dark);
	cursor: pointer;
}

#wcwb-popup-root .wcwb-as {
	margin: 0 0 12px;
	font-size: 13px;
	color: var(--wcwb-text-soft);
}

#wcwb-popup-root .wcwb-as strong {
	color: var(--wcwb-text);
}

#wcwb-popup-root .wcwb-consent a {
	color: var(--wcwb-accent-text);
}

#wcwb-popup-root .wcwb-incentive-note {
	margin: 0 0 14px;
	padding: 11px 13px;
	border-radius: 10px;
	background: rgba(157, 204, 76, 0.14);
	font-size: 12px;
	line-height: 1.55;
	color: var(--wcwb-text);
}

#wcwb-popup-root .wcwb-error {
	margin: 0 0 12px;
	padding: 10px 13px;
	border-radius: 10px;
	background: #fdeceb;
	font-size: 13px;
	line-height: 1.5;
	color: #a32320;
}

#wcwb-popup-root .wcwb-error[hidden] {
	display: none;
}

/* The honeypot. Hidden from people, reachable by a robot. */
#wcwb-popup-root .wcwb-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* =====================================================================
 * Thank you
 * ================================================================== */

#wcwb-popup-root .wcwb-tick {
	width: 46px;
	height: 46px;
	margin: 0 0 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(157, 204, 76, 0.2);
	color: var(--wcwb-accent-text);
}

#wcwb-popup-root .wcwb-tick svg {
	width: 24px;
	height: 24px;
}

#wcwb-popup-root .wcwb-coupon {
	margin: 0 0 18px;
	padding: 18px;
	border: 1px dashed var(--wcwb-accent);
	border-radius: 14px;
	background: rgba(157, 204, 76, 0.1);
	text-align: center;
}

#wcwb-popup-root .wcwb-coupon[hidden] {
	display: none;
}

#wcwb-popup-root .wcwb-coupon-code {
	display: block;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--wcwb-text);
	text-align: center;
}

#wcwb-popup-root .wcwb-coupon-meta {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	color: var(--wcwb-accent-text);
	text-align: center;
}

#wcwb-popup-root .wcwb-coupon-note {
	display: block;
	margin-top: 8px;
	font-size: 11px;
	line-height: 1.5;
	color: var(--wcwb-text-soft);
	text-align: center;
}

#wcwb-popup-root .wcwb-copy {
	margin-top: 8px;
}

/* =====================================================================
 * Skins
 *
 * Each one is a set of token overrides plus, at most, a few structural
 * lines. They are all the same brand - the difference is how loudly it
 * is spoken.
 * ================================================================== */

/* Minimal - the default. Quiet, white, one green accent. */
#wcwb-popup-root.wcwb-skin-minimal {
	--wcwb-shadow: 0 18px 44px -20px rgba(35, 31, 32, 0.28), 0 1px 4px rgba(35, 31, 32, 0.05);
}

/* Elevated - more air, deeper lift, softer edges. */
#wcwb-popup-root.wcwb-skin-elevated {
	--wcwb-radius: 26px;
	--wcwb-pad: 34px 32px 28px;
	--wcwb-headline: 22px;
	--wcwb-surface: #ffffff;
	--wcwb-border: transparent;
	--wcwb-field-bg: #f7f8f9;
	--wcwb-shadow: 0 36px 80px -24px rgba(35, 31, 32, 0.4), 0 4px 14px rgba(35, 31, 32, 0.08);
}

/* Brand - a green band across the top. The most FXNook of them. */
#wcwb-popup-root.wcwb-skin-brand {
	--wcwb-band: linear-gradient(90deg, #9dcc4c 0%, #b8dd6e 100%);
	--wcwb-band-height: 6px;
	--wcwb-pad: 34px 28px 24px;
	--wcwb-surface-2: #fafcf6;
}

#wcwb-popup-root.wcwb-skin-brand .wcwb-popup-card {
	overflow: hidden auto;
}

#wcwb-popup-root.wcwb-skin-brand .wcwb-popup-headline {
	color: var(--wcwb-ink);
}

/* Dark - ink card, green button. Stands out against a pale site. */
#wcwb-popup-root.wcwb-skin-dark {
	--wcwb-surface: #231f20;
	--wcwb-surface-2: #2c2829;
	--wcwb-text: #f6f6f5;
	--wcwb-text-soft: #a9a7a5;
	--wcwb-border: #3a3536;
	--wcwb-field-bg: #2c2829;
	--wcwb-field-border: #413c3d;
	--wcwb-star-off: #4a4445;
	--wcwb-accent-text: #b8dd6e;
	--wcwb-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6);
}

#wcwb-popup-root.wcwb-skin-dark .wcwb-incentive-note {
	background: rgba(157, 204, 76, 0.16);
	color: #e8f3d4;
}

#wcwb-popup-root.wcwb-skin-dark .wcwb-tick {
	background: rgba(157, 204, 76, 0.18);
}

#wcwb-popup-root.wcwb-skin-dark .wcwb-error {
	background: rgba(163, 35, 32, 0.18);
	color: #ffb3b0;
}

/* Compact - a small corner card that takes up almost no room. */
#wcwb-popup-root.wcwb-skin-compact {
	--wcwb-width: 340px;
	--wcwb-radius: 14px;
	--wcwb-pad: 20px 20px 16px;
	--wcwb-headline: 17px;
	--wcwb-star-size: 24px;
	--wcwb-shadow: 0 14px 34px -14px rgba(35, 31, 32, 0.34);
}

#wcwb-popup-root.wcwb-skin-compact .wcwb-popup-sub,
#wcwb-popup-root.wcwb-skin-compact .wcwb-popup-body {
	margin-bottom: 14px;
	font-size: 13px;
}

#wcwb-popup-root.wcwb-skin-compact .wcwb-btn {
	padding: 11px 16px;
	font-size: 14px;
	border-radius: 10px;
}

#wcwb-popup-root.wcwb-skin-compact .wcwb-stars {
	margin-bottom: 14px;
}

/* Spotlight - big and centred, for when you really are asking. */
#wcwb-popup-root.wcwb-skin-spotlight {
	--wcwb-width: 520px;
	--wcwb-radius: 24px;
	--wcwb-pad: 44px 44px 34px;
	--wcwb-headline: 27px;
	--wcwb-star-size: 38px;
	--wcwb-shadow: 0 40px 90px -26px rgba(35, 31, 32, 0.45);
}

#wcwb-popup-root.wcwb-skin-spotlight .wcwb-popup-headline,
#wcwb-popup-root.wcwb-skin-spotlight .wcwb-popup-sub,
#wcwb-popup-root.wcwb-skin-spotlight .wcwb-popup-body {
	text-align: center;
}

#wcwb-popup-root.wcwb-skin-spotlight .wcwb-stars {
	justify-content: center;
	gap: 10px;
	margin-bottom: 24px;
}

#wcwb-popup-root.wcwb-skin-spotlight .wcwb-tick {
	margin-left: auto;
	margin-right: auto;
}

#wcwb-popup-root.wcwb-skin-spotlight .wcwb-popup-sub {
	font-size: 15px;
}

/* =====================================================================
 * Floating button
 * ================================================================== */

#wcwb-float {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 99997;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 12px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--wcwb-green);
	color: var(--wcwb-ink);
	font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: normal;
	letter-spacing: normal;
	text-transform: none;
	cursor: pointer;
	box-shadow: 0 10px 28px -10px rgba(35, 31, 32, 0.4);
	transition: transform 150ms ease, background 150ms ease;
}

#wcwb-float[hidden] {
	display: none !important;
}

#wcwb-float:hover {
	background: var(--wcwb-green-dark);
	color: var(--wcwb-ink);
	transform: translateY(-1px);
}

#wcwb-float svg {
	display: block;
	width: 18px;
	height: 18px;
}

/* =====================================================================
 * Phones
 * ================================================================== */

@media (max-width: 600px) {
	#wcwb-popup-root .wcwb-popup-card,
	#wcwb-popup-root.wcwb-pos-center .wcwb-popup-card,
	#wcwb-popup-root.wcwb-pos-bottom-left .wcwb-popup-card,
	#wcwb-popup-root.wcwb-pos-bottom-right .wcwb-popup-card {
		left: 8px;
		right: 8px;
		bottom: 8px;
		top: auto;
		width: auto;
		max-height: 88vh;
		padding: 24px 20px 20px;
		transform: none;
		border-radius: calc(var(--wcwb-radius) + 2px);
	}

	#wcwb-popup-root.wcwb-pos-center.is-open .wcwb-popup-card,
	#wcwb-popup-root.wcwb-anim-slide.wcwb-pos-center .wcwb-popup-card {
		transform: none;
	}

	#wcwb-popup-root .wcwb-popup-headline {
		font-size: clamp(18px, 5vw, var(--wcwb-headline));
	}

	#wcwb-popup-root .wcwb-field-row {
		display: block;
	}

	#wcwb-popup-root.wcwb-skin-spotlight .wcwb-stars {
		gap: 6px;
	}

	#wcwb-float {
		right: 14px;
		bottom: 14px;
		padding: 11px 15px;
		font-size: 13px;
	}

	/* The button and the card must never sit on top of each other. */
	#wcwb-popup-root.is-open ~ #wcwb-float {
		display: none !important;
	}
}
