/**
 * PrivacyForm component — public self-service privacy page.
 *
 * A small centered card for the two phases (request / confirm) and the standalone
 * notices (invalid / already-done). Reuses the EmailSender --mes-* palette so the
 * public page stays visually consistent with the rest of the plugin UI.
 */

.sm-privacy {
	--smp-primary: #2271b1;
	--smp-primary-hover: #135e96;
	--smp-border: #e2e8f0;
	--smp-text: #1e293b;
	--smp-text-secondary: #64748b;
	--smp-success: #00a32a;
	--smp-error: #d63638;

	box-sizing: border-box;
	max-width: 460px;
	margin: 32px auto;
	padding: 28px 28px 24px;
	font-family: -apple-system, blinkmacsystemfont, "Segoe UI", roboto, helvetica, arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--smp-text);
	background: #fff;
	border: 1px solid var(--smp-border);
	border-radius: 10px;
	box-shadow: 0 4px 6px -1px rgb(0 0 0 / 10%);
}

.sm-privacy * {
	box-sizing: border-box;
}

.sm-privacy p {
	margin: 0 0 16px;
}

.sm-privacy label {
	display: block;
	margin-bottom: 16px;
	font-size: 14px;
	font-weight: 600;
	color: var(--smp-text);
}

.sm-privacy input[type="email"] {
	display: block;
	width: 100%;
	margin-top: 6px;
	padding: 10px 12px;

	/* 16px keeps iOS Safari from auto-zooming the viewport on focus. */
	font-size: 16px;
	font-family: inherit;
	color: var(--smp-text);
	border: 1px solid #cbd5e1;
	border-radius: 6px;
}

.sm-privacy input[type="email"]:focus {
	border-color: var(--smp-primary);
	outline: none;
	box-shadow: 0 0 0 3px rgb(34 113 177 / 15%);
}

/* Turnstile widget slot (only rendered when the captcha is configured). */
.sm-privacy-captcha {
	margin: 0 0 16px;
}

.sm-privacy-submit,
.sm-privacy-confirm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 42px;
	padding: 0 22px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	cursor: pointer;
	background: var(--smp-primary);
	border: none;
	border-radius: 6px;
	transition: background 0.2s;
}

.sm-privacy-submit:hover:not(:disabled),
.sm-privacy-confirm-btn:hover:not(:disabled) {
	background: var(--smp-primary-hover);
}

.sm-privacy-submit:disabled,
.sm-privacy-confirm-btn:disabled {
	cursor: default;
	opacity: 0.6;
}

.sm-privacy-status {
	margin-top: 16px;
	font-size: 14px;
}

.sm-privacy-status:empty {
	display: none;
}

.sm-privacy-status.is-success {
	color: var(--smp-success);
}

.sm-privacy-status.is-error {
	color: var(--smp-error);
}

/* Non-colour cue so success/error is distinguishable without relying on hue. */
.sm-privacy-status.is-success::before {
	content: "\2713\00a0"; /* check mark + nbsp */
}

.sm-privacy-status.is-error::before {
	content: "\26a0\00a0"; /* warning sign + nbsp */
}

/* Explanatory header. */
.sm-privacy-title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--smp-text);
}

.sm-privacy-intro {
	color: var(--smp-text-secondary);
}

.sm-privacy-stepshead {
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 600;
}

/* "How it works" — a numbered, badge-bulleted list. */
.sm-privacy-steps {
	margin: 0 0 22px;
	padding: 0;
	list-style: none;
	counter-reset: smp-step;
}

.sm-privacy-steps li {
	position: relative;
	min-height: 24px;
	padding: 2px 0 14px 36px;
	font-size: 14px;
	counter-increment: smp-step;
}

.sm-privacy-steps li:last-child {
	padding-bottom: 0;
}

.sm-privacy-steps li::before {
	content: counter(smp-step);
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	font-size: 13px;
	font-weight: 700;
	color: var(--smp-primary);
	background: rgb(34 113 177 / 12%);
	border-radius: 50%;
}

/* Email field hint (shown only when the contact has no email on record). */
.sm-privacy-hint {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	font-weight: 400;
	color: var(--smp-text-secondary);
}

/* Reversibility footnote. */
.sm-privacy-note {
	margin: 18px 0 0;
	padding-top: 16px;
	font-size: 13px;
	color: var(--smp-text-secondary);
	border-top: 1px solid var(--smp-border);
}

/* Standalone notices carry no button — keep the message comfortably spaced. */
.sm-privacy-invalid p,
.sm-privacy-done p {
	margin: 0;
}
