/* CLE Registration form — intentionally neutral so it inherits your theme. */

.cle-reg {
	max-width: 640px;
	margin: 2rem 0;
	padding: 1.75rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 10px;
	background: #fff;
}

.cle-reg__title {
	margin: 0 0 0.25rem;
}

.cle-reg__meta {
	margin: 0 0 1.25rem;
	opacity: 0.7;
	font-size: 0.95em;
}

.cle-reg__row {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.cle-reg__field {
	flex: 1 1 240px;
	display: flex;
	flex-direction: column;
}

.cle-reg__field label {
	font-size: 0.85em;
	font-weight: 600;
	margin-bottom: 0.3rem;
}

.cle-reg__field input,
.cle-reg__field select {
	padding: 0.65rem 0.75rem;
	border: 1px solid rgba(0, 0, 0, 0.25);
	border-radius: 6px;
	font: inherit;
	font-size: 16px; /* prevents iOS zoom-on-focus */
	min-height: 44px; /* touch target */
	background: #fff;
	box-sizing: border-box;
}

.cle-reg__field input:focus,
.cle-reg__field select:focus {
	outline: 2px solid currentColor;
	outline-offset: 1px;
}

/* Honeypot — visually removed, still in DOM for bots. */
.cle-reg__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Register: the primary action — big, bold, unmissable. */
.cle-reg__submit {
	padding: 0.95rem 2.4rem;
	border: none;
	border-radius: 8px;
	background: #1d2a4a;
	color: #fff;
	font: inherit;
	font-size: 1.08em;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	min-height: 48px;
	box-shadow: 0 2px 8px rgba(29, 42, 74, 0.25);
	transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}

.cle-reg__submit:hover:not(:disabled) {
	background: #24365e;
	box-shadow: 0 4px 14px rgba(29, 42, 74, 0.32);
	transform: translateY(-1px);
}

.cle-reg__submit:focus-visible {
	outline: 3px solid #2a5db0;
	outline-offset: 2px;
}

.cle-reg__submit:disabled {
	opacity: 0.5;
	cursor: wait;
	transform: none;
}

/* In the popup the submit spans full width for maximum prominence. */
.cle-modal__box .cle-reg__form > .cle-reg__submit {
	display: block;
	width: 100%;
}

.cle-reg__msg {
	margin: 0.9rem 0 0;
	font-size: 0.95em;
	min-height: 1.2em;
}

.cle-reg__msg.is-success {
	color: #1a7a3a;
	font-weight: 600;
}

.cle-reg__msg.is-error {
	color: #b32d2e;
	font-weight: 600;
}

.cle-reg__full {
	padding: 0.9rem 1rem;
	background: rgba(0, 0, 0, 0.05);
	border-radius: 6px;
	font-weight: 600;
}

/* ---- Register button + modal ---- */

.cle-modal[hidden] {
	display: none;
}

.cle-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.cle-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.cle-modal__box {
	position: relative;
	max-width: 680px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	background: #fff;
	border-radius: 12px;
	padding: 0.5rem;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cle-modal__box .cle-reg {
	border: none;
	margin: 0;
}

/* Close: small, quiet, discoverable — never competing with the form. */
.cle-modal .cle-modal__close,
.cle-modal .cle-modal__close:hover,
.cle-modal .cle-modal__close:focus {
	position: absolute;
	top: 0.7rem;
	right: 0.7rem;
	z-index: 1;
	width: 32px !important;
	height: 32px !important;
	min-height: 0 !important;
	padding: 0 !important;
	border: none !important;
	border-radius: 50% !important;
	background: rgba(0, 0, 0, 0.06) !important;
	color: #6b7280 !important;
	font-size: 1.05rem !important;
	line-height: 32px !important;
	text-align: center;
	cursor: pointer;
	box-shadow: none !important;
	transition: background 0.15s, color 0.15s;
}

.cle-modal .cle-modal__close:hover,
.cle-modal .cle-modal__close:focus {
	background: rgba(0, 0, 0, 0.12) !important;
	color: #1d2a4a !important;
	outline: 2px solid #1d2a4a;
	outline-offset: 1px;
}

body.cle-modal-open {
	overflow: hidden;
}

/* ---- Group registration: additional attendee blocks ---- */

.cle-reg__extra {
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 8px;
	padding: 1rem 1rem 0.25rem;
	margin-bottom: 1rem;
	background: rgba(0, 0, 0, 0.02);
}

.cle-reg__extra-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.9rem;
	font-size: 0.85em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	opacity: 0.75;
}

/* Explicit colors + !important so theme/Elementor global button
   styles (white text, grey hovers, blue backgrounds) can't override. */

.cle-reg .cle-reg__remove,
.cle-reg .cle-reg__remove:hover,
.cle-reg .cle-reg__remove:focus {
	border: none !important;
	background: transparent !important;
	color: #b32d2e !important;
	font: inherit;
	font-size: 0.85em !important;
	font-weight: 600;
	cursor: pointer;
	text-transform: none;
	letter-spacing: normal;
	padding: 0.2rem 0.4rem !important;
	box-shadow: none !important;
	min-height: 0 !important;
	width: auto !important;
	display: inline-block !important;
}

.cle-reg .cle-reg__remove:hover {
	text-decoration: underline !important;
}

.cle-reg .cle-reg__add {
	display: block !important;
	width: 100% !important;
	margin-bottom: 1rem;
	padding: 0.7rem 1rem !important;
	border: 1.5px dashed #9aa3b2 !important;
	border-radius: 8px !important;
	background: #ffffff !important;
	color: #1d2a4a !important;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none !important;
}

.cle-reg .cle-reg__add:hover:not(:disabled),
.cle-reg .cle-reg__add:focus:not(:disabled) {
	background: #eef3fb !important;
	border-color: #1d2a4a !important;
	color: #1d2a4a !important;
}

.cle-reg .cle-reg__add:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	background: #ffffff !important;
	color: #6b7280 !important;
}

.cle-reg__opt {
	font-weight: 400;
	opacity: 0.6;
}

/* CLE credit line — the sentence attorneys scan for */
.cle-reg__credit {
	margin: -0.6rem 0 1.1rem;
	padding: 0.5rem 0.8rem;
	background: #eef3fb;
	border-left: 3px solid #1d2a4a;
	border-radius: 0 6px 6px 0;
	font-weight: 600;
	font-size: 0.92em;
	color: #1d2a4a;
}


/* ---- Mobile: popup becomes a full-screen sheet ---- */
@media (max-width: 600px) {
	.cle-modal {
		padding: 0;
		align-items: stretch;
	}

	.cle-modal__box {
		max-width: none;
		max-height: none;
		height: 100%;
		border-radius: 0;
		padding: 0.75rem 0.25rem 2rem;
	}

	.cle-reg {
		padding: 1.1rem;
	}

	.cle-reg__title {
		font-size: 1.25rem;
		padding-right: 44px; /* keep clear of the close button */
	}

	.cle-reg__row {
		gap: 0.6rem;
		margin-bottom: 0.8rem;
	}

	.cle-reg__field {
		flex-basis: 100%; /* one field per line on phones */
	}

	.cle-reg__submit {
		width: 100%;
		padding: 1.05rem;
	}
}

/* ================= State-story popup =================
   Click Register -> logo pulses (processing) -> logo morphs into a tick
   (success) with a multicolor spark burst -> thank-you text. */

#cle-pop {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
}

.cle-pop__overlay {
	position: absolute;
	inset: 0;
	background: rgba(27, 42, 74, 0.55);
	backdrop-filter: blur(2px);
	animation: clePopFade 0.25s ease-out;
}

.cle-pop__card {
	position: relative;
	max-width: 400px;
	width: 100%;
	background: #fff;
	border-radius: 16px;
	padding: 2.1rem 1.8rem 1.8rem;
	text-align: center;
	box-shadow: 0 24px 70px rgba(27, 42, 74, 0.35);
	animation: clePopSpring 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes clePopFade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes clePopSpring {
	0%   { opacity: 0; transform: translateY(20px) scale(0.94); }
	100% { opacity: 1; transform: translateY(0) scale(1); }
}

.cle-pop__title {
	margin: 0 0 0.5rem;
	font-size: 1.32rem;
	color: #1b2a4a;
}

.cle-pop__text {
	margin: 0 0 0.55rem;
	font-size: 1rem;
	color: #222;
	line-height: 1.55;
}

.cle-pop__sub {
	margin: 0 0 1.2rem;
	font-size: 0.9rem;
	color: #6b7280;
	line-height: 1.65;
}

.cle-pop__rise {
	animation: clePopRise 0.4s ease-out both;
}

@keyframes clePopRise {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.cle-pop__icon-muted {
	font-size: 3rem;
	line-height: 1;
	margin-bottom: 0.7rem;
}

.cle-pop__btn {
	display: block;
	width: 100%;
	padding: 0.85rem;
	border: none;
	border-radius: 10px;
	background: #1b2a4a;
	color: #fff;
	font: inherit;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	min-height: 48px;
}

.cle-pop__btn:hover:not(:disabled) {
	background: #24365e;
}

.cle-pop__btn--ghost {
	background: none;
	color: #6b7280;
	font-weight: 600;
	margin-top: 0.4rem;
	min-height: 40px;
}

.cle-pop__btn--ghost:hover {
	background: rgba(0, 0, 0, 0.04);
	color: #1b2a4a;
}

.cle-pop__shake {
	animation: clePopShake 0.4s ease-in-out;
}

@keyframes clePopShake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-7px); }
	50% { transform: translateX(6px); }
	75% { transform: translateX(-4px); }
}

/* ---- Approved visual: logo disc + ring + badge ---- */

.cle-pop__burst {
	position: relative;
	width: 132px;
	height: 132px;
	margin: 0 auto 1rem;
}

.cle-pop__ringSvg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
	transition: transform 0.3s ease;
}

.cle-pop__ring {
	stroke: #2a5db0;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-dasharray: 100 0;
}

.cle-pop__logoDisc {
	position: absolute;
	inset: 13px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 5px 20px rgba(27, 42, 74, 0.16);
	overflow: hidden;
}

.cle-pop__logoImg {
	max-width: 74%;
	max-height: 52%;
	object-fit: contain;
}

/* -------- Stage 1 · PROCESSING: ring spins, disc breathes -------- */

.is-loading .cle-pop__ring {
	stroke-dasharray: 68 32;
}

.is-loading .cle-pop__ringSvg {
	animation: cleRingSpin 1.15s linear infinite;
	transition: none;
}

@keyframes cleRingSpin {
	from { transform: rotate(-90deg); }
	to   { transform: rotate(270deg); }
}

.is-loading .cle-pop__logoDisc {
	animation: cleDiscBreathe 1.6s ease-in-out infinite;
}

@keyframes cleDiscBreathe {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.045); }
}

/* Brief settle between confirmation and celebration */
.is-pausing .cle-pop__ringSvg {
	animation: none;
}

.is-pausing .cle-pop__logoDisc {
	animation: none;
}

/* -------- Stage 2 · CONFIRMED: ring completes, badge pops -------- */

.is-success .cle-pop__ringSvg {
	animation: none;
	transform: rotate(-90deg);
}

.is-success .cle-pop__ring {
	animation: cleRingComplete 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes cleRingComplete {
	from { stroke-dasharray: 68 32; }
	to   { stroke-dasharray: 100 0; }
}

.cle-pop__badge {
	position: absolute;
	right: 2px;
	bottom: 2px;
	width: 40px;
	height: 40px;
	opacity: 0;
	transform: scale(0);
	transform-origin: center;
}

.is-success .cle-pop__badge {
	animation: cleBadgePop 0.35s cubic-bezier(0.34, 1.45, 0.64, 1) 0.4s forwards;
}

@keyframes cleBadgePop {
	from { opacity: 0; transform: scale(0); }
	to   { opacity: 1; transform: scale(1); }
}

.cle-pop__badge-bg {
	fill: #2ecc71;
	stroke: #fff;
	stroke-width: 2.5;
}

.cle-pop__badge-check {
	stroke: #fff;
	stroke-width: 3.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 24;
	stroke-dashoffset: 24;
}

.is-success .cle-pop__badge-check {
	animation: cleCheckDraw 0.25s ease-out 0.62s forwards;
}

@keyframes cleCheckDraw {
	to { stroke-dashoffset: 0; }
}

/* Static final state (reduced motion) */
.is-done .cle-pop__ring,
.is-still .cle-pop__ring {
	stroke-dasharray: 100 0;
}

.is-done .cle-pop__badge {
	opacity: 1;
	transform: scale(1);
}

.is-done .cle-pop__badge-check {
	stroke-dashoffset: 0;
}

/* ---- Sparks: multicolor release as the ring completes ---- */

.cle-pop__spark {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 7px;
	height: 7px;
	margin: -3.5px 0 0 -3.5px;
	border-radius: 50%;
	opacity: 0;
}

.is-success .cle-pop__spark {
	animation: cleSpark 0.8s cubic-bezier(0.16, 0.6, 0.3, 1) 0.42s both;
}

.cle-pop__spark--0  { background: #e74c3c; --sx: 0px;   --sy: -72px; }
.cle-pop__spark--1  { background: #2ecc71; --sx: 36px;  --sy: -62px; animation-delay: 0.46s !important; }
.cle-pop__spark--2  { background: #f39c12; --sx: 62px;  --sy: -36px; animation-delay: 0.43s !important; }
.cle-pop__spark--3  { background: #f1c40f; --sx: 72px;  --sy: 0px;   animation-delay: 0.48s !important; }
.cle-pop__spark--4  { background: #2a5db0; --sx: 62px;  --sy: 36px;  animation-delay: 0.44s !important; }
.cle-pop__spark--5  { background: #e74c3c; --sx: 36px;  --sy: 62px;  animation-delay: 0.5s !important; }
.cle-pop__spark--6  { background: #2ecc71; --sx: 0px;   --sy: 72px;  animation-delay: 0.45s !important; }
.cle-pop__spark--7  { background: #f39c12; --sx: -36px; --sy: 62px;  animation-delay: 0.49s !important; }
.cle-pop__spark--8  { background: #f1c40f; --sx: -62px; --sy: 36px;  animation-delay: 0.43s !important; }
.cle-pop__spark--9  { background: #2a5db0; --sx: -72px; --sy: 0px;   animation-delay: 0.47s !important; }
.cle-pop__spark--10 { background: #e74c3c; --sx: -62px; --sy: -36px; animation-delay: 0.51s !important; }
.cle-pop__spark--11 { background: #2ecc71; --sx: -36px; --sy: -62px; animation-delay: 0.45s !important; }

@keyframes cleSpark {
	0%   { opacity: 0; transform: translate(0, 0) scale(0.3); }
	18%  { opacity: 0.95; }
	100% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(1); }
}

/* Reduced motion: calm static states */
@media (prefers-reduced-motion: reduce) {
	.cle-pop__overlay,
	.cle-pop__card,
	.cle-pop__rise {
		animation: none;
	}
	.is-loading .cle-pop__ringSvg,
	.is-loading .cle-pop__logoDisc {
		animation: none;
	}
	.cle-pop__spark {
		display: none;
	}
}
