/* EMDG ABN Lookup — dropdown styles (design A).
   Scoped to .emdg-abn-* so nothing leaks into the surrounding CF7 / Enfold form.
   The ABN field itself stays a normal visible form field — not styled here. */

.emdg-abn-box {
	position: relative;
	margin-top: 4px;
}

.emdg-abn-list {
	list-style: none;
	margin: 2px 0 0;
	padding: 4px;
	position: absolute;
	z-index: 9999;
	left: 0; right: 0;
	max-height: 320px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #cfd6dd;
	border-radius: 8px;
	box-shadow: 0 8px 26px rgba(16, 42, 67, 0.14);
	-webkit-overflow-scrolling: touch;
}

.emdg-abn-list.is-loading::after {
	content: "";
	display: block;
	height: 2px;
	margin: 2px 4px 0;
	border-radius: 2px;
	background: linear-gradient(90deg, transparent, #008cf7, transparent);
	background-size: 40% 100%;
	background-repeat: no-repeat;
	animation: emdg-abn-scan 0.9s linear infinite;
}
@keyframes emdg-abn-scan {
	0%   { background-position: -40% 0; }
	100% { background-position: 140% 0; }
}
@media (prefers-reduced-motion: reduce) {
	.emdg-abn-list.is-loading::after { animation: none; }
}

.emdg-abn-opt {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 9px 11px;
	border-radius: 6px;
	cursor: pointer;
}
.emdg-abn-opt:hover,
.emdg-abn-opt.is-active { background: #eaf4ff; }

.emdg-abn-opt-name { font-weight: 700; line-height: 1.25; }
.emdg-abn-opt-meta {
	font-size: 12.5px;
	color: #5f6b76;
	font-variant-numeric: tabular-nums;
}

.emdg-abn-msg {
	padding: 10px 11px;
	color: #5f6b76;
	font-size: 14px;
}

/* Screen-reader-only live region for search status. */
.emdg-abn-status {
	position: absolute;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	overflow: hidden; clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
	.emdg-abn-list {
		background: #171b22;
		border-color: #2a313b;
		box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
	}
	.emdg-abn-opt:hover,
	.emdg-abn-opt.is-active { background: #10243a; }
	.emdg-abn-opt-meta,
	.emdg-abn-msg { color: #9aa7b4; }
}

/* ---- Centre-screen success modal (shown on submit for the configured forms) ---- */
.emdg-cf7-modal {
	position: fixed;
	inset: 0;
	top: 0; right: 0; bottom: 0; left: 0; /* fallback for browsers without inset */
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(16, 42, 67, 0.55);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	animation: emdg-modal-fade 0.18s ease;
}
@keyframes emdg-modal-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .emdg-cf7-modal { animation: none; } }

.emdg-cf7-modal-card {
	background: #fff;
	color: #26292c;
	max-width: 420px;
	width: 100%;
	border-radius: 14px;
	padding: 32px 28px 26px;
	text-align: center;
	box-shadow: 0 20px 60px rgba(16, 42, 67, 0.35);
	font-family: 'Lato', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
}
.emdg-cf7-modal-check {
	width: 56px; height: 56px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: #008cf7;
	color: #fff;
	font-size: 30px;
	line-height: 56px;
	font-weight: 700;
}
.emdg-cf7-modal-msg {
	font-size: 17px;
	line-height: 1.55;
	margin: 0 0 22px;
}
.emdg-cf7-modal-close {
	display: inline-block;
	border: 0;
	cursor: pointer;
	background: #008cf7;
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	letter-spacing: 0.02em;
	padding: 11px 28px;
	border-radius: 999px;
}
.emdg-cf7-modal-close:hover { background: #0062b0; }
.emdg-cf7-modal-close:focus-visible { outline: 2px solid #0062b0; outline-offset: 2px; }
