/* ROUND 100 - sign in / sign up: white form panel + coloured "Hello, Friend!" panel that slides across (see includes/ba_auth_slider.php). */
.ba-auth-stage{display:flex;justify-content:center;padding:34px 12px 64px;font-family:'Montserrat',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif}
.ba-auth{--a1:var(--primary,#ff4b2b);--a2:var(--secondary,var(--primary,#ff416c));--ba-cb-on:var(--a1);--a-on:var(--btn-text,#fff);--a-dark:color-mix(in srgb,var(--a1) 62%,#000);--a-glow:color-mix(in srgb,var(--a1) 38%,transparent);color-scheme:light;position:relative;display:flex;width:100%;max-width:880px;min-height:500px;background:#fff;color:#222;border-radius:12px;overflow:hidden;
  box-shadow:0 14px 28px rgba(0,0,0,.22),0 10px 10px rgba(0,0,0,.18);animation:baAuthIn .7s cubic-bezier(.22,1,.36,1) both}
@keyframes baAuthIn{from{opacity:0;transform:translateY(22px) scale(.98)}}
.ba-auth *{box-sizing:border-box}
.ba-auth__form{position:relative;z-index:2;flex:0 0 50%;width:50%;background:#fff;transition:transform .62s cubic-bezier(.77,0,.18,1)}
.ba-auth__scroll{padding:34px 44px 38px;display:flex;flex-direction:column;align-items:stretch;text-align:center;transition:opacity .3s ease;animation:baAuthFade .6s ease .15s both}
@keyframes baAuthFade{from{opacity:0;transform:translateY(8px)}}
.ba-auth__title{font-size:2rem;font-weight:800;margin:6px 0 10px;color:#111;letter-spacing:-.01em}
.ba-auth__hint{font-size:.72rem;margin:8px 0 6px;color:#555}
.ba-auth__social{display:flex;justify-content:center;gap:12px;margin:6px 0}
.ba-auth__round{width:42px;height:42px;border:1px solid #d6d6d6;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:#333;text-decoration:none;background:#fff;
  box-shadow:0 3px 0 #e1e1e1,0 6px 12px rgba(0,0,0,.08);transition:transform .22s cubic-bezier(.34,1.56,.64,1),color .2s,border-color .2s,box-shadow .2s}
.ba-auth__round:hover{transform:translateY(-3px) scale(1.08);color:#ea4335;border-color:#ea4335;box-shadow:0 6px 0 #f0d3d0,0 12px 18px rgba(234,67,53,.22)}
.ba-auth__round:active{transform:translateY(2px) scale(.97);box-shadow:0 1px 0 #e1e1e1}
.ba-auth__sr{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.ba-auth__fields{display:flex;flex-direction:column;align-items:stretch;text-align:left}
.ba-auth__input{width:100%;background:#eee;border:2px solid transparent;border-radius:7px;padding:12px 15px;margin:6px 0;font:inherit;font-size:.85rem;color:#222;outline:0;resize:vertical;
  transition:background .2s,border-color .2s,box-shadow .2s,transform .2s}
.ba-auth__input::placeholder{color:#777}
.ba-auth__input:focus{background:#fff;border-color:var(--a1);box-shadow:0 6px 16px color-mix(in srgb,var(--a1) 22%,transparent);transform:translateY(-1px)}
.ba-auth__two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ba-auth__pw{position:relative}.ba-auth__pw .ba-auth__input{padding-right:44px}
.ba-auth__eye{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:34px;height:34px;border:0;background:transparent;color:#777;border-radius:50%;cursor:pointer;transition:color .2s,background .2s,transform .2s}
.ba-auth__eye:hover{color:var(--a1);background:color-mix(in srgb,var(--a1) 12%,transparent);transform:translateY(-50%) scale(1.1)}
.ba-auth__row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:8px 0 2px}
.ba-auth__row .ba-auth__forgot{margin:0;align-self:auto}.ba-auth__row .ba-auth__check{margin:0;font-size:.78rem;align-items:center}
.ba-auth__forgot{align-self:center;margin:10px 0 2px;font-size:.78rem;color:#333;text-decoration:none;position:relative}
.ba-auth__forgot::after{content:"";position:absolute;left:0;right:0;bottom:-2px;height:2px;background:var(--a1);transform:scaleX(0);transform-origin:left;transition:transform .3s ease}
.ba-auth__forgot:hover{color:var(--a1)}.ba-auth__forgot:hover::after{transform:scaleX(1)}
.ba-auth__turnstile{display:flex;justify-content:center;margin:10px 0 0;min-height:0;max-width:100%;overflow:hidden}
.ba-auth__meter{height:4px;border-radius:4px;background:#e6e6e6;overflow:hidden;margin:-2px 0 4px}.ba-auth__meter i{display:block;height:100%;width:0;border-radius:4px;transition:width .3s,background .3s}
.ba-auth__match{display:block;min-height:1.1em;font-size:.72rem;margin:-2px 0 4px}.ba-auth__match.is-ok{color:#16a34a}.ba-auth__match.is-bad{color:#dc2626}
.ba-auth__check{display:flex;align-items:flex-start;gap:9px;font-size:.72rem;line-height:1.45;color:#444;margin:6px 0;cursor:pointer}
.ba-auth__check input{margin-top:2px;flex:0 0 auto}.ba-auth__check a{color:var(--a1);font-weight:600}
.ba-auth__err{color:#dc2626;font-size:.72rem;margin:-2px 0 4px}
.ba-auth__alert{font-size:.78rem;line-height:1.45;border-radius:8px;padding:10px 12px;margin:8px 0;text-align:left}
.ba-auth__alert--bad{background:#fee2e2;color:#991b1b;border:1px solid #fecaca;animation:baAuthShake .45s ease}
.ba-auth__alert--bad a{color:#7f1d1d;font-weight:700}
.ba-auth__alert--ok{background:#dcfce7;color:#166534;border:1px solid #bbf7d0}
.ba-auth__done{display:flex;flex-direction:column;gap:6px;align-items:center;text-align:center;padding:22px 14px}.ba-auth__done i{font-size:2.2rem;color:#16a34a;animation:baAuthPop .6s cubic-bezier(.34,1.56,.64,1) both}
@keyframes baAuthShake{0%,100%{transform:translateX(0)}20%{transform:translateX(-6px)}40%{transform:translateX(6px)}60%{transform:translateX(-4px)}80%{transform:translateX(4px)}}
@keyframes baAuthPop{from{transform:scale(0) rotate(-40deg)}}
.ba-auth__resend{margin:0 0 4px}.ba-auth__link-btn{background:none;border:0;color:var(--a1);font:inherit;font-size:.78rem;font-weight:700;text-decoration:underline;cursor:pointer;padding:4px}

/* the main buttons: 3D, glassy, pressable */
.ba-auth__btn,.ba-auth__ghost{position:relative;display:inline-flex;align-self:center;align-items:center;justify-content:center;border-radius:999px;font:inherit;font-size:.75rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;text-decoration:none;cursor:pointer;
  padding:13px 48px;margin-top:14px;color:var(--a-on);isolation:isolate;transition:transform .22s cubic-bezier(.34,1.56,.64,1),box-shadow .2s,filter .2s;-webkit-tap-highlight-color:transparent}
.ba-auth__btn{border:1px solid var(--a-dark);background:linear-gradient(180deg,color-mix(in srgb,var(--a1) 78%,#fff) 0%,var(--a1) 55%,color-mix(in srgb,var(--a1) 90%,#000) 100%);
  box-shadow:0 5px 0 var(--a-dark),0 12px 20px var(--a-glow),inset 0 1px 0 rgba(255,255,255,.55),inset 0 -3px 6px rgba(0,0,0,.12)}
.ba-auth__ghost{border:1.5px solid var(--a-on);background:rgba(255,255,255,.14);-webkit-backdrop-filter:blur(8px) saturate(1.4);backdrop-filter:blur(8px) saturate(1.4);
  box-shadow:0 5px 0 color-mix(in srgb,var(--a-dark) 70%,transparent),0 12px 20px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.55)}
.ba-auth__btn::after,.ba-auth__ghost::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:1;
  background:linear-gradient(115deg,transparent 35%,rgba(255,255,255,.6) 50%,transparent 65%),linear-gradient(180deg,rgba(255,255,255,.3),rgba(255,255,255,0) 52%);background-size:250% 100%,100% 100%;background-position:160% 0,0 0;background-repeat:no-repeat}
.ba-auth__btn:hover,.ba-auth__ghost:hover{transform:translateY(-3px) scale(1.03);filter:brightness(1.05)}
.ba-auth__btn:hover::after,.ba-auth__ghost:hover::after{animation:baAuthShine .9s ease}
@keyframes baAuthShine{to{background-position:-60% 0,0 0}}
.ba-auth__btn:active,.ba-auth__ghost:active{transform:translateY(4px) scale(.98);box-shadow:0 1px 0 var(--a-dark),0 3px 8px rgba(0,0,0,.2),inset 0 2px 6px rgba(0,0,0,.25);transition-duration:.06s}
.ba-auth__btn:disabled{filter:grayscale(.5);opacity:.7;cursor:not-allowed;transform:none}
.ba-auth__btn:focus-visible,.ba-auth__ghost:focus-visible{outline:3px solid var(--a-glow);outline-offset:3px}
.ba-auth__ghost:focus-visible{outline-color:var(--a-on)}
.ba-auth__btn span,.ba-auth__ghost span{position:relative;z-index:2}

/* the sliding colour panel */
.ba-auth__overlay{position:absolute;top:0;bottom:0;left:50%;width:50%;z-index:3;overflow:hidden;color:var(--a-on);text-align:center;
  background:linear-gradient(135deg,color-mix(in srgb,var(--a1) 86%,#fff),var(--a1) 50%,color-mix(in srgb,var(--a2) 80%,#000)) 0 0/cover no-repeat;display:flex;align-items:center;justify-content:center;
  transition:transform .62s cubic-bezier(.77,0,.18,1)}
.ba-auth__overlay-in{position:relative;z-index:2;padding:0 40px;transition:opacity .25s ease;animation:baAuthFade .7s ease .25s both}
.ba-auth__overlay h2{font-size:2rem;font-weight:800;margin:0 0 4px;letter-spacing:-.01em}
.ba-auth__overlay p{font-size:.9rem;font-weight:500;line-height:1.5;margin:18px 0 8px}
.ba-auth__blob{position:absolute;border-radius:50%;background:rgba(255,255,255,.12);pointer-events:none;animation:baAuthDrift 9s ease-in-out infinite alternate}
.ba-auth__blob--a{width:240px;height:240px;left:-70px;top:-60px}.ba-auth__blob--b{width:300px;height:300px;right:-110px;bottom:-120px;animation-delay:-4s;background:rgba(255,255,255,.09)}
@keyframes baAuthDrift{from{transform:translate(0,0) scale(1)}to{transform:translate(28px,18px) scale(1.12)}}

/* sign-up: the panels sit the other way round */
.ba-auth--signup .ba-auth__form{transform:translateX(100%)}
.ba-auth--signup .ba-auth__overlay{transform:translateX(-100%)}
/* leaving: the panels swap places before the next page opens */
.ba-auth--login.is-leaving .ba-auth__form{transform:translateX(100%)}
.ba-auth--login.is-leaving .ba-auth__overlay{transform:translateX(-100%)}
.ba-auth--signup.is-leaving .ba-auth__form,.ba-auth--signup.is-leaving .ba-auth__overlay{transform:none}
.ba-auth.is-leaving .ba-auth__scroll,.ba-auth.is-leaving .ba-auth__overlay-in{opacity:0}

@media (max-width:767.98px){
  .ba-auth{flex-direction:column;min-height:0}
  .ba-auth__form{flex:0 0 auto;width:100%;transform:none!important}
  .ba-auth__scroll{padding:28px 22px 26px}
  .ba-auth__overlay{position:relative;left:auto;width:100%;transform:none!important;padding:26px 0 30px;order:2}
  .ba-auth__overlay h2{font-size:1.45rem}.ba-auth__overlay p{font-size:.82rem;margin:10px 0 0}
  .ba-auth__two{grid-template-columns:1fr}
  .ba-auth.is-leaving .ba-auth__scroll,.ba-auth.is-leaving .ba-auth__overlay-in{opacity:1}
}
@media (prefers-reduced-motion:reduce){
  .ba-auth,.ba-auth__scroll,.ba-auth__overlay-in,.ba-auth__blob,.ba-auth__alert--bad,.ba-auth__done i{animation:none!important}
  .ba-auth__form,.ba-auth__overlay,.ba-auth__btn,.ba-auth__ghost,.ba-auth__round,.ba-auth__input{transition:none!important}
  .ba-auth__btn:hover,.ba-auth__ghost:hover,.ba-auth__round:hover{transform:none}
}
