/**
 * Every colour, radius and size is a custom property, so the plugin settings
 * (or any theme stylesheet) can retheme the form without touching this file.
 */
.amgec-wrap {
	--amgec-accent: #b8974f;
	--amgec-panel-bg: #eaf4f8;
	--amgec-panel-border: rgba( 0, 0, 0, 0.08 );
	--amgec-heading: #14384a;
	--amgec-text: #3f5560;
	--amgec-input-bg: #ffffff;
	--amgec-input-border: rgba( 0, 0, 0, 0.14 );
	--amgec-btn-bg: #b8974f;
	--amgec-btn-text: #ffffff;
	--amgec-radius: 14px;
	--amgec-btn-radius: 6px;
	--amgec-max-width: 44rem;
	--amgec-pad: 2.5rem;
	--amgec-overlay: rgba( 12, 14, 18, 0.55 );
	--amgec-success: #1a7f5a;
	--amgec-error: #b4402f;

	max-width: var( --amgec-max-width );
	margin: 2rem auto;
}

.amgec-form {
	padding: var( --amgec-pad );
	border: 1px solid var( --amgec-panel-border );
	border-radius: var( --amgec-radius );
	background: var( --amgec-panel-bg );
	color: var( --amgec-text );
	text-align: center;
}

.amgec-heading {
	margin: 0 0 0.6rem;
	color: var( --amgec-heading );
	font-size: clamp( 1.25rem, 2.6vw, 1.75rem );
	line-height: 1.25;
	font-weight: 700;
}

/* Emoji keeps its own colour rather than inheriting the heading colour, and
   sits slightly larger so it reads as a mark rather than a character. */
.amgec-emoji {
	font-size: 1.1em;
	line-height: 1;
	margin-right: 0.15em;
	-webkit-text-fill-color: initial;
	color: initial;
}

.amgec-blurb {
	margin: 0 0 1.5rem;
	font-size: 1rem;
	line-height: 1.5;
	opacity: 0.85;
}

.amgec-row {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.amgec-email {
	width: 100%;
	max-width: 30rem;
	padding: 0.95rem 1.1rem;
	border: 1px solid var( --amgec-input-border );
	border-radius: var( --amgec-btn-radius );
	background: var( --amgec-input-bg );
	color: inherit;
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
}

.amgec-email:focus-visible {
	outline: 2px solid var( --amgec-accent );
	outline-offset: 2px;
}

.amgec-submit {
	padding: 0.85rem 2.25rem;
	border: 0;
	border-radius: var( --amgec-btn-radius );
	background: var( --amgec-btn-bg );
	color: var( --amgec-btn-text );
	font: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.amgec-submit:hover:not( [disabled] ) {
	opacity: 0.85;
}

.amgec-submit[disabled] {
	opacity: 0.55;
	cursor: default;
}

.amgec-consent {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
	justify-content: center;
	margin-top: 1rem;
	font-size: 0.82rem;
	line-height: 1.45;
	text-align: left;
}

.amgec-consent-note {
	margin: 1rem 0 0;
	font-size: 0.78rem;
	opacity: 0.65;
	line-height: 1.45;
}

/* Honeypot: off-screen rather than display:none, which some bots detect. */
.amgec-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.amgec-message {
	margin: 1rem 0 0;
	font-size: 0.92rem;
	min-height: 1.2em;
}

.amgec-message.is-success {
	color: var( --amgec-success );
	font-weight: 600;
}

.amgec-message.is-error {
	color: var( --amgec-error );
}

/* ---------- layouts ---------- */

/* Inline: no panel, sits inside body copy. */
.amgec-layout-inline .amgec-form {
	border: 0;
	padding: 0;
	background: none;
	text-align: left;
}

.amgec-layout-inline .amgec-row {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: flex-start;
}

.amgec-layout-inline .amgec-email {
	flex: 1 1 14rem;
	max-width: none;
}

.amgec-layout-inline .amgec-consent,
.amgec-layout-inline .amgec-consent-note {
	justify-content: flex-start;
}

/* Card: heavier framing with a shadow. */
.amgec-layout-card .amgec-form {
	box-shadow: 0 10px 30px rgba( 0, 0, 0, 0.08 );
}

/* ---------- spotlight ---------- */

.amgec-overlay {
	position: fixed;
	inset: 0;
	z-index: 998;
	background: var( --amgec-overlay, rgba( 12, 14, 18, 0.55 ) );
	opacity: 0;
	visibility: hidden;
	/* Decoration only — never blocks reading, scrolling or clicking. */
	pointer-events: none;
	transition: opacity 0.45s ease, visibility 0.45s ease;
}

.amgec-overlay.is-active {
	opacity: 1;
	visibility: visible;
}

.amgec-wrap.is-spotlit {
	position: relative;
	z-index: 999;
}

.amgec-wrap.is-spotlit .amgec-form {
	box-shadow: 0 18px 50px rgba( 0, 0, 0, 0.35 );
	transform: scale( 1.015 );
	transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.amgec-wrap .amgec-form {
	transition: transform 0.45s ease, box-shadow 0.45s ease;
}

@media ( prefers-reduced-motion: reduce ) {
	.amgec-overlay,
	.amgec-wrap .amgec-form,
	.amgec-submit {
		transition: none;
	}

	.amgec-wrap.is-spotlit .amgec-form {
		transform: none;
	}
}

/* ---------- small screens ---------- */

@media ( max-width: 34rem ) {
	.amgec-wrap {
		--amgec-pad: 1.5rem;
	}

	.amgec-layout-inline .amgec-email,
	.amgec-layout-inline .amgec-submit {
		flex: 1 1 100%;
	}

	.amgec-submit {
		width: 100%;
		max-width: 30rem;
	}
}
