html.bsl-lock, html.bsl-lock body { overflow: hidden !important; }

#bsl-popup, .bsl-locked { --bsl-accent: #c2577a; }

/* Shown instead of the page content until the form is submitted */
.bsl-locked {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
	min-height: 260px; margin: 24px 0; padding: 40px 20px; text-align: center;
	background: #faf6f8; border: 1px dashed #e3cfd8; border-radius: 16px; color: #444;
}
.bsl-locked__icon { font-size: 34px; line-height: 1; }
.bsl-locked p { margin: 0; font-size: 16px; max-width: 420px; }
.bsl-locked .bsl-unlock {
	display: inline-block; margin-top: 6px; padding: 12px 26px; font: inherit; font-size: 15px; font-weight: 600;
	color: #fff; background: var(--bsl-accent); border: 0; border-radius: 10px; cursor: pointer; text-decoration: none;
}
.bsl-locked .bsl-unlock:hover { filter: brightness(.93); color: #fff; }

#bsl-popup {
	position: fixed; inset: 0; z-index: 999999;
	display: flex; align-items: center; justify-content: center;
	padding: 16px; box-sizing: border-box;
	background: rgba(24, 20, 28, .55);
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
	opacity: 0; transition: opacity .2s ease;
	font-family: inherit; line-height: 1.45;
}
#bsl-popup[hidden] { display: none; }
#bsl-popup.bsl-open { opacity: 1; }
#bsl-popup *, #bsl-popup *::before, #bsl-popup *::after { box-sizing: border-box; }

#bsl-popup .bsl-modal {
	position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto;
	background: #fff; color: #222; border-radius: 18px; padding: 28px 26px 24px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
	transform: translateY(12px) scale(.98); transition: transform .2s ease;
}
#bsl-popup.bsl-open .bsl-modal { transform: none; }

#bsl-popup .bsl-close {
	position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; padding: 0;
	border: 0; border-radius: 50%; background: transparent; color: #666;
	font-size: 26px; line-height: 36px; cursor: pointer;
}
#bsl-popup .bsl-close:hover, #bsl-popup .bsl-close:focus-visible { background: #f2f2f4; color: #111; }

#bsl-popup .bsl-title { margin: 0 32px 6px 0; font-size: 22px; line-height: 1.25; color: #1d1d1f; }
#bsl-popup .bsl-intro { margin: 0 0 18px; font-size: 15px; color: #555; }

#bsl-popup .bsl-field { margin: 0 0 14px; }
#bsl-popup .bsl-field label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 600; color: #333; }
#bsl-popup .bsl-req { color: var(--bsl-accent); }
#bsl-popup .bsl-optional { font-weight: 400; font-size: 13px; color: #888; }
#bsl-popup input, #bsl-popup select, #bsl-popup textarea {
	display: block; width: 100%; min-height: 46px; margin: 0; padding: 10px 14px;
	font: inherit; font-size: 16px; /* 16px stops iPhone zooming in */
	color: #222; background: #fff; border: 1.5px solid #d9d6dc; border-radius: 10px;
	box-shadow: none; outline: none; transition: border-color .15s, box-shadow .15s;
}
#bsl-popup input[type=date] { cursor: pointer; }
#bsl-popup input:focus, #bsl-popup select:focus, #bsl-popup textarea:focus {
	border-color: var(--bsl-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bsl-accent) 22%, transparent);
}
#bsl-popup .has-error input, #bsl-popup .has-error select, #bsl-popup .has-error textarea { border-color: #d63638; }
#bsl-popup .bsl-error { display: block; min-height: 0; margin-top: 5px; font-size: 13px; color: #d63638; }
#bsl-popup .bsl-error:empty { display: none; }

#bsl-popup .bsl-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

#bsl-popup .bsl-message { margin: 4px 0 12px; padding: 10px 12px; font-size: 14px; color: #8a1f1f; background: #fdecec; border-radius: 8px; }

#bsl-popup .bsl-submit {
	display: block; width: 100%; min-height: 48px; margin-top: 6px; padding: 12px 18px;
	font: inherit; font-size: 16px; font-weight: 600; color: #fff; cursor: pointer;
	background: var(--bsl-accent); border: 0; border-radius: 10px; transition: filter .15s, opacity .15s;
}
#bsl-popup .bsl-submit:hover { filter: brightness(.93); }
#bsl-popup .bsl-submit:focus-visible { outline: 3px solid color-mix(in srgb, var(--bsl-accent) 40%, transparent); outline-offset: 2px; }
#bsl-popup .bsl-submit[disabled] { opacity: .7; cursor: wait; }

#bsl-popup .bsl-success { text-align: center; padding: 10px 0 4px; }
#bsl-popup .bsl-success p { margin: 10px 0 0; font-size: 16px; }
#bsl-popup .bsl-tick {
	display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px;
	font-size: 28px; color: #fff; background: #2e9e5b; border-radius: 50%;
}

@media (max-width: 480px) {
	#bsl-popup { align-items: flex-end; padding: 0; }
	#bsl-popup .bsl-modal { max-width: none; max-height: 92vh; border-radius: 18px 18px 0 0; padding: 24px 18px 20px; }
	#bsl-popup .bsl-title { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
	#bsl-popup, #bsl-popup .bsl-modal { transition: none; }
}
