/* Edumeal contact-form popup (.ecf). Uses the site's Oxygen tokens from
   variables.css with fallbacks, and the shared .ubtn primitive for buttons.
   Breakpoints follow the site: 767 (phone layout). Not an Oxygen stylesheet:
   it is enqueued by the edumeal-contact-form mu-plugin. */

.ecf[hidden] { display: none !important; }
.ecf {
	position: fixed; inset: 0; z-index: 100000;
	display: flex; align-items: center; justify-content: center;
	padding: 24px;
	font-family: var(--font-body, proxima-nova, sans-serif);
	color: var(--text, #000);
}
.ecf__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); } /* same dimming as the YAP profile dialog */
.ecf__dialog {
	position: relative; width: 100%; max-width: 780px; max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	display: flex; flex-direction: column;
	background: var(--primary-white, #fff); border-radius: 16px;
	box-shadow: 0 12px 40px -8px rgba(0, 0, 0, .35);
	overflow: hidden; outline: none;
	animation: ecf-in .18s ease-out;
}
@keyframes ecf-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* Closing fades the overlay and the dialog out together (contact-form.js close(): the class stays
   for CLOSE_MS, then the popup is hidden). */
.ecf.is-closing { pointer-events: none; }
.ecf.is-closing .ecf__overlay, .ecf.is-closing .ecf__dialog { animation: ecf-out .25s ease-in forwards; }
@keyframes ecf-out { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ecf__dialog, .ecf.is-closing .ecf__overlay, .ecf.is-closing .ecf__dialog { animation: none; } }

.ecf__head { position: relative; padding: 24px 64px 12px 32px; flex: none; }
.ecf__title {
	margin: 0; font-family: var(--font-heading, "Poppins", sans-serif); font-weight: 800;
	font-size: 28px; line-height: 1.15; text-transform: uppercase; color: var(--primary-blue-dark, #236192);
}
.ecf__lead { margin: 6px 0 0; font-size: var(--text-regular, 16px); line-height: 1.45; }
.ecf__lead a { color: var(--primary-blue-dark, #236192); }
/* Same as the YAP profile dialog's close button (.yap-gen-modal__close, tools/oxygen/yap.html). */
.ecf__x {
	position: absolute; top: 10px; right: 10px; z-index: 1; width: 44px; height: 44px;
	display: flex; align-items: center; justify-content: center; padding: 0;
	border: 0; border-radius: 8px; background-color: var(--primary-white, #FFF);
	color: var(--primary-blue-dark, #236192); cursor: pointer;
}
.ecf__x:hover { background-color: var(--terciary-background-blue, #E5F6FB); }
.ecf__x:focus-visible { outline: 3px solid var(--primary-blue-dark, #236192); outline-offset: 2px; }
.ecf__x svg { width: 24px; height: 24px; display: block; }

.ecf__form[hidden], .ecf__other[hidden] { display: none !important; }
.ecf__form { display: flex; flex-direction: column; min-height: 0; flex: 1; margin: 0; }
.ecf__body { overflow-y: auto; padding: 8px 32px 16px; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }

.ecf__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.ecf__field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ecf label, .ecf legend { font-size: var(--text-small, 14px); font-weight: 600; line-height: 1.3; }
.ecf__req { color: var(--secondary-red, #CB2C30); font-size: 1.3em; line-height: 0; position: relative; top: .12em; }
.ecf__hint { font-weight: 400; color: var(--gray, #767676); }

.ecf input[type=text], .ecf input[type=email], .ecf input[type=tel], .ecf textarea {
	width: 100%; box-sizing: border-box; margin: 0;
	font: inherit; font-size: var(--text-regular, 16px); color: inherit;
	padding: 10px 12px; min-height: 44px;
	background: #fff; border: 2px solid var(--border, #E1E6EA); border-radius: 8px;
	transition: border-color .15s ease;
}
.ecf textarea { resize: vertical; min-height: 104px; line-height: 1.45; }
.ecf input::placeholder, .ecf textarea::placeholder { color: #9aa3ab; }
.ecf input:focus, .ecf textarea:focus { outline: none; border-color: var(--primary-blue, #009DDC); }
.ecf [aria-invalid=true] { border-color: var(--secondary-red, #CB2C30) !important; }
.ecf__err { margin: 2px 0 0; font-size: 13px; color: var(--secondary-red, #CB2C30); }

.ecf__group { border: 0; margin: 0; padding: 0; min-width: 0; }
.ecf__group legend { padding: 0; margin-bottom: 6px; }
.ecf__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ecf__chip { position: relative; cursor: pointer; font-weight: 400 !important; }
.ecf__chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ecf__chip span {
	display: inline-flex; align-items: center; gap: 6px; min-height: 36px; box-sizing: border-box;
	padding: 6px 14px; border: 2px solid var(--border, #E1E6EA); border-radius: 999px;
	font-size: 15px; line-height: 1.2; background: #fff; transition: all .15s ease;
}
.ecf__chip:hover span { border-color: var(--primary-blue, #009DDC); }
.ecf__chip input:focus-visible + span { outline: 2px solid var(--primary-blue, #009DDC); outline-offset: 2px; }
.ecf__chip input:checked + span {
	background: var(--primary-blue-dark, #236192); border-color: var(--primary-blue-dark, #236192); color: #fff;
}
.ecf__other { margin-top: 8px !important; max-width: 360px; }

.ecf__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ecf__consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 15px !important; cursor: pointer; }
.ecf__consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary-blue-dark, #236192); }
.ecf__consent.is-invalid span { color: var(--secondary-red, #CB2C30); }
.ecf__privacy { margin: -6px 0 0 30px; font-size: 13px; line-height: 1.45; color: var(--gray, #767676); }
.ecf__privacy a { color: var(--primary-blue-dark, #236192); }

.ecf__foot {
	flex: none; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
	padding: 14px 32px 20px; border-top: 1px solid var(--border, #E1E6EA); background: var(--background-lightcream, #FBFAF8);
}
.ecf__turnstile:empty { display: none; }
.ecf__status { flex: 1; margin: 0; font-size: 14px; line-height: 1.35; min-width: 180px; }
.ecf__status.is-error { color: var(--secondary-red, #CB2C30); }
.ecf .ecf__submit { margin: 0 0 0 auto; align-self: center; }
.ecf .ecf__submit[disabled] { opacity: .6; cursor: progress; }

.ecf__dialog.is-done .ecf__head .ecf__title, .ecf__dialog.is-done .ecf__head .ecf__lead { display: none; }
/* Thank-you view: the head (only the × is left in it) leaves the flow, so the message is
   centred with equal space above and below (phones: in the middle of the full-height dialog). */
.ecf__dialog.is-done { justify-content: center; }
.ecf__dialog.is-done .ecf__head { position: absolute; top: 0; left: 0; right: 0; padding: 0; min-height: 0; }
.ecf__done { padding: 56px 32px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; outline: none; }
.ecf__done[hidden] { display: none; }
.ecf__done-icon { color: var(--primary-blue-dark, #236192); }
.ecf__done .ecf__lead { max-width: 520px; }
.ecf__done .ecf__copy[hidden] { display: none; }

/* Scroll lock ("fixed body", see lockScroll() in contact-form.js): the page is pinned at
   its scroll offset; a scroll bar that was visible stays (ecf-sb) so nothing shifts. */
html.ecf-open.ecf-sb { overflow-y: scroll; }
html.ecf-open body { position: fixed; top: var(--ecf-top, 0); left: 0; right: 0; width: 100%; overflow: hidden; }

@media (max-width: 767px) {
	.ecf { padding: 0; align-items: stretch; }
	.ecf__dialog { max-width: none; max-height: none; height: 100%; border-radius: 0; }
	.ecf__head { padding: 16px 60px 8px 16px; }
	.ecf__title { font-size: 22px; }
	.ecf__body { padding: 8px 16px 16px; }
	.ecf__grid { grid-template-columns: 1fr; }
	.ecf__foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
	.ecf .ecf__submit { width: 100%; margin: 0; }
	.ecf__privacy { margin-left: 0; }
}
