/* ==========================================================================
   ebg form: looks for the [ebg_contact_form] shortcode (_core/php/contact-form.php).
   .ebg-cf--boxed  e-Business.gr legacy .ebg-form: labels above, 1px boxed fields
                   on surface-0, accent focus ring, two-up rows.
   .ebg-cf--line   ebg .contact-form.style-2 (dark band): placeholders only,
                   transparent fields on a 1px white 15% bottom rule that turns
                   white on focus; two-up rows 30px apart, 27px under each field.
   Both reset Blocksy's form-field look (height, radius, border, shadow).
   Tune: --ebg-cf-gap (row gap), --ebg-cf-ink, --ebg-cf-rule, --ebg-cf-ph.
   ========================================================================== */

/* Registered so the switch gap can transition (layer-independent). */
@property --ebg-cf-switch-gap {
	syntax: "<length>";
	inherits: true;
	initial-value: 4px;
}

@layer components {

	textarea {
		field-sizing: content;
	}

	@keyframes ebg-arrow-flight {
		0%, 100% { translate: 0 0; }
		50%      { translate: 4px 0; }
	}

	@keyframes ebg-check-pop {
		0% {
			scale: 0.6;
			rotate: -180deg;
			opacity: 0;
		}
		55% {
			scale: 1.18;
			rotate: 18deg;
			opacity: 1;
		}
		75% {
			scale: 0.92;
			rotate: -6deg;
		}
		90% {
			scale: 1.04;
			rotate: 2deg;
		}
		100% {
			scale: 1;
			rotate: 0deg;
			opacity: 1;
		}
	}

	@keyframes ebg-notification-emerge {
		0% {
			opacity: 0;
			inline-size: max(61.8%, 280px);
			max-inline-size: 100%;
		}
		20% {
			opacity: 0.35;
		}
		100% {
			opacity: 1;
			inline-size: 100%;
			max-inline-size: 100%;
		}
	}

	@keyframes ebg-submit-bounce {
		0% {
			transform: scale(1);
		}
		35% {
			transform: scale(0.94);
		}
		70% {
			transform: scale(1.03);
		}
		100% {
			transform: scale(1);
		}
	}

	@keyframes ebg-spring-bounce {
		0% {
			transform: scale(0.95);
			opacity: 1;
			inline-size: max(50%, 220px);
		}
		45% {
			transform: scale(1.03);
			opacity: 1;
		}
		75% {
			transform: scale(0.99);
			opacity: 1;
		}
		100% {
			transform: scale(1);
			opacity: 1;
			inline-size: 100%;
		}
	}

	.ebg-cf {
		--ebg-cf-gap: var(--space-m);
		--ebg-cf-col-gap: var(--ebg-cf-gap); /* single length: --ebg-cf-gap may hold "row col" */
		--ebg-cf-ease: cubic-bezier(0.16, 1, 0.3, 1);

		display: flex;
		flex-direction: column;
		gap: var(--ebg-cf-gap);
		margin: 0;

		& :where(input:not([type="checkbox"]), textarea, select) {
			box-sizing: border-box;
			inline-size: 100%;
			block-size: auto;
			min-block-size: 0;
			margin: 0;
			font-family: var(--font-sans);
			box-shadow: none;
		}
	}

	.ebg-cf__row {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--ebg-cf-gap);
	}

	/* Entity + AFM row. Choosing Ιδιώτης collapses the AFM column (desktop) or
	   row (mobile) instead of snapping it away: the track count never changes,
	   so grid-template-columns / -rows interpolate (1fr -> 0fr). */
	.ebg-cf__row--entity-afm .ebg-cf__group--afm {
		white-space: nowrap; /* a narrowing column must not wrap "ΑΦΜ" letter by letter and grow the row */
	}

	.ebg-cf__row--entity-afm .ebg-cf__group--afm[hidden] {
		display: flex;
		visibility: hidden;
		opacity: 0;
		overflow: hidden;
		min-inline-size: 0;
		min-block-size: 0;
	}

	@media (min-width: 576px) {
		/* Spelled out (not repeat()) so both states are plain two-track lists. */
		.ebg-cf__row--entity-afm {
			grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		}

		.ebg-cf__row--entity-afm:has(.ebg-cf__group--afm[hidden]) {
			grid-template-columns: minmax(0, 1fr) minmax(0, 0fr);
			column-gap: 0;
		}

		/* AFM hidden: the switch spans the row and its two pills line up with
		   the two-up field row below (form-and-interaction-invariants §7). */
		.ebg-cf__row--entity-afm:has(.ebg-cf__group--afm[hidden]) .ebg-cf__switch {
			--ebg-cf-switch-gap: var(--ebg-cf-col-gap);
		}
	}

	@media (max-width: 575px) {
		.ebg-cf__row--entity-afm {
			grid-template-columns: minmax(0, 1fr);
			grid-template-rows: auto minmax(0, 1fr);
		}

		.ebg-cf__row--entity-afm:has(.ebg-cf__group--afm[hidden]) {
			grid-template-rows: auto minmax(0, 0fr);
			row-gap: 0;
		}
	}

	@media (prefers-reduced-motion: no-preference) {
		/* .ebg-cf--ready is added by ebg-cf-persist.js after the restored state
		   paints, so a restored Ιδιώτης draft does not animate on page load. */
		.ebg-cf--ready .ebg-cf__row--entity-afm {
			transition: grid-template-columns 0.4s var(--ebg-cf-ease),
			            grid-template-rows 0.4s var(--ebg-cf-ease),
			            column-gap 0.4s var(--ebg-cf-ease),
			            row-gap 0.4s var(--ebg-cf-ease);

			& .ebg-cf__group--afm {
				transition: opacity 0.25s ease, visibility 0.4s;
			}
		}
	}

	.ebg-cf__group {
		display: flex;
		flex-direction: column;
		gap: var(--space-3xs);
		margin: 0;
	}

	.ebg-cf__group[hidden] {
		display: none;
	}

	.ebg-cf__label--hidden,
	.ebg-cf__live {
		position: absolute;
		inline-size: 1px;
		block-size: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
		border: 0;
	}

	.ebg-cf__opt { font-weight: 400; opacity: 0.75; }

	.ebg-cf__hp { position: absolute; inset-inline-start: -9999px; inline-size: 1px; block-size: 1px; overflow: hidden; }

	.ebg-cf__check {
		display: flex;
		align-items: flex-start;
		gap: var(--space-2xs);
		cursor: pointer;
	}

	.ebg-cf__checkbox { flex: none; margin-block-start: 3px; accent-color: var(--ebg-accent); }

	.ebg-cf__note {
		box-sizing: border-box;
		display: flex;
		align-items: center;
		gap: 0.875rem;
		margin: 0;
		padding: 0.875rem 1.25rem;
		border-radius: var(--radius-sm, 8px);
		font-size: var(--text-sm, 0.9375rem);
		font-weight: 500;
		line-height: 1.45;
		border: 1px solid transparent;
		box-shadow: 0 4px 16px -2px rgb(15 23 42 / 0.08);

		&::before {
			content: "";
			display: inline-block;
			flex: none;
			inline-size: 1.35rem;
			block-size: 1.35rem;
			background-color: currentColor;
			mask-size: contain;
			mask-repeat: no-repeat;
			mask-position: center;
			-webkit-mask-size: contain;
			-webkit-mask-repeat: no-repeat;
			-webkit-mask-position: center;
		}

		&.ebg-cf__note--sent {
			background: linear-gradient(135deg, #D1FAE5 0%, #ECFDF5 100%);
			border-color: #059669;
			border-inline-start: 5px solid #047857;
			color: #064E3B;
			font-weight: 600;
			box-shadow: 0 4px 18px -2px rgb(16 185 129 / 0.30);

			&::before {
				mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z' clip-rule='evenodd'/%3E%3C/svg%3E");
				-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z' clip-rule='evenodd'/%3E%3C/svg%3E");
			}
		}

		&.ebg-cf__note--error,
		&.ebg-cf__note--error_afm,
		&.ebg-cf__note--wait {
			background: linear-gradient(135deg, #FEE2E2 0%, #FEF2F2 100%);
			border-color: #DC2626;
			border-inline-start: 5px solid #B91C1C;
			color: #7F1D1D;
			font-weight: 600;
			box-shadow: 0 4px 18px -2px rgb(239 68 68 / 0.30);

			&::before {
				mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z' clip-rule='evenodd'/%3E%3C/svg%3E");
				-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z' clip-rule='evenodd'/%3E%3C/svg%3E");
			}
		}
	}


	.ebg-cf__actions { margin: 0; }

	/* Segmented switch (Επιχείρηση / Ιδιώτης). One indicator pill (::before)
	   slides under the checked option; the labels only change colour. */
	.ebg-cf__group--entity {
		margin: 0;
	}

	.ebg-cf__switch {
		--_pad: 3px;
		--_dir: 1;

		position: relative;
		isolation: isolate;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: stretch;
		column-gap: var(--ebg-cf-switch-gap);
		padding: var(--_pad);
		background: var(--ebg-surface-1, #f1f5f9);
		border: 1px solid var(--ebg-border-subtle, #e2e8f0);
		border-radius: var(--radius-sm, 6px);
		inline-size: 100%;
		block-size: 40px;
		box-sizing: border-box;

		&:dir(rtl) { --_dir: -1; }

		&::before {
			content: "";
			position: absolute;
			z-index: -1;
			inset-block: var(--_pad);
			inset-inline-start: var(--_pad);
			inline-size: calc((100% - 2 * var(--_pad) - var(--ebg-cf-switch-gap)) / 2);
			box-sizing: border-box;
			border: 1px solid transparent; /* visible in forced-colors mode, where backgrounds are dropped */
			border-radius: var(--radius-xs, 4px);
			background: var(--ebg-surface-0, #ffffff);
			box-shadow: 0 1px 3px rgb(0 0 0 / 0.08);
			pointer-events: none;
		}

		&:has(.ebg-cf__switch-opt:last-child .ebg-cf__switch-radio:checked)::before {
			translate: calc((100% + var(--ebg-cf-switch-gap)) * var(--_dir)) 0;
		}
	}

	.ebg-cf__switch-opt {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
		margin: 0;
		min-inline-size: 0;
	}

	.ebg-cf__switch-radio {
		position: absolute;
		opacity: 0;
		inline-size: 0;
		block-size: 0;
		pointer-events: none;
	}

	.ebg-cf__switch-label {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		inline-size: 100%;
		block-size: 100%;
		padding-inline: 12px;
		border-radius: var(--radius-xs, 4px);
		font-size: var(--fs-13, 13px);
		font-weight: 500;
		color: var(--ebg-ink-2, #64748b);
		-webkit-user-select: none;
		user-select: none;
		box-sizing: border-box;
	}

	.ebg-cf__switch-radio:checked + .ebg-cf__switch-label {
		color: var(--ebg-ink, #0f172a);
		font-weight: 600;
	}

	/* The radios are visually hidden, so their focus ring goes on the label. */
	.ebg-cf__switch-radio:focus-visible + .ebg-cf__switch-label {
		outline: 2px solid var(--ebg-accent, #146E6E);
		outline-offset: 1px;
	}

	.ebg-cf--line .ebg-cf__switch {
		background: rgb(255 255 255 / 0.06);
		border-color: var(--ebg-cf-rule);
		block-size: 47px;

		&::before {
			background: rgb(255 255 255 / 0.15);
			box-shadow: none;
		}
	}

	.ebg-cf--line .ebg-cf__switch-label {
		color: var(--ebg-cf-ink);
	}

	.ebg-cf--line .ebg-cf__switch-radio:checked + .ebg-cf__switch-label {
		color: #ffffff;
	}

	.ebg-cf--line .ebg-cf__switch-radio:focus-visible + .ebg-cf__switch-label {
		outline-color: #ffffff;
	}

	@media (prefers-reduced-motion: no-preference) {
		/* The gap is a registered <length>, so it interpolates and the indicator's
		   width and offset (both computed from it) stay locked to the pills. */
		.ebg-cf--ready .ebg-cf__switch {
			transition: --ebg-cf-switch-gap 0.4s var(--ebg-cf-ease);

			&::before {
				transition: translate 0.4s var(--ebg-cf-ease);
			}
		}

		.ebg-cf--ready .ebg-cf__switch-label {
			transition: color 0.25s ease, font-weight 0.25s ease;
		}
	}

	/* Boxed (legacy e-Business.gr) */
	.ebg-cf--boxed {
		& .ebg-cf__label {
			color: var(--ebg-ink);
			font-size: var(--fs-13);
			font-weight: 600;
		}

		& .ebg-cf__control {
			padding: 0.75rem 1rem;
			border: 1px solid var(--ebg-border-strong);
			border-radius: var(--radius-xs);
			background-color: var(--ebg-surface-0);
			color: var(--ebg-ink);
			font-size: var(--text-sm);
			line-height: 1.5;
			transition: var(--dur-fast);
			transition-property: border-color, background-color, box-shadow;

			&:focus {
				border-color: var(--ebg-accent);
				outline: 2px solid transparent; /* becomes the ring in forced-colors mode, which drops box-shadow */
				background-color: var(--ebg-surface-1);
				box-shadow: 0 0 0 2px var(--ebg-accent-ring);
			}

			&:is(.ebg-cf__control--invalid, [aria-invalid="true"]) {
				border-color: #EF4444;
				box-shadow: 0 0 0 2px rgb(239 68 68 / 0.25);
			}
		}

		/* Rendered legacy sizes (Blocksy field heights): inputs 40px, textarea auto-sizes with content. */
		& :is(input.ebg-cf__control, select.ebg-cf__control) { block-size: 40px; padding-block: 0; }
		& .ebg-cf__control--textarea {
			field-sizing: content;
			min-block-size: 140px;
			resize: vertical;
		}

		& .ebg-cf__group--consent {
			color: var(--ebg-ink-3);
			font-size: var(--fs-12);
			line-height: 1.4;

			&:has(.ebg-cf__checkbox:is(.ebg-cf__control--invalid, [aria-invalid="true"])) {
				color: #DC2626;
			}
		}

		& .ebg-cf__actions {
			display: flex;
			justify-content: flex-start;
			margin: 0;
			inline-size: 100%;
		}

		& .ebg-cf__submit {
			inline-size: auto;
			min-inline-size: 220px;
			max-inline-size: 280px;
			justify-content: space-between;
		}

		& .ebg-cf__submit-text {
			display: inline-block;
		}

		& .ebg-cf__actions .ebg-cf__submit.ebg-cf__submit--submitting {
			opacity: 0.88;
			inline-size: max(61.8%, 210px);
			max-inline-size: 100%;
			min-inline-size: min(100%, 210px);
			cursor: wait;
			pointer-events: none;
			color: #FFFFFF;
			text-shadow: none;
			background: var(--ebg-btn-bg);
			box-shadow: none;

			& .ebg-cf__submit-text {
				color: #FFFFFF;
				text-shadow: none;
			}

			&::after {
				rotate: 0deg;
			}
		}

		& .ebg-cf__actions .ebg-cf__submit.ebg-cf__submit--eclipse {
			opacity: 0;
			inline-size: max(61.8%, 250px);
			max-inline-size: 100%;
			min-inline-size: min(100%, 250px);
			pointer-events: none;
		}

		& .ebg-cf__actions .ebg-cf__submit.ebg-cf__submit--sent {
			opacity: 1;
			inline-size: 100%;
			max-inline-size: 100%;
			min-inline-size: 0;
			min-block-size: 52px;
			block-size: auto;
			padding: 5px 5px 5px 25px;
			border-radius: 50px;
			border: 0;
			background: var(--ebg-btn-bg);
			box-shadow: 0 4px 18px -2px rgb(20 110 110 / 0.40);
			cursor: default;
			pointer-events: none;
			color: #FFFFFF;
			text-shadow: none;

			&:is(:hover, :focus-visible) {
				text-shadow: none;
			}

			& .ebg-cf__submit-text {
				opacity: 1;
				color: #FFFFFF;
				font-size: var(--fs-15);
				font-weight: 600;
				line-height: 1.4;
				text-align: left;
				text-shadow: none;
				flex: 1 1 auto;
			}

			&::after {
				content: "\e911";
				font-family: "ebg-icons";
				background: var(--ebg-btn-disc);
				color: var(--ebg-btn-disc-ink, #FFFFFF);
				font-size: var(--fs-14);
				line-height: 1;
				display: inline-flex;
				align-items: center;
				justify-content: center;
				rotate: 0deg;
			}
		}

		& .ebg-cf__actions .ebg-cf__submit.ebg-cf__submit--error {
			inline-size: 100%;
			max-inline-size: 100%;
			min-inline-size: 0;
			min-block-size: 52px;
			block-size: auto;
			padding: 5px 5px 5px 25px;
			border-radius: 50px;
			border: 0;
			background: #991B1B;
			box-shadow: 0 4px 18px -2px rgb(239 68 68 / 0.35);
			cursor: default;
			color: #FFFFFF;
			text-shadow: none;

			&:is(:hover, :focus-visible) {
				text-shadow: none;
			}

			& .ebg-cf__submit-text {
				color: #FFFFFF;
				font-size: var(--fs-15);
				font-weight: 600;
				line-height: 1.4;
				text-align: left;
				text-shadow: none;
				flex: 1 1 auto;
			}

			&::after {
				content: "!";
				font-family: inherit;
				background: var(--ebg-btn-disc);
				color: #FFFFFF;
				font-size: var(--fs-16);
				font-weight: 700;
				line-height: 1;
				display: inline-flex;
				align-items: center;
				justify-content: center;
				rotate: 0deg;
			}
		}
	}

	/* Line (ebg contact-form style-2, on a dark surface) */
	.ebg-cf--line {
		--ebg-cf-gap: 27px 30px;
		--ebg-cf-col-gap: 30px;
		--ebg-cf-ink: var(--ebg-on-dark-2, #A9B8B8);
		--ebg-cf-rule: rgb(255 255 255 / 0.15);

		& .ebg-cf__control {
			padding: 11px 0;
			border: 0;
			border-block-end: 1px solid var(--ebg-cf-rule);
			border-radius: 0;
			background-color: transparent;
			color: var(--ebg-cf-ink);
			font-size: var(--fs-16, 1rem);
			line-height: 1.5; /* ebg fields: 11px + 24px + 11px + 1px rule = 47px */
			transition: border-color 0.3s ease;

			&::placeholder { color: var(--ebg-cf-ink); opacity: 1; }
			&:focus { border-color: #FFFFFF; outline: 2px solid transparent; }
			&:is(.ebg-cf__control--invalid, [aria-invalid="true"]) { border-block-end-color: #EF4444; }
		}

		& .ebg-cf__control--select {
			appearance: none;
			padding-inline-end: 24px;
			background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right center / 13px no-repeat;

			& option { background-color: var(--ebg-surface-anchor); color: #FFFFFF; }
		}

		& .ebg-cf__control--textarea {
			field-sizing: content;
			min-block-size: 120px;
			resize: vertical;
		}

		& .ebg-cf__group--consent {
			color: var(--ebg-cf-ink);
			font-size: var(--fs-13);
			line-height: 1.4;

			&:has(.ebg-cf__checkbox:is(.ebg-cf__control--invalid, [aria-invalid="true"])) {
				color: #F87171;
			}
		}

		& .ebg-cf__note--sent {
			background: linear-gradient(135deg, rgb(16 185 129 / 0.28) 0%, rgb(5 150 105 / 0.16) 100%);
			background-color: rgb(6 78 59 / 0.85);
			border-color: #10B981;
			border-inline-start-color: #34D399;
			color: #D1FAE5;
			box-shadow: 0 4px 20px -2px rgb(16 185 129 / 0.35);
		}

		& :is(.ebg-cf__note--error, .ebg-cf__note--error_afm, .ebg-cf__note--wait) {
			background: linear-gradient(135deg, rgb(239 68 68 / 0.28) 0%, rgb(220 38 38 / 0.16) 100%);
			background-color: rgb(127 29 29 / 0.85);
			border-color: #EF4444;
			border-inline-start-color: #F87171;
			color: #FEE2E2;
			box-shadow: 0 4px 20px -2px rgb(239 68 68 / 0.35);
		}

		& .ebg-cf__actions { margin-block-start: 3px; } /* ebg submit sits 30px under the last rule */
	}

	@media (max-width: 575px) {
		.ebg-cf__row { grid-template-columns: minmax(0, 1fr); }
		.ebg-cf--boxed .ebg-cf__actions,
		.ebg-cf--boxed .ebg-cf__submit {
			inline-size: 100%;
			max-inline-size: none;
		}
	}

	/* Motion opts in. Static states above are the final frames. */
	@media (prefers-reduced-motion: no-preference) {
		.ebg-cf__note {
			animation: ebg-fade-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;

			&::before { animation: ebg-gelatine 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.12s both; }
		}

		/* .ebg-cf__actions lifts it over the pill's transition (0,2,0) regardless of file order */
		.ebg-cf--boxed .ebg-cf__actions .ebg-cf__submit {
			transition: inline-size 0.5s cubic-bezier(0.16, 1, 0.3, 1),
			            max-inline-size 0.5s cubic-bezier(0.16, 1, 0.3, 1),
			            min-inline-size 0.5s cubic-bezier(0.16, 1, 0.3, 1),
			            opacity 0.25s ease,
			            transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
			            background-color 0.4s ease,
			            box-shadow 0.4s ease,
			            padding 0.4s ease;

			& .ebg-cf__submit-text { transition: opacity 0.25s ease; }
		}

		.ebg-cf--boxed .ebg-cf__actions .ebg-cf__submit.ebg-cf__submit--submitting {
			animation: ebg-submit-bounce 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
			transition: inline-size 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
			            opacity 0.25s ease;

			&::after { animation: ebg-arrow-flight 0.8s ease-in-out infinite; }
		}

		/* Declared after --submitting: both classes are present mid-swap. */
		.ebg-cf--boxed .ebg-cf__actions .ebg-cf__submit.ebg-cf__submit--eclipse {
			transition: inline-size 0.22s cubic-bezier(0.4, 0, 1, 1),
			            opacity 0.22s cubic-bezier(0.4, 0, 1, 1);
		}

		.ebg-cf--boxed .ebg-cf__actions .ebg-cf__submit.ebg-cf__submit--sent {
			transition: none;
			animation: ebg-spring-bounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;

			&::after { animation: ebg-check-pop 0.55s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
		}

		.ebg-cf--boxed .ebg-cf__actions .ebg-cf__submit.ebg-cf__submit--error {
			transition: none;
			animation: ebg-notification-emerge 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;

			& .ebg-cf__submit-text { animation: ebg-fade-up 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; }

			&::after { animation: ebg-check-pop 0.55s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
		}
	}

	/* An AI agent is filling the form (WebMCP, contact-form.php toolname), and
	   the send button waiting for the visitor's review. Separate rules: browsers
	   without WebMCP drop only these. */
	.ebg-cf:tool-form-active {
		outline: 2px dashed var(--ebg-accent);
		outline-offset: 8px;
	}

	.ebg-cf :tool-submit-active {
		outline: 2px solid var(--ebg-accent);
		outline-offset: 3px;
	}
}
