/* Structural only. Anything a person would want to change lives in the
   Elementor Style tab, so these rules stay deliberately unopinionated. */

/* Fields flow as wrapping columns, Elementor-form style: each field carries a
   width (100% stacks, 50% pairs). The column gap is padding inside each field,
   cancelled at the edges by the negative margin, so rows stay flush. */
.wcea-form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	margin-left: calc(var(--wcea-col-gap, 0px) / -2);
	margin-right: calc(var(--wcea-col-gap, 0px) / -2);
}

.wcea-form[hidden] {
	display: none !important;
}

.wcea-field {
	width: 100%;
	box-sizing: border-box;
	padding-left: calc(var(--wcea-col-gap, 0px) / 2);
	padding-right: calc(var(--wcea-col-gap, 0px) / 2);
}

.wcea-switch,
.wcea-lost-intro,
.wcea-logged-in-message {
	width: 100%;
	box-sizing: border-box;
	padding-left: calc(var(--wcea-col-gap, 0px) / 2);
	padding-right: calc(var(--wcea-col-gap, 0px) / 2);
}

.wcea-field:last-of-type {
	margin-bottom: 0;
}

/* Labels are blocks on purpose: inline labels share the line with a narrowed
   input whenever the two happen to fit, which reads as random layout. */
.wcea-label {
	display: block;
}

.wcea-input {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
}

.wcea-input-wrap {
	position: relative;
	display: block;
}

.wcea-input-wrap .wcea-input {
	padding-right: 2.75em;
}

.wcea-reveal {
	position: absolute;
	top: 50%;
	right: 0.5em;
	transform: translateY(-50%);
	width: 1.75em;
	height: 1.75em;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	opacity: 0.55;
}

.wcea-reveal:hover,
.wcea-reveal:focus-visible {
	opacity: 1;
}

.wcea-reveal::before {
	content: "";
	display: block;
	width: 100%;
	height: 100%;
	background: currentColor;
	-webkit-mask: var(--wcea-eye) center / 1.15em no-repeat;
	mask: var(--wcea-eye) center / 1.15em no-repeat;
}

.wcea-root {
	--wcea-eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7-10-7-10-7z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
	--wcea-eye-off: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3l18 18'/%3E%3Cpath d='M10.6 5.2A9.9 9.9 0 0 1 12 5c6.4 0 10 7 10 7a17 17 0 0 1-3.1 4M6.2 6.2A17 17 0 0 0 2 12s3.6 7 10 7a9.8 9.8 0 0 0 4.2-.9'/%3E%3C/svg%3E");
}

.wcea-reveal.is-shown::before {
	-webkit-mask-image: var(--wcea-eye-off);
	mask-image: var(--wcea-eye-off);
}

.wcea-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	flex-wrap: wrap;
}

.wcea-choice {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	cursor: pointer;
}

.wcea-choice input {
	flex: 0 0 auto;
	margin: 0;
}

.wcea-submit-wrap {
	display: flex;
}

.wcea-submit {
	cursor: pointer;
	font: inherit;
}

.wcea-submit[disabled] {
	cursor: default;
	opacity: 0.65;
}

.wcea-link {
	display: inline-block;
	text-decoration: none;
	transition: all 0.2s ease;
}

.wcea-link:hover {
	text-decoration: underline;
}

.wcea-notice {
	margin-bottom: 1em;
}

.wcea-notice[hidden] {
	display: none;
}

.wcea-notice ul {
	margin: 0;
	padding-left: 1.2em;
}

.wcea-meter {
	height: 4px;
	margin-top: 0.5em;
	background: rgba(0, 0, 0, 0.1);
	border-radius: 2px;
	overflow: hidden;
}

.wcea-meter span {
	display: block;
	height: 100%;
	width: 0;
	background: #d63638;
	transition: width 0.2s ease, background-color 0.2s ease;
}

.wcea-meter[data-score="2"] span {
	background: #ef9f27;
}

.wcea-meter[data-score="3"] span {
	background: #97c459;
}

.wcea-meter[data-score="4"] span {
	background: #1d9e75;
}

.wcea-lost-intro {
	margin: 0 0 1em;
}

/* Counting down between resends — visible but clearly not clickable yet. */
.wcea-resend.is-waiting {
	opacity: 0.6;
	cursor: default;
	text-decoration: none;
}

/* --------------------------------------------------------- side image */

.wcea-root--media {
	display: flex;
	align-items: stretch;
	gap: 24px;
}

.wcea-media {
	position: relative;
	flex: 0 0 40%;
	min-height: 240px;
	order: 0;
}

.wcea-root--media .wcea-content {
	flex: 1;
	min-width: 0;
	order: 1;
}

.wcea-media-img {
	position: absolute;
	inset: 0;
	display: none;
	background-size: cover;
	background-position: center;
	border-radius: inherit;
}

/* The active view decides which image shows; the reset form borrows login's. */
.wcea-root--media[data-view="login"] .wcea-media-img--login,
.wcea-root--media[data-view="lost"] .wcea-media-img--login,
.wcea-root--media[data-view="register"] .wcea-media-img--register {
	display: block;
}

/* Equal height: both forms occupy the same grid cell, so the container is as
   tall as the taller one and the shorter one floats centered — the image
   panel never jumps on switch. Hidden forms keep their size, invisibly. */
.wcea-content--equal {
	display: grid;
	grid-template-columns: 100%;
	align-content: center;
}

.wcea-content--equal .wcea-notice {
	grid-row: 1;
	grid-column: 1;
}

.wcea-content--equal .wcea-form {
	grid-row: 2;
	grid-column: 1;
	align-self: center;
}

.wcea-content--equal .wcea-form[hidden] {
	display: flex !important;
	visibility: hidden;
	pointer-events: none;
}

@media (max-width: 767px) {
	.wcea-root--media {
		flex-direction: column;
	}

	.wcea-media {
		order: 0 !important;
		flex-basis: auto !important;
		width: 100%;
		min-height: 160px;
	}
}

/* ------------------------------------------------- popup trigger + modal */

.wcea-trigger-wrap {
	display: flex;
}

.wcea-trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	line-height: 1;
	cursor: pointer;
}

.wcea-trigger-icon {
	display: inline-flex;
}

.wcea-trigger-icon svg {
	display: block;
	width: 1.25em;
	height: 1.25em;
	fill: currentColor;
}

.wcea-modal {
	position: fixed;
	inset: 0;
	z-index: 99998;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25em;
}

.wcea-modal[hidden] {
	display: none !important;
}

.wcea-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.wcea-modal-box {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 420px;
	max-height: 90vh;
	overflow-y: auto;
	background: #fff;
	border-radius: 8px;
	padding: 2em;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.wcea-modal.is-open .wcea-modal-overlay {
	animation: wcea-fade 0.18s ease-out;
}

.wcea-modal.is-open .wcea-modal-box {
	animation: wcea-pop 0.18s ease-out;
}

@keyframes wcea-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes wcea-pop {
	from {
		opacity: 0;
		transform: translateY(8px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* Animation variants — the widget stamps one wcea-anim-* class on the modal. */
.wcea-modal.is-open.wcea-anim-fade .wcea-modal-box {
	animation-name: wcea-fade;
}

.wcea-modal.is-open.wcea-anim-slide .wcea-modal-box {
	animation-name: wcea-slide;
}

.wcea-modal.is-open.wcea-anim-none .wcea-modal-box,
.wcea-modal.is-open.wcea-anim-none .wcea-modal-overlay {
	animation: none;
}

@keyframes wcea-slide {
	from {
		opacity: 0;
		transform: translateY(40px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wcea-modal.is-open .wcea-modal-overlay,
	.wcea-modal.is-open .wcea-modal-box {
		animation: none;
	}
}

/* Small screens: thinner gutter so the popup uses the width, and a shorter
   box so browser chrome never swallows the submit button. */
@media (max-width: 767px) {
	.wcea-modal {
		padding: 0.75em;
	}

	.wcea-modal-box {
		max-height: 85vh;
	}
}

.wcea-modal-close {
	position: absolute;
	top: 0.5em;
	right: 0.5em;
	width: 1.75em;
	height: 1.75em;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 1.15em;
	line-height: 1;
	cursor: pointer;
	opacity: 0.55;
}

.wcea-modal-close:hover,
.wcea-modal-close:focus-visible {
	opacity: 1;
}

.wcea-modal-heading {
	margin: 0 0 0.75em;
}

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

/* Off-screen rather than display:none — bots read the DOM, and screen
   readers need labels even when the design hides them. */
.wcea-hp,
.wcea-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
