/* Site popup (includes/class-popup.php), 2 Oct 2026: a small invitation card, then the poll in a modal.
   Buttons use two-class selectors: Elementor's kit styles every <button> on the site and a lone class loses to it. */
.agm-popup [hidden] { display: none !important; }

/* ---- question card: bottom left (reCAPTCHA's badge lives bottom right). The site's newer design language - the hero
   gradient, a white frame with an offset colour block, the dotted accent, a floating icon and a pill label - shaped as
   a speech bubble whose squared corner points at where it sits. ---- */
.agm-popup__invite {
	position: fixed;
	left: 24px;
	bottom: 26px;
	z-index: 99990;
	width: 372px;
	max-width: calc(100vw - 48px);
	box-sizing: border-box;
	padding: 34px 24px 24px;
	color: #fff;
	background: linear-gradient(135deg, #0b2f52 0%, #124a80 62%, #1578cc 130%);
	border: 3px solid #fff;
	border-radius: 26px 26px 26px 6px;
	box-shadow: 10px 10px 0 0 rgba(13, 125, 63, 0.55), 0 22px 54px rgba(2, 12, 22, 0.42);
	font-family: 'Heebo', sans-serif;
	animation: agm-popup-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.agm-popup__dots {
	position: absolute;
	top: 14px;
	right: 52px;
	width: 84px;
	height: 44px;
	opacity: 0.28;
	background-image: radial-gradient(rgba(255, 255, 255, 0.9) 2px, transparent 2px);
	background-size: 14px 14px;
	pointer-events: none;
}
.agm-popup__bubble {
	position: absolute;
	top: -24px;
	left: 22px;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #fff;
	color: #1578cc;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 22px rgba(4, 26, 46, 0.28);
	animation: agm-popup-float 6s ease-in-out infinite;
}
.agm-popup__label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	padding: 6px 13px;
	background: #fff;
	color: #0b2f52;
	border-radius: 999px;
	font: 600 13px/1.2 'Heebo', sans-serif;
	box-shadow: 0 6px 16px rgba(4, 26, 46, 0.18);
}
.agm-popup__label i { width: 8px; height: 8px; border-radius: 50%; background: #0d7d3f; flex: 0 0 auto; }
.agm-popup .agm-popup__invite-title {
	margin: 0 0 8px;
	font: 700 20px/1.25 'Heebo', sans-serif;
	color: #fff;
}
.agm-popup .agm-popup__invite-text {
	margin: 0 0 18px;
	font: 400 15px/1.55 'Heebo', sans-serif;
	color: #dbe9f6;
}
.agm-popup .agm-popup__open {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 26px;
	background: #0d7d3f;
	color: #fff;
	border: 0;
	border-radius: 4px;
	font: 500 12px/1 'Heebo', sans-serif;
	letter-spacing: 0.125em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s ease;
}
.agm-popup .agm-popup__open:hover,
.agm-popup .agm-popup__open:focus-visible { background: #109e50; color: #fff; }
.agm-popup .agm-popup__x {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 34px;
	height: 34px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	color: #5b6876;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	letter-spacing: 0;
	transition: background 0.2s ease, color 0.2s ease;
}
.agm-popup .agm-popup__x:hover,
.agm-popup .agm-popup__x:focus-visible { background: #eef2f6; color: #00070e; }
.agm-popup .agm-popup__x:focus-visible,
.agm-popup .agm-popup__open:focus-visible { outline: 2px solid #1578cc; outline-offset: 2px; }
/* On the navy card the close button and focus rings are light. */
.agm-popup .agm-popup__invite .agm-popup__x { color: #fff; background: rgba(255, 255, 255, 0.14); }
.agm-popup .agm-popup__invite .agm-popup__x:hover,
.agm-popup .agm-popup__invite .agm-popup__x:focus-visible { background: rgba(255, 255, 255, 0.28); color: #fff; }
.agm-popup .agm-popup__invite .agm-popup__x:focus-visible,
.agm-popup .agm-popup__invite .agm-popup__open:focus-visible { outline-color: #fff; }

/* ---- modal ---- */
.agm-popup__overlay {
	position: fixed;
	inset: 0;
	z-index: 99991;
	background: rgba(6, 32, 56, 0.62);
	animation: agm-popup-fade 0.2s ease;
}
.agm-popup__dialog {
	position: fixed;
	z-index: 99992;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 640px;
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	overscroll-behavior: contain;
	box-sizing: border-box;
	padding: 34px 34px 30px;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 30px 80px rgba(2, 12, 22, 0.45);
	font-family: 'Heebo', sans-serif;
	animation: agm-popup-fade 0.2s ease;
}
.agm-popup__dialog:focus { outline: none; }
.agm-popup .agm-popup__x--dialog { top: 14px; right: 14px; }
/* The poll card sits flush in the modal: no second border, no closing date line. */
.agm-popup__body .agm-poll,
.agm-popup__body .agm-poll--embed { border: 0; padding: 0; margin: 0; max-width: none; background: transparent; }
.agm-popup__body .agm-poll__meta { display: none; }
.agm-popup__body .agm-poll__title { margin: 0 34px 8px 0; font: 700 23px/1.25 'Heebo', sans-serif; color: #00070e; }
.agm-popup__body .agm-banner:last-child { margin-bottom: 0; }

.agm-popup__thanks { text-align: center; padding: 14px 0 6px; }
.agm-popup .agm-popup__thanks .agm-popup__open { border-radius: 6px; font: 600 14.5px/1 'Heebo', sans-serif; letter-spacing: 0; text-transform: none; }
.agm-popup__tick {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #e1f5ee;
	color: #0d7d3f;
	margin-bottom: 14px;
}
.agm-popup .agm-popup__thanks-title { margin: 0 0 8px; font: 700 24px/1.25 'Heebo', sans-serif; color: #00070e; }
.agm-popup .agm-popup__thanks-text { margin: 0 auto 22px; max-width: 420px; font: 400 16px/1.55 'Heebo', sans-serif; color: #4d5a66; }

body.agm-popup-open { overflow: hidden; }

@keyframes agm-popup-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes agm-popup-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes agm-popup-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) {
	.agm-popup__invite, .agm-popup__overlay, .agm-popup__dialog, .agm-popup__bubble { animation: none; }
}

/* ---- phones: the invite is a bar along the bottom, the modal a sheet ---- */
@media (max-width: 640px) {
	.agm-popup__invite {
		left: 0;
		right: 0;
		bottom: 0;
		width: auto;
		max-width: none;
		border-width: 3px 0 0;
		border-radius: 24px 24px 0 0;
		box-shadow: 0 -12px 40px rgba(2, 12, 22, 0.35);
		padding: 32px 20px calc(20px + env(safe-area-inset-bottom));
	}
	.agm-popup .agm-popup__invite .agm-popup__open { width: 100%; min-height: 48px; }
	.agm-popup .agm-popup__thanks .agm-popup__open { width: 100%; }
	.agm-popup__dialog {
		left: 0;
		right: 0;
		top: auto;
		bottom: 0;
		transform: none;
		width: auto;
		max-width: none;
		max-height: 92vh;
		border-radius: 18px 18px 0 0;
		padding: 28px 20px calc(24px + env(safe-area-inset-bottom));
	}
}
