/*
 * Everything is scoped under .cp-signup for the same reason cp-demo.css is:
 * Elementor's global kit styles `.elementor-kit-6 button` at (0,1,1) and would
 * otherwise repaint every control in this flow.
 */

.cp-signup {
	--cp-accent: #c1272d;
	--cp-teal: #2b7f8f;
	--cp-line: #e3e6e8;
	--cp-muted: #6b7478;
	--cp-ok: #2e7d32;

	max-width: 720px;
	margin: 0 auto;
}

/* --- progress --- */

.cp-signup .cp-signup__progress {
	display: flex;
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
	gap: 0.25rem;
	counter-reset: none;
}

.cp-signup .cp-signup__step {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
	position: relative;
	font-size: 0.72rem;
	color: var(--cp-muted);
	text-align: center;
}

.cp-signup .cp-signup__step::before {
	content: "";
	position: absolute;
	top: 13px;
	left: -50%;
	width: 100%;
	height: 2px;
	background: var(--cp-line);
	z-index: 0;
}

.cp-signup .cp-signup__step:first-child::before {
	display: none;
}

.cp-signup .cp-signup__step-num {
	position: relative;
	z-index: 1;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: #fff;
	border: 2px solid var(--cp-line);
	font-weight: 700;
	font-size: 0.78rem;
	line-height: 1;
}

.cp-signup .cp-signup__step.is-active .cp-signup__step-num {
	border-color: var(--cp-accent);
	color: var(--cp-accent);
}

.cp-signup .cp-signup__step.is-done .cp-signup__step-num {
	background: var(--cp-ok);
	border-color: var(--cp-ok);
	color: #fff;
}

.cp-signup .cp-signup__step.is-active .cp-signup__step-label {
	color: var(--cp-accent);
	font-weight: 600;
}

/* --- panels + fields --- */

.cp-signup .cp-signup__panel[hidden] {
	display: none;
}

.cp-signup .cp-signup__panel h3 {
	margin: 0 0 0.4rem;
}

.cp-signup .cp-signup__lede {
	color: var(--cp-muted);
	font-size: 0.88rem;
	line-height: 1.6;
	margin-bottom: 1.25rem;
}

.cp-signup label {
	display: block;
	margin-bottom: 1rem;
	font-size: 0.85rem;
	font-weight: 600;
}

.cp-signup label small {
	display: block;
	font-weight: 400;
	color: var(--cp-muted);
	margin-top: 0.3rem;
}

.cp-signup input[type="text"],
.cp-signup input[type="email"],
.cp-signup input[type="password"],
.cp-signup input[type="tel"],
.cp-signup select,
.cp-signup textarea {
	width: 100%;
	margin-top: 0.35rem;
	padding: 0.6rem 0.7rem;
	border: 1px solid var(--cp-line);
	border-radius: 4px;
	font-size: 0.95rem;
	font-weight: 400;
	background: #fff;
}

.cp-signup input:focus,
.cp-signup select:focus,
.cp-signup textarea:focus {
	outline: 2px solid var(--cp-teal);
	outline-offset: 1px;
	border-color: var(--cp-teal);
}

.cp-signup .cp-signup__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 1rem;
}

.cp-signup .cp-req {
	color: var(--cp-accent);
}

.cp-signup .cp-signup__inline {
	display: flex;
	align-items: flex-start;
	gap: 0.55rem;
	font-weight: 400;
}

.cp-signup .cp-signup__inline input[type="checkbox"] {
	margin-top: 0.15rem;
	flex: 0 0 auto;
}

/* --- terms --- */

.cp-signup .cp-signup__terms {
	max-height: 400px;
	overflow-y: auto;
	border: 1px solid var(--cp-line);
	border-radius: 4px;
	padding: 1.25rem;
	background: #fcfdfd;
	font-size: 0.83rem;
	line-height: 1.7;
}

.cp-signup .cp-signup__terms:focus {
	outline: 2px solid var(--cp-teal);
}

.cp-signup .cp-signup__terms p {
	margin: 0 0 1rem;
}

.cp-signup .cp-signup__terms-end {
	text-align: center;
	color: var(--cp-muted);
	font-style: italic;
	margin-bottom: 0 !important;
}

.cp-signup .cp-signup__scroll-hint {
	font-size: 0.78rem;
	color: var(--cp-accent);
	margin: 0.6rem 0 1rem;
}

.cp-signup .cp-signup__scroll-hint.is-done {
	color: var(--cp-ok);
}

/* --- certification --- */

.cp-signup .cp-signup__cert {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	font-weight: 400;
	font-size: 0.84rem;
	line-height: 1.6;
	padding: 0.9rem;
	border: 1px solid var(--cp-line);
	border-radius: 4px;
	margin-bottom: 0.6rem;
}

.cp-signup .cp-signup__cert input[type="checkbox"] {
	margin-top: 0.25rem;
	flex: 0 0 auto;
}

.cp-signup .cp-signup__optional {
	display: inline-block;
	margin-left: 0.4rem;
	font-size: 0.72rem;
	color: var(--cp-muted);
	border: 1px solid var(--cp-line);
	border-radius: 3px;
	padding: 0 0.3rem;
	font-style: normal;
}

.cp-signup .cp-signup__notice {
	background: #fff8e5;
	border-left: 3px solid #e0a800;
	padding: 0.9rem 1.1rem;
	font-size: 0.82rem;
	line-height: 1.6;
	margin: 1.25rem 0;
}

/* --- signature pad --- */

.cp-signup .cp-signup__sign-block {
	margin-bottom: 1rem;
}

.cp-signup .cp-signup__sign-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 0.85rem;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

.cp-signup .cp-signup__clear {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--cp-muted);
	text-decoration: underline;
	cursor: pointer;
}

.cp-signup .cp-signup__clear:hover {
	color: var(--cp-accent);
}

.cp-signup .cp-signup__pad-wrap {
	position: relative;
	border: 1px solid var(--cp-line);
	border-radius: 4px;
	background: #fcfdfd;
	height: 170px;
	overflow: hidden;
}

.cp-signup .cp-signup__pad {
	display: block;
	width: 100%;
	height: 100%;
	/* Without this a signing gesture scrolls the page instead of drawing. */
	touch-action: none;
	cursor: crosshair;
	position: relative;
	z-index: 2;
}

/* The baseline of the paper form's signature line. */
.cp-signup .cp-signup__pad-line {
	position: absolute;
	left: 8%;
	right: 8%;
	bottom: 38px;
	border-bottom: 1px solid #c9d1d4;
	z-index: 0;
}

.cp-signup .cp-signup__pad-hint {
	position: absolute;
	left: 50%;
	bottom: 46px;
	transform: translateX(-50%);
	color: #b3bcc0;
	font-size: 0.85rem;
	letter-spacing: 0.04em;
	pointer-events: none;
	z-index: 1;
}

/* --- nav buttons --- */

.cp-signup .cp-signup__nav {
	display: flex;
	gap: 0.6rem;
	justify-content: flex-end;
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--cp-line);
}

.cp-signup .cp-signup__next,
.cp-signup .cp-signup__submit,
.cp-signup .cp-signup__back {
	appearance: none;
	border: 1px solid transparent;
	border-radius: 4px;
	padding: 0.65rem 1.5rem;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.cp-signup .cp-signup__next,
.cp-signup .cp-signup__submit {
	background-color: var(--cp-accent);
	color: #fff;
}

.cp-signup .cp-signup__back {
	background-color: transparent;
	border-color: var(--cp-line);
	color: var(--cp-muted);
	margin-right: auto;
}

.cp-signup .cp-signup__next:disabled,
.cp-signup .cp-signup__submit:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* --- error + confirmation --- */

.cp-signup .cp-signup__error {
	background: #fdeaea;
	border-left: 3px solid var(--cp-accent);
	padding: 0.8rem 1rem;
	font-size: 0.85rem;
	margin-bottom: 1.25rem;
}

.cp-signup .cp-signup__done {
	text-align: center;
	padding: 2rem 1rem;
}

.cp-signup .cp-signup__done-sig {
	display: block;
	max-width: 260px;
	height: auto;
	margin: 1.5rem auto 0;
	padding-bottom: 0.4rem;
	border-bottom: 1px solid var(--cp-line);
}

.cp-signup .cp-signup__summary {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.5rem 1.25rem;
	max-width: 420px;
	margin: 2rem auto 0;
	text-align: left;
	font-size: 0.85rem;
	border-top: 1px solid var(--cp-line);
	padding-top: 1.25rem;
}

.cp-signup .cp-signup__summary dt {
	color: var(--cp-muted);
	font-weight: 600;
}

.cp-signup .cp-signup__summary dd {
	margin: 0;
}

.cp-signup .cp-signup__done-actions {
	margin-top: 1.5rem;
}

/*
 * The theme fights for this one. On /my-account/ Elementor ships
 *   .elementor-widget-woocommerce-my-account … .woocommerce a { color: … }
 * at specificity (0,4,1), which beat the original `.cp-signup .cp-…__done-link`
 * (0,2,0) and painted the label in --links-normal-color. That happens to be
 * rgb(43,140,158) against this rgb(43,127,143) background — near-identical, so
 * the button rendered as a blank slab with invisible text.
 *
 * Matching the class three times (same element, so it always matches) buys
 * (0,3,0) plus the [data-…] attribute for (0,4,0) — enough here, and unlike
 * !important it still leaves room for a deliberate override later. Colours are
 * pinned to literals rather than the theme's variables so a palette change
 * upstream can't collapse the contrast again.
 */
.cp-signup a.cp-signup__done-link.cp-signup__done-link[data-cp-done-link] {
	display: inline-block;
	padding: 0.7rem 1.4rem;
	border-radius: 4px;
	background: #1f6b78;
	color: #ffffff;
	text-decoration: none;
	font-weight: 600;
	border: 1px solid #17545e;
}

.cp-signup a.cp-signup__done-link.cp-signup__done-link[data-cp-done-link]:hover,
.cp-signup a.cp-signup__done-link.cp-signup__done-link[data-cp-done-link]:focus {
	background: #17545e;
	color: #ffffff;
	text-decoration: none;
}

/*
 * Honeypot. Off-screen rather than display:none or visibility:hidden — a bot
 * that evaluates styles skips fields it can tell are hidden, but fills one that
 * is laid out normally and merely parked outside the viewport. Kept out of the
 * tab order and the accessibility tree by the markup (tabindex, aria-hidden).
 */
.cp-signup .cp-signup__hp {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 560px) {
	.cp-signup .cp-signup__grid {
		grid-template-columns: 1fr;
	}
	.cp-signup .cp-signup__step-label {
		display: none;
	}
}
