#agesync-overlay,
#agesync-overlay * {
	box-sizing: border-box;
}

@keyframes agesync-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes agesync-pop-in {
	from { opacity: 0; transform: translateY(16px) scale(0.97); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

#agesync-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	overflow-y: auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	animation: agesync-fade-in 0.25s ease both;
}

html.agesync-locked,
html.agesync-locked body {
	overflow: hidden !important;
	height: 100%;
}

#agesync-overlay .agesync-card {
	position: relative;
	width: 100%;
	max-width: 460px;
	border-radius: 24px;
	padding: 40px 36px 32px;
	box-shadow: 0 25px 70px rgba(20, 10, 40, 0.35), 0 2px 8px rgba(20, 10, 40, 0.12);
	margin: auto;
	animation: agesync-pop-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
	overflow: hidden;
}

/* Gradient accent bar along the top of the card, driven by the admin's colors */
#agesync-overlay .agesync-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 6px;
}

#agesync-overlay .agesync-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 22px;
}

#agesync-overlay .agesync-logo {
	max-height: 32px;
	width: auto;
	display: block;
}

#agesync-overlay .agesync-brand-name {
	font-weight: 800;
	font-size: 15px;
	letter-spacing: 0.01em;
}

#agesync-overlay .agesync-heading {
	font-size: 25px;
	font-weight: 800;
	line-height: 1.25;
	margin: 0 0 14px;
	letter-spacing: 0.2px;
}

#agesync-overlay .agesync-desc {
	font-size: 14px;
	line-height: 1.65;
	margin: 0 0 24px;
}

#agesync-overlay .agesync-checkbox-row {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	background: #f6f5fa;
	border: 1.5px solid transparent;
	border-radius: 14px;
	padding: 14px 16px;
	margin-bottom: 12px;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

#agesync-overlay .agesync-checkbox-row:hover {
	background: #f0eef8;
}

#agesync-overlay .agesync-checkbox-row--age {
	font-weight: 600;
}

#agesync-overlay .agesync-checkbox-box {
	position: relative;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin-top: 1px;
}

#agesync-overlay .agesync-checkbox-box input[type="checkbox"] {
	position: absolute;
	inset: 0;
	width: 20px;
	height: 20px;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
}

#agesync-overlay .agesync-checkbox-tick {
	position: absolute;
	inset: 0;
	border-radius: 6px;
	border: 1.5px solid #c7c2d6;
	background: #ffffff;
	transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

#agesync-overlay .agesync-checkbox-tick::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 2px;
	width: 5px;
	height: 10px;
	border: solid #ffffff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	opacity: 0;
	transition: opacity 0.1s ease;
}

#agesync-overlay input[type="checkbox"]:checked + .agesync-checkbox-tick {
	background: #7336be;
	border-color: #7336be;
}

#agesync-overlay input[type="checkbox"]:checked + .agesync-checkbox-tick::after {
	opacity: 1;
}

#agesync-overlay input[type="checkbox"]:focus-visible + .agesync-checkbox-tick {
	box-shadow: 0 0 0 3px rgba(115, 54, 190, 0.25);
}

#agesync-overlay .agesync-checkbox-label {
	font-size: 13.5px;
	line-height: 1.55;
}

#agesync-overlay .agesync-error {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	background: #fef2f2;
	border: 1px solid currentColor;
	border-radius: 12px;
	padding: 11px 14px;
	margin-bottom: 16px;
	animation: agesync-fade-in 0.15s ease both;
}

#agesync-overlay .agesync-error[hidden] {
	display: none;
}

#agesync-overlay .agesync-submit-btn {
	width: 100%;
	border: none;
	border-radius: 999px;
	padding: 15px 20px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.03em;
	cursor: pointer;
	box-shadow: 0 10px 24px rgba(115, 54, 190, 0.28);
	transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

#agesync-overlay .agesync-submit-btn:hover {
	opacity: 0.95;
	transform: translateY(-1px);
	box-shadow: 0 14px 30px rgba(115, 54, 190, 0.34);
}

#agesync-overlay .agesync-submit-btn:active {
	transform: translateY(0);
}

#agesync-overlay .agesync-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

#agesync-overlay .agesync-footer-note {
	text-align: center;
	font-size: 11px;
	letter-spacing: 0.04em;
	color: #9ca3af;
	margin: 18px 0 0;
}

@media (max-width: 480px) {
	#agesync-overlay .agesync-card {
		padding: 32px 24px 26px;
		border-radius: 20px;
	}
	#agesync-overlay .agesync-heading {
		font-size: 22px;
	}
}
