/*
 * cr-jobs-seo / Job Alerts — progressive signup form.
 *
 * Matches the CRF frontend aesthetic (stacked labels, 16px inputs, 8px radii,
 * blue focus ring) so the form sits naturally alongside CRF-rendered forms.
 * Chrome only: no typography resets that would bleed into the host page.
 */

.crj-job-alerts {
	display: block;
	max-width: 520px;
	margin: 0 auto;
	padding: 24px;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: #111827;
}

/* Honeypot: off-screen (NOT display:none — bots skip display:none). */
.crj-alerts-hp {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Step rows */
.crj-alerts-field {
	display: block;
	margin-bottom: 4px;
	opacity: 1;
	transform: translateY(0);
	transition: opacity 180ms ease, transform 180ms ease;
}
.crj-alerts-field[hidden] {
	display: none;
}
.crj-alerts-field.is-revealing {
	opacity: 0;
	transform: translateY(6px);
}
.crj-alerts-field.is-complete {
	opacity: 0.72;
}
.crj-alerts-field.is-complete input {
	background: #f9fafb;
}

/* Labels */
.crj-alerts-field label {
	display: block;
	margin: 0 0 6px 0;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	letter-spacing: 0.01em;
}

/* Inputs — 16px prevents iOS zoom. */
.crj-alerts-field input[type="email"],
.crj-alerts-field input[type="text"],
.crj-alerts-field input[type="tel"] {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	font-size: 16px;
	line-height: 1.4;
	font-family: inherit;
	color: #111827;
	background: #ffffff;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	transition: border-color 120ms ease, box-shadow 120ms ease;
	appearance: none;
	-webkit-appearance: none;
}
.crj-alerts-field input:focus {
	outline: 0;
	border-color: #4f46e5;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.crj-alerts-field input[aria-invalid="true"] {
	border-color: #dc2626;
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* Action rows */
.crj-alerts-actions {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-top: 12px;
}
.crj-alerts-actions--final {
	flex-wrap: wrap;
}

/* Primary "Next" — compact. */
.crj-alerts-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 18px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	color: #ffffff;
	background: linear-gradient(135deg, #4f46e5 0%, #1d4ed8 100%);
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	transition: background 120ms ease, transform 80ms ease, box-shadow 120ms ease;
}
.crj-alerts-next:hover {
	background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
	transform: translateY(-1px);
	box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
}
.crj-alerts-next:active {
	transform: translateY(0);
}
.crj-alerts-next:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}
.crj-alerts-next.is-loading {
	color: transparent;
	position: relative;
}
.crj-alerts-next.is-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 14px;
	margin: -7px 0 0 -7px;
	border: 2px solid rgba(255, 255, 255, 0.45);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: crj-alerts-spin 700ms linear infinite;
}

/* Submit — full-width. */
.crj-alerts-submit {
	flex: 1 1 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 20px;
	font-size: 15px;
	font-weight: 600;
	font-family: inherit;
	color: #ffffff;
	background: linear-gradient(135deg, #4f46e5 0%, #1d4ed8 100%);
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	transition: background 120ms ease, transform 80ms ease, box-shadow 120ms ease;
}
.crj-alerts-submit:hover {
	background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(99, 102, 241, 0.28);
}
.crj-alerts-submit:active {
	transform: translateY(0);
}
.crj-alerts-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}
.crj-alerts-submit.is-loading {
	color: transparent;
	position: relative;
}
.crj-alerts-submit.is-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 16px;
	margin: -8px 0 0 -8px;
	border: 2px solid rgba(255, 255, 255, 0.45);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: crj-alerts-spin 700ms linear infinite;
}

/* Skip — text-link style. */
.crj-alerts-skip {
	background: none;
	border: 0;
	padding: 6px 0;
	font-size: 13px;
	font-family: inherit;
	color: #6b7280;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}
.crj-alerts-skip:hover {
	color: #374151;
}

/* Status line */
.crj-alerts-status {
	margin-top: 14px;
	min-height: 18px;
	font-size: 13px;
	line-height: 1.4;
	color: #6b7280;
}
.crj-alerts-status.is-success {
	color: #047857;
}
.crj-alerts-status.is-error {
	color: #dc2626;
}

/* Per-field errors */
.crj-alerts-error {
	margin-top: 6px;
	font-size: 12px;
	line-height: 1.4;
	color: #dc2626;
}
.crj-alerts-error[hidden] {
	display: none;
}

/* Success panel */
.crj-alerts-success {
	text-align: center;
	padding: 12px 4px 4px;
	color: #111827;
}
.crj-alerts-success__check {
	color: #059669;
	display: inline-block;
	margin-bottom: 8px;
}
.crj-alerts-success__title {
	margin: 0 0 6px 0;
	font-size: 20px;
	font-weight: 700;
	color: #065f46;
}
.crj-alerts-success__message {
	margin: 0 0 14px 0;
	font-size: 14px;
	color: #374151;
	line-height: 1.5;
}
.crj-alerts-success__reset {
	background: none;
	border: 0;
	padding: 6px 0;
	font-size: 13px;
	font-family: inherit;
	color: #4f46e5;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}
.crj-alerts-success__reset:hover {
	color: #1d4ed8;
}

/* Step separator between complete + next step */
.crj-alerts-field + .crj-alerts-field {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #f3f4f6;
}

/* Spinner keyframe */
@keyframes crj-alerts-spin {
	from { transform: rotate(0deg); }
	to   { transform: rotate(360deg); }
}

/* Respect prefers-reduced-motion. */
@media (prefers-reduced-motion: reduce) {
	.crj-alerts-field,
	.crj-alerts-next,
	.crj-alerts-submit,
	.crj-alerts-next.is-loading::after,
	.crj-alerts-submit.is-loading::after {
		transition: none;
		animation-duration: 0.001ms;
	}
	.crj-alerts-next:hover,
	.crj-alerts-submit:hover {
		transform: none;
	}
}

/* Unavailable state (form not provisioned) */
.crj-job-alerts-unavailable {
	padding: 16px 20px;
	background: #f9fafb;
	border: 1px dashed #d1d5db;
	border-radius: 8px;
	color: #6b7280;
	font-size: 14px;
	text-align: center;
}

/* Notice at Collection — small, muted fine-print. Matches the apply-modal
   sizing so both surfaces feel consistent. CSS-only sizing; HTML and copy
   are unchanged. */
.crj-alerts-notice,
.crj-alerts-notice__text,
.crj-alerts-notice__list,
.crj-alerts-notice__rights {
	font-size: 0.8125rem; /* 13px */
	line-height: 1.45;
	color: #6b7280;
}
.crj-alerts-notice {
	margin-top: 12px;
}
.crj-alerts-notice__text p {
	margin: 0.35rem 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: #6b7280;
}
/* "Notice at Collection" heading sits inside <p><strong>…</strong></p>. */
.crj-alerts-notice__text > p:first-child strong,
.crj-alerts-notice strong {
	font-size: 0.8125rem;
	color: #374151;
	font-weight: 600;
}
.crj-alerts-notice__list {
	margin: 0.25rem 0;
	padding-left: 1.1rem;
}
.crj-alerts-notice__list li {
	margin: 0.15rem 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: #6b7280;
}
.crj-alerts-notice__rights {
	margin: 0.35rem 0 0;
}
.crj-alerts-notice a {
	color: #4f46e5;
}
