/* AEKS newsletter popup — uses the theme's colors and Jost font (variables in main.css). */

.nl-dialog{
	width:min(760px,calc(100vw - 32px));
	max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);
	padding:0;border:0;border-radius:var(--radius);
	background:#fff;color:var(--body);font-family:var(--font);
	box-shadow:0 24px 64px rgba(0,0,0,.28);overflow:hidden
}
.nl-dialog[open]{display:flex;flex-direction:column}
.nl-dialog::backdrop{background:rgba(17,17,17,.6)}
html.nl-lock{overflow:hidden}

.nl-panel{display:flex;flex-direction:column;flex:1;min-height:0;margin:0}
.nl-panel[hidden],.nl-thanks[hidden],.nl-error[hidden]{display:none}

.nl-body{position:relative;flex:1;min-height:0;overflow-y:auto;padding:32px 36px 22px;display:flex;flex-direction:column;gap:22px}
.nl-close{position:absolute;top:14px;right:14px;width:44px;height:44px;display:flex;align-items:center;justify-content:center;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--ink);cursor:pointer}
.nl-close:hover{background:var(--soft)}

.nl-head{display:flex;flex-direction:column;gap:8px;padding-right:40px}
.nl-step{margin:0;font-size:13px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--blue-text)}
.nl-dialog h2{margin:0;font-size:28px;line-height:1.2;color:var(--ink)}
.nl-intro{margin:0;font-size:16px;line-height:1.5;color:var(--muted)}

.nl-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.nl-fields p,.nl-split p{display:flex;flex-direction:column;gap:6px;margin:0;min-width:0}
.nl-dialog label,.nl-group legend{font-weight:600;font-size:15px;color:var(--ink)}
.nl-dialog label span{font-weight:400;color:var(--muted)}
.nl-group{margin:0;padding:0;border:0;min-width:0}
.nl-group legend{padding:0;margin-bottom:10px}

.nl-dialog input[type=email],.nl-dialog input[type=text],.nl-dialog textarea{
	width:100%;min-height:46px;margin:0;padding:10px 12px;
	border:1.5px solid #9AA4B5;border-radius:10px;background:#fff;
	font:inherit;font-size:16px;color:var(--ink)
}
.nl-dialog textarea{height:92px;line-height:1.45;resize:none}
.nl-dialog input::placeholder,.nl-dialog textarea::placeholder{color:#6B7280}
.nl-dialog input:focus-visible,.nl-dialog textarea:focus-visible{outline:3px solid rgba(0,109,178,.3);outline-offset:1px;border-color:var(--blue-ui)}

/* Event choices: real checkboxes styled as pills */
.nl-chips{display:flex;flex-wrap:wrap;gap:8px}
.nl-chip{position:relative;cursor:pointer}
.nl-chip input{position:absolute;opacity:0;width:1px;height:1px}
.nl-chip span{display:inline-flex;align-items:center;min-height:38px;padding:0 16px;border:1.5px solid #9AA4B5;border-radius:999px;background:#fff;color:var(--body);font-weight:500;font-size:15px;transition:background .15s,border-color .15s}
.nl-chip:hover span{border-color:var(--blue-ui)}
.nl-chip input:checked+span{background:var(--soft-2);border-color:var(--blue-ui);color:var(--blue-hover)}
.nl-chip input:focus-visible+span{outline:3px solid rgba(0,109,178,.3);outline-offset:1px}

.nl-split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px}
.nl-radios{display:flex;flex-direction:column;gap:10px}
.nl-radios legend{margin-bottom:8px}
.nl-dialog .nl-check{display:flex;align-items:flex-start;gap:10px;font-weight:400;font-size:15px;line-height:1.45;color:var(--body);cursor:pointer}
.nl-check input{flex:none;width:20px;height:20px;margin:1px 0 0;accent-color:var(--blue-ui);cursor:pointer}

.nl-foot{flex-shrink:0;display:flex;flex-wrap:wrap;align-items:center;gap:12px 24px;padding:18px 36px 28px;border-top:1px solid var(--line);background:#fff}
.nl-dialog .nl-consent{flex:1 1 320px;font-size:14px;color:var(--muted)}
.nl-consent a{color:var(--blue-text)}
.nl-turnstile:empty{display:none}
.nl-submit{flex:0 0 auto}
.nl-submit:disabled{opacity:.7;cursor:wait}
.nl-error{flex-basis:100%;margin:0;padding:10px 14px;border-radius:10px;background:#FBEBEB;color:#7A1C1C;font-weight:500}

/* Thank-you view */
.nl-thanks{display:flex;flex-direction:column;align-items:center;gap:16px;padding:44px 36px 32px;text-align:center}
.nl-thanks .nl-intro{max-width:440px}
.nl-check-icon{width:64px;height:64px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--soft-2);color:var(--blue-ui)}
.nl-thanks .btn{margin-top:8px;min-width:200px}

/* Tablet */
@media (max-width:760px){
	.nl-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
	.nl-fields p:first-child{grid-column:1/-1}
	.nl-split{grid-template-columns:minmax(0,1fr);gap:18px}
}

/* Phone: bottom sheet; questions scroll, consent + button stay visible */
@media (max-width:599px){
	.nl-dialog{width:100vw;max-width:100vw;margin:auto 0 0;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);border-radius:20px 20px 0 0}
	.nl-body{padding:24px 20px 20px;gap:18px}
	.nl-close{top:8px;right:8px}
	.nl-dialog h2{font-size:24px}
	.nl-intro{font-size:15px}
	.nl-fields{gap:12px}
	.nl-chips{gap:6px}
	.nl-chip span{min-height:36px;padding:0 13px;font-size:14px}
	.nl-dialog textarea{height:70px}
	.nl-foot{padding:14px 20px calc(18px + env(safe-area-inset-bottom));gap:12px;box-shadow:0 -6px 16px rgba(0,0,0,.06)}
	.nl-dialog .nl-consent{flex-basis:100%;font-size:13px}
	.nl-submit{width:100%}
}

@media (prefers-reduced-motion:reduce){.nl-chip span{transition:none}}
