/* GL Researcher Gate — brand: navy #0a2540, electric blue #4a90d9. Scoped to #gl-gate with !important where themes/Elementor tend to override. */

html:has(body.gl-gate-active),
body.gl-gate-active { overflow: hidden !important; }

/* The overlay blurs whatever is behind it, so it works no matter how the theme nests the footer. */
#gl-gate {
	position: fixed; inset: 0; z-index: 2147483000;
	display: flex; align-items: center; justify-content: center;
	padding: 16px; box-sizing: border-box;
	background: rgba(10, 37, 64, .55);
	-webkit-backdrop-filter: blur(var(--gl-gate-blur, 6px));
	backdrop-filter: blur(var(--gl-gate-blur, 6px));
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: #0a2540; line-height: 1.5;
}
#gl-gate *, #gl-gate *::before, #gl-gate *::after { box-sizing: border-box; }

#gl-gate .gl-gate__card {
	width: 100%; max-width: 500px;
	max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
	overflow-y: auto; -webkit-overflow-scrolling: touch;
	background: #ffffff; border-radius: 16px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}

#gl-gate .gl-gate__head {
	display: flex; align-items: center; gap: 12px;
	padding: 20px 28px;
	background: linear-gradient(120deg, #0a2540, #1f5fa8);
	color: #ffffff; border-radius: 16px 16px 0 0;
}
#gl-gate .gl-gate__logo { max-height: 36px; width: auto; }
#gl-gate .gl-gate__brand { display: flex; flex-direction: column; }
#gl-gate .gl-gate__name { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-weight: 700; font-size: 22px; letter-spacing: 2px; text-transform: uppercase; line-height: 1.1; }
#gl-gate .gl-gate__kicker { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: #a9cbf0; }

#gl-gate .gl-gate__form { margin: 0; }
#gl-gate .gl-gate__body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 16px; }

#gl-gate .gl-gate__title {
	margin: 0 !important; padding: 0; border: 0;
	font-family: "Barlow Condensed", "Arial Narrow", sans-serif !important;
	font-weight: 700 !important; font-size: 30px !important; line-height: 1.1 !important;
	text-transform: uppercase; letter-spacing: .5px; color: #0a2540 !important;
}
#gl-gate .gl-gate__sub { margin: -6px 0 0; font-size: 14px; color: #4b5d73; }

/* Hidden helpers */
#gl-gate .gl-gate__radio,
#gl-gate .gl-gate__sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; margin: 0; padding: 0; border: 0; clip: rect(0 0 0 0); }
#gl-gate .gl-gate__hp { position: absolute !important; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Tabs (CSS-only) */
#gl-gate .gl-gate__tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; background: #eef2f7; border-radius: 10px; padding: 4px; }
#gl-gate .gl-tab { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 8px; font-size: 15px; font-weight: 600; color: #4b5d73; cursor: pointer; margin: 0; }
#gl-mode-signup:checked ~ .gl-gate__body .gl-tab--signup,
#gl-mode-login:checked ~ .gl-gate__body .gl-tab--login { background: #ffffff; color: #0a2540; box-shadow: 0 1px 3px rgba(10, 37, 64, .15); }
#gl-mode-signup:focus-visible ~ .gl-gate__body .gl-tab--signup,
#gl-mode-login:focus-visible ~ .gl-gate__body .gl-tab--login { outline: 3px solid #4a90d9; outline-offset: 1px; }
#gl-mode-signup:checked ~ .gl-gate__body .gl-only-login,
#gl-mode-login:checked ~ .gl-gate__body .gl-only-signup { display: none !important; }

#gl-gate .gl-gate__msg { background: #fdecec; border: 1px solid #f2b8b5; color: #8a1c14; border-radius: 8px; padding: 10px 14px; font-size: 14px; }

/* Buttons */
#gl-gate button { font-family: inherit; }
#gl-gate .gl-btn-google {
	display: flex !important; align-items: center; justify-content: center; gap: 10px;
	width: 100%; min-height: 48px; margin: 0; padding: 0 16px;
	border: 1px solid #c9d4e2 !important; border-radius: 8px !important;
	background: #ffffff !important; color: #0a2540 !important;
	font-size: 15px !important; font-weight: 600 !important; text-transform: none !important; letter-spacing: 0 !important;
	cursor: pointer; box-shadow: none !important;
}
#gl-gate .gl-btn-google:hover { background: #f5f8fc !important; }
#gl-gate .gl-btn-primary {
	display: block; width: 100%; min-height: 52px; margin: 0; padding: 0 16px;
	border: 0 !important; border-radius: 8px !important;
	background: linear-gradient(90deg, #0a2540, #1f5fa8) !important; color: #ffffff !important;
	font-family: "Barlow Condensed", "Arial Narrow", sans-serif !important; font-size: 20px !important; font-weight: 700 !important;
	letter-spacing: 1.5px !important; text-transform: uppercase !important; cursor: pointer; box-shadow: none !important;
}
#gl-gate .gl-btn-primary:hover { filter: brightness(1.12); }
#gl-gate .gl-btn-google:focus-visible,
#gl-gate .gl-btn-primary:focus-visible { outline: 3px solid #4a90d9; outline-offset: 2px; }

/* Dim the buttons until all four boxes are checked (browsers without :has just skip this). */
#gl-gate .gl-gate__form:has(.gl-affirm input[type="checkbox"]:not(:checked)) .gl-btn-gated { opacity: .45; }
#gl-gate .gl-lock-note { margin: -6px 0 0; text-align: center; font-size: 13px; color: #5b6b80; }
#gl-gate .gl-lock-note--ok { display: none; }
#gl-gate .gl-gate__form:not(:has(.gl-affirm input[type="checkbox"]:not(:checked))) .gl-lock-note--wait { display: none; }
#gl-gate .gl-gate__form:not(:has(.gl-affirm input[type="checkbox"]:not(:checked))) .gl-lock-note--ok { display: block; }

#gl-gate .gl-gate__or { display: flex; align-items: center; gap: 12px; color: #5b6b80; font-size: 13px; }
#gl-gate .gl-gate__or::before,
#gl-gate .gl-gate__or::after { content: ""; flex: 1; height: 1px; background: #dbe3ed; }

/* Fields */
#gl-gate .gl-gate__fields { display: flex; flex-direction: column; gap: 6px; }
#gl-gate .gl-gate__fields > .gl-only-signup { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
#gl-gate .gl-label { display: block; margin: 6px 0 0; font-size: 14px; font-weight: 600; color: #0a2540; }
#gl-gate .gl-label-row { display: flex; justify-content: space-between; align-items: baseline; }
#gl-gate .gl-forgot { font-size: 13px; font-weight: 500; }
#gl-gate .gl-input {
	width: 100% !important; height: 46px !important; margin: 0 !important; padding: 0 14px !important;
	border: 1px solid #c9d4e2 !important; border-radius: 8px !important;
	background: #ffffff !important; color: #0a2540 !important;
	font-family: inherit !important; font-size: 16px !important; box-shadow: none !important;
}
#gl-gate .gl-input:focus { outline: none; border-color: #1f5fa8 !important; box-shadow: 0 0 0 3px rgba(74, 144, 217, .25) !important; }
#gl-gate .gl-hint { font-size: 13px; color: #5b6b80; }

/* Affirmations */
#gl-gate .gl-affirm { margin: 0; padding: 18px; border: 1px solid #dbe3ed; border-radius: 12px; background: #f5f8fc; display: flex; flex-direction: column; gap: 12px; }
#gl-gate .gl-affirm__title { float: left; width: 100%; padding: 0; margin: 0 0 2px; font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-weight: 700; font-size: 17px; letter-spacing: 1.5px; text-transform: uppercase; color: #0a2540; }
#gl-gate .gl-check { display: flex; gap: 12px; align-items: flex-start; margin: 0; font-size: 13px; line-height: 1.5; color: #0a2540; cursor: pointer; font-weight: 400; }
#gl-gate .gl-check input[type="checkbox"] { width: 20px; height: 20px; min-width: 20px; margin: 1px 0 0; accent-color: #1f5fa8; cursor: pointer; }

#gl-gate a { color: #1f5fa8; text-decoration: underline; }
#gl-gate a:hover { color: #0a2540; }
#gl-gate .gl-gate__foot { margin: 0; text-align: center; font-size: 13px; color: #5b6b80; }

@media (max-width: 480px) {
	#gl-gate { padding: 8px; }
	#gl-gate .gl-gate__card { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
	#gl-gate .gl-gate__head { padding: 16px 20px; }
	#gl-gate .gl-gate__body { padding: 20px; }
	#gl-gate .gl-gate__title { font-size: 26px !important; }
}
