/* Sign-up wall (module: gate). Colors and type are the site's tokens. */

html.bbis-gate-lock,
html.bbis-gate-lock body { overflow: hidden; }

.bbis-gate { position: fixed; inset: 0; z-index: 100001; display: grid; place-items: center; padding: 24px; font-family: var(--bbis-font-body, inherit); }
.bbis-gate[hidden] { display: none; }
.bbis-gate *, .bbis-gate *::before, .bbis-gate *::after { box-sizing: border-box; }

.bbis-gate__backdrop { position: absolute; inset: 0; background: rgba(10, 16, 30, .55); opacity: 0; transition: opacity .25s ease; }
.bbis-gate.is-hard .bbis-gate__backdrop { background: rgba(10, 16, 30, .62); -webkit-backdrop-filter: blur(10px) saturate(.9); backdrop-filter: blur(10px) saturate(.9); }
.bbis-gate.is-on .bbis-gate__backdrop { opacity: 1; }

.bbis-gate__card { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: min(940px, 100%); max-height: calc(100dvh - 48px); overflow: hidden; border-radius: 20px; background: #fff; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .55); opacity: 0; transform: translateY(14px) scale(.985); transition: opacity .28s ease, transform .32s cubic-bezier(.2, .8, .2, 1); }
.bbis-gate.is-on .bbis-gate__card { opacity: 1; transform: none; }
.bbis-gate.is-plain .bbis-gate__card { grid-template-columns: 1fr; width: min(480px, 100%); }

/* the home they wanted */
.bbis-gate__media { position: relative; min-height: 100%; background: var(--bbis-primary, #10294c); }
.bbis-gate__media[hidden] { display: none; }
.bbis-gate__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bbis-gate__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 16, 30, 0) 45%, rgba(10, 16, 30, .82) 100%); }
.bbis-gate__media-text { position: absolute; left: 26px; right: 26px; bottom: 24px; z-index: 1; display: flex; flex-direction: column; gap: 2px; color: #fff; }
.bbis-gate__price { font-family: var(--bbis-font-head, inherit); font-size: 1.9rem; line-height: 1.1; }
.bbis-gate__addr { font-family: var(--bbis-font-head, inherit); font-size: 1rem; letter-spacing: .02em; }
.bbis-gate__place { font-size: .88rem; opacity: .82; }

/* the form */
.bbis-gate__body { position: relative; overflow-y: auto; padding: 40px 40px 32px; }
.bbis-gate__form { display: flex; flex-direction: column; gap: 12px; }
.bbis-gate__form[hidden], .bbis-gate__done[hidden] { display: none; }
.bbis-gate .bbis-gate__kick { display: inline-flex; align-items: center; gap: 10px; font-family: var(--bbis-font-head, inherit); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--bbis-accent, #9b7523); }
.bbis-gate .bbis-gate__kick::before { content: ""; width: 24px; height: 3px; border-radius: 2px; background: var(--bbis-accent, #9b7523); }
.bbis-gate.bbis-gate .bbis-gate__h { margin: 2px 0 0; font-family: var(--bbis-font-head, inherit); font-size: clamp(1.7rem, 3vw, 2.15rem); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; color: var(--bbis-ink, #2b2b2b); text-transform: none; }
.bbis-gate .bbis-gate__p { margin: 0 0 6px; font-size: .98rem; line-height: 1.55; color: var(--bbis-muted, #6b7280); }

.bbis-gate__f { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.bbis-gate__f span { font-family: var(--bbis-font-head, inherit); font-size: .8rem; letter-spacing: .02em; color: var(--bbis-ink, #2b2b2b); }
.bbis-gate__f em { font-style: normal; color: var(--bbis-muted, #8a8a8a); font-family: var(--bbis-font-body, inherit); }
.bbis-gate.bbis-gate input[type="text"],
.bbis-gate.bbis-gate input[type="tel"],
.bbis-gate.bbis-gate input[type="email"] { width: 100%; height: 50px; margin: 0; padding: 0 16px; border: 1.5px solid var(--bbis-border, #e3e3e3); border-radius: 12px; background: #fff; color: var(--bbis-ink, #2b2b2b); font: inherit; font-size: 16px; box-shadow: none; transition: border-color .2s, box-shadow .2s; }
.bbis-gate.bbis-gate input:focus { outline: none; border-color: var(--bbis-primary, #10294c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bbis-primary, #10294c) 14%, transparent); }
.bbis-gate__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.bbis-gate.bbis-gate button.bbis-gate__btn { width: 100%; height: 54px; margin: 6px 0 0; padding: 0 20px; border: 0; border-radius: 999px; background: var(--bbis-primary, #10294c); color: var(--bbis-primary-fg, #fff); font-family: var(--bbis-font-head, inherit); font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: background .2s, transform .15s; }
.bbis-gate.bbis-gate button.bbis-gate__btn:hover,
.bbis-gate.bbis-gate button.bbis-gate__btn:focus-visible { background: var(--bbis-accent, #9b7523); color: var(--bbis-accent-fg, #fff); }
.bbis-gate.bbis-gate button.bbis-gate__btn:active { transform: scale(.99); }
.bbis-gate.bbis-gate button.bbis-gate__btn:disabled { opacity: .7; cursor: default; }

.bbis-gate__msg { margin: 0; padding: 10px 14px; border-radius: 10px; background: #fdecec; color: #9b1c1c; font-size: .88rem; }
.bbis-gate__msg[hidden] { display: none; }
.bbis-gate__fine { margin: 2px 0 0; font-size: .74rem; line-height: 1.5; color: var(--bbis-muted, #8a8a8a); }
.bbis-gate__fine a { color: inherit; text-decoration: underline; }

.bbis-gate__agent { display: flex; align-items: center; gap: 12px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--bbis-border, #e3e3e3); }
.bbis-gate__agent img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: 50% 25%; }
.bbis-gate__agent span { display: flex; flex-direction: column; font-size: .82rem; line-height: 1.35; color: var(--bbis-muted, #6b7280); }
.bbis-gate__agent b { font-family: var(--bbis-font-head, inherit); font-weight: 600; color: var(--bbis-ink, #2b2b2b); }
.bbis-gate__agent a { color: var(--bbis-primary, #10294c); text-decoration: none; }

.bbis-gate .bbis-gate__back { align-self: center; margin-top: 4px; font-size: .84rem; color: var(--bbis-muted, #6b7280); text-decoration: underline; text-underline-offset: 3px; }
.bbis-gate .bbis-gate__back[hidden] { display: none; }

.bbis-gate.bbis-gate button.bbis-gate__x { position: absolute; top: 14px; right: 14px; z-index: 3; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--bbis-ink, #2b2b2b); cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.bbis-gate.bbis-gate button.bbis-gate__x[hidden] { display: none; }

.bbis-gate__done { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 340px; text-align: center; outline: none; }
.bbis-gate__tick { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--bbis-primary, #10294c); color: #fff; animation: bbis-gate-pop .4s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes bbis-gate-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* phones: the whole screen */
@media (max-width: 720px) {
	.bbis-gate { padding: 0; place-items: stretch; }
	.bbis-gate__card,
	.bbis-gate.is-plain .bbis-gate__card { grid-template-columns: 1fr; grid-template-rows: auto 1fr; width: 100%; height: 100dvh; max-height: none; border-radius: 0; }
	.bbis-gate__media { min-height: 0; height: 30vh; }
	.bbis-gate__media-text { left: 20px; right: 20px; bottom: 16px; }
	.bbis-gate__price { font-size: 1.55rem; }
	.bbis-gate__body { padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
	.bbis-gate.is-plain .bbis-gate__body { padding-top: 64px; }
	.bbis-gate.bbis-gate .bbis-gate__h { font-size: 1.6rem; }
	.bbis-gate .bbis-gate__p { font-size: .92rem; }
	.bbis-gate.bbis-gate input[type="text"],
	.bbis-gate.bbis-gate input[type="tel"],
	.bbis-gate.bbis-gate input[type="email"] { height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
	.bbis-gate__backdrop, .bbis-gate__card { transition: none; }
	.bbis-gate__tick { animation: none; }
}
