/* =====================================================================
 * Batte — Log in / Sign up / password screens
 * Loaded only on logged-out account pages.
 * ===================================================================== */

body.bt-auth-screen { background: radial-gradient(1200px 520px at 85% 0, rgba(242, 84, 27, .16), transparent 60%), linear-gradient(180deg, var(--cotton), #fff 75%) no-repeat; }
.bt-auth-screen .bt-main { background: none; padding-top: 0; }
.bt-auth-screen .bt-prose, .bt-auth-screen .bt-prose--wide { max-width: none; }
.bt-auth-screen .bt-entry { margin: 0; }
.bt-auth-screen .bt-main .woocommerce { display: block; }

.bt-auth { position: relative; display: grid; grid-template-columns: 1fr; width: 100%; max-width: 1040px; margin: 0 auto; }
.bt-auth form.bt-auth__form { margin: 0; padding: 0; border: 0; border-radius: 0; }

/* ---------- Brand panel ---------- */
.bt-auth__brand { position: relative; overflow: hidden; isolation: isolate; color: #fff; padding: 26px 22px 64px; background: radial-gradient(120% 90% at 0% 0%, var(--brand-soft) 0%, var(--brand) 45%, var(--brand-deep) 100%); }
.bt-auth__glow { position: absolute; z-index: -1; right: -120px; bottom: -160px; width: 380px; height: 380px; border-radius: 50%; border: 1px solid rgba(255, 176, 137, .28); animation: bt-auth-spin 40s linear infinite; }
.bt-auth__glow::before, .bt-auth__glow::after { content: ""; position: absolute; border-radius: 50%; }
.bt-auth__glow::before { inset: 46px; border: 1px dashed rgba(255, 176, 137, .25); }
.bt-auth__glow::after { width: 14px; height: 14px; top: 40px; left: 62px; background: var(--accent); box-shadow: 0 0 24px 6px rgba(242, 84, 27, .55); }
.bt-auth__brand::before { content: ""; position: absolute; z-index: -1; top: -80px; left: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 176, 137, .22), transparent 70%); filter: blur(10px); }
.bt-auth__mark { width: 104px; color: #fff; }
.bt-auth__mark svg { display: block; width: 100%; height: auto; }
.bt-auth__kicker { margin: 8px 0 0; color: var(--accent-hi); font-size: 10.5px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
.bt-auth__hello { margin: 14px 0 16px; font-size: 1.55rem; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.bt-auth__hello span { display: none; }
.bt-auth[data-view="login"] [data-show="login"], .bt-auth[data-view="register"] [data-show="register"], .bt-auth[data-view="password"] [data-show="password"] { display: inline; animation: bt-auth-in .5s var(--ease) both; }
.bt-auth__perks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bt-auth__perks li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); font-size: 12px; font-weight: 600; line-height: 1.25; animation: bt-auth-in .5s var(--ease) both; }
.bt-auth__perks li:nth-child(2) { animation-delay: .06s; }
.bt-auth__perks li:nth-child(3) { animation-delay: .12s; }
.bt-auth__perks li:nth-child(4) { animation-delay: .18s; }
.bt-auth__perk-ic { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 176, 137, .16); color: var(--accent-hi); }
.bt-auth__perk-ic .bt-icon { width: 15px; height: 15px; }

/* ---------- Form card ---------- */
.bt-auth__main { position: relative; z-index: 1; display: flex; flex-direction: column; margin-top: -36px; padding: 28px 20px 24px; background: #fff; border-radius: 26px 26px 0 0; box-shadow: 0 -12px 30px -22px rgba(22, 32, 74, .5); }
.bt-auth__panel { animation: bt-auth-in .45s var(--ease) both; }
.bt-auth__panel[hidden] { display: none; }
.bt-auth__title { margin: 0 0 6px; font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.15rem); font-weight: 800; line-height: 1.1; letter-spacing: -.025em; color: var(--ink); }
.bt-auth__sub { margin: 0 0 22px; color: var(--muted); font-size: var(--t-sm); line-height: 1.5; }
.bt-auth__form { margin: 0; padding: 0; border: 0; }

/* Floating-label fields */
.bt-field { position: relative; margin: 0 0 14px; }
.bt-field__input { display: block; width: 100%; height: 58px; margin: 0; padding: 22px 16px 6px; border: 1.5px solid #E1E2E8; border-radius: 14px; background: #FAFAFC; color: var(--ink); font: 600 16px/1.2 var(--f-body); box-shadow: none; transition: border-color .18s, background .18s, box-shadow .18s; -webkit-appearance: none; appearance: none; }
.bt-field--pw .bt-field__input { padding-right: 54px; }
.bt-field__input:hover { border-color: #CBCED8; }
.bt-field__input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(31, 45, 107, .12); }
.bt-field__label { position: absolute; left: 17px; top: 29px; transform: translateY(-50%); margin: 0; color: #7C8197; font-size: 15px; font-weight: 500; pointer-events: none; transition: top .18s var(--ease), font-size .18s var(--ease), color .18s; }
.bt-field__input:focus + .bt-field__label,
.bt-field__input:not(:placeholder-shown) + .bt-field__label,
.bt-field__input:-webkit-autofill + .bt-field__label { top: 15px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: var(--brand); }
.bt-field__input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #FAFAFC inset; -webkit-text-fill-color: var(--ink); }
.bt-field__eye { position: absolute; right: 8px; top: 29px; transform: translateY(-50%); width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23545A72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 21px no-repeat; transition: background-color .15s; }
.bt-field__eye:hover { background-color: rgba(31, 45, 107, .07); }
.bt-field__eye.is-on { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F2D6B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.9 17.9A10 10 0 0 1 12 19C5.5 19 2 12 2 12a18 18 0 0 1 4.1-5.1M9.9 5.2A9 9 0 0 1 12 5c6.5 0 10 7 10 7a18 18 0 0 1-2.2 3.2M14.1 14.1a3 3 0 1 1-4.2-4.2'/%3E%3Cpath d='M2 2l20 20'/%3E%3C/svg%3E"); }
.bt-field__hint { margin: 6px 4px 0; color: var(--muted); font-size: 12.5px; }
.bt-field.is-invalid .bt-field__input { border-color: var(--err); background: #FFF7F6; }
.bt-field.is-invalid .bt-field__label { color: var(--err); }
.bt-field__err { margin: 6px 4px 0; color: var(--err); font-size: 12.5px; font-weight: 700; }
.bt-field.is-ok .bt-field__input { border-color: #9CC7A9; }

/* Remember me + forgot */
.bt-auth__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 20px; flex-wrap: wrap; }
.bt-check { position: relative; display: inline-flex; align-items: center; gap: 9px; margin: 0; font-size: var(--t-sm); font-weight: 600; color: var(--ink); cursor: pointer; }
.bt-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bt-check__box { flex: none; width: 20px; height: 20px; border: 1.5px solid #CBCED8; border-radius: 6px; background: #fff center / 14px no-repeat; transition: background-color .15s, border-color .15s; }
.bt-check input:checked + .bt-check__box { border-color: var(--brand); background-color: var(--brand); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); }
.bt-check input:focus-visible + .bt-check__box { box-shadow: 0 0 0 4px rgba(31, 45, 107, .15); }
.bt-auth__forgot { color: var(--brand); font-size: var(--t-sm); font-weight: 700; text-decoration: none; }
.bt-auth__forgot:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Main button */
.bt-auth__submit { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 56px; margin: 4px 0 0; padding: 0 20px; border: 0; border-radius: 14px; overflow: hidden; background: linear-gradient(135deg, var(--brand-soft), var(--brand) 45%, var(--brand-deep)); color: #fff !important; font: 800 16px/1 var(--f-body); letter-spacing: .01em; text-decoration: none !important; cursor: pointer; box-shadow: 0 16px 30px -16px rgba(31, 45, 107, .8); transition: transform .15s var(--ease), box-shadow .2s, filter .2s; }
.bt-auth__submit::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 176, 137, .35) 50%, transparent 65%); transform: translateX(-100%); transition: transform .7s var(--ease); }
.bt-auth__submit:hover { filter: brightness(1.06); box-shadow: 0 20px 34px -16px rgba(31, 45, 107, .85); }
.bt-auth__submit:hover::after { transform: translateX(100%); }
.bt-auth__submit:active { transform: scale(.985); }
.bt-auth__submit:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.bt-auth__submit .bt-icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.bt-auth__submit:hover .bt-icon { transform: translateX(4px); }
.bt-auth__submit.is-busy { pointer-events: none; }
.bt-auth__submit.is-busy span, .bt-auth__submit.is-busy .bt-icon { opacity: 0; }
.bt-auth__submit.is-busy::before { content: ""; position: absolute; width: 22px; height: 22px; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: bt-auth-spin .7s linear infinite; }

/* Switch between log in / sign up */
.bt-auth__switch { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 24px; padding-top: 20px; border-top: 1px dashed #E1E2E8; color: var(--muted); font-size: var(--t-sm); font-weight: 600; text-align: center; }
.bt-auth__switch-btn { display: inline-flex; align-items: center; padding: 10px 18px; border: 1.5px solid var(--brand); border-radius: var(--r-pill); color: var(--brand); font-weight: 800; text-decoration: none; transition: background .15s, color .15s; }
.bt-auth__switch-btn:hover { background: var(--brand); color: #fff; }

/* "Already a member" / "no account yet" */
.bt-auth__member { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid rgba(242, 84, 27, .55); border-radius: 14px; background: linear-gradient(180deg, #FBF9F4, #FFEFE6); color: var(--ink); font-size: var(--t-sm); line-height: 1.45; animation: bt-auth-in .4s var(--ease) both; }
.bt-auth__member[hidden] { display: none; }
.bt-auth__member strong { display: block; margin-bottom: 2px; font-size: var(--t-md); }
.bt-auth__member--inline { margin: -4px 0 14px; }
.bt-auth__member-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; }
.bt-auth__member-ic .bt-icon { width: 18px; height: 18px; }
.bt-auth__member-acts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; }
.bt-auth__link { padding: 0; border: 0; background: none; color: var(--brand); font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bt-auth__link--muted { color: var(--muted); font-weight: 700; }
.bt-auth__nudge { margin: -6px 4px 14px; color: var(--muted); font-size: 13px; }
.bt-auth__nudge[hidden] { display: none; }

/* Google + "or use email" (from Batte Core) */
.bt-auth .bt-gform { margin: 0 0 6px; }
.bt-auth .bt-gbtn { display: flex; justify-content: center; min-height: 44px; }
.bt-auth .bt-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.bt-auth .bt-or::before, .bt-auth .bt-or::after { content: ""; flex: 1; height: 1px; background: #E1E2E8; }

/* WooCommerce bits inside the card */
.bt-auth .woocommerce-privacy-policy-text p { margin: 2px 4px 16px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.bt-auth .bt-guest-track { margin: 16px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.bt-auth .woocommerce-notices-wrapper:empty { display: none; }
.bt-auth .woocommerce-error, .bt-auth .woocommerce-message, .bt-auth .woocommerce-info { margin: 0 0 18px; border-radius: 14px; }
.bt-auth .woocommerce-error a { font-weight: 800; }

/* Done (email sent) */
.bt-auth__panel--done { text-align: center; }
.bt-auth__done-ic { display: inline-grid; place-items: center; width: 68px; height: 68px; margin-bottom: 14px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-hi), var(--accent)); color: var(--ink); box-shadow: 0 12px 24px -12px rgba(242, 84, 27, .9); animation: bt-auth-pop .6s var(--ease) both; }
.bt-auth__done-ic .bt-icon { width: 30px; height: 30px; }

.bt-auth__help { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 26px 0 0; color: var(--muted); font-size: 13px; }
.bt-auth__help .bt-icon { width: 18px; height: 18px; color: #1F8F4E; }
.bt-auth__help a { color: var(--ink); font-weight: 700; }

/* ---------- Phone: full-bleed, app-like ---------- */
@media (max-width: 899px) {
	body.bt-auth-screen { background: #fff; }
	.bt-auth { width: auto; margin: 0 calc(var(--gutter) * -1); }
	.bt-auth__brand { padding: 22px 20px 54px; }
	.bt-auth__mark { display: none; }
	.bt-auth__kicker { margin: 0; }
	.bt-auth__hello { margin: 6px 0 14px; font-size: 1.4rem; }
	.bt-auth__glow { right: -170px; bottom: -230px; }
	.bt-auth__glow::after { display: none; }
	.bt-auth__perks { display: flex; gap: 8px; margin: 0 -20px; padding: 0 20px 2px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 20px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	.bt-auth__perks::-webkit-scrollbar { display: none; }
	.bt-auth__perks li { flex: none; padding: 5px 12px 5px 5px; border-radius: var(--r-pill); white-space: nowrap; scroll-snap-align: start; }
	.bt-auth__perk-ic { width: 24px; height: 24px; }
	.bt-auth__perk-ic .bt-icon { width: 13px; height: 13px; }
}

/* ---------- Tablet / desktop: split card ---------- */
@media (min-width: 900px) {
	.bt-auth { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); margin: clamp(20px, 3vw, 40px) auto clamp(32px, 4vw, 56px); border-radius: 30px; overflow: hidden; background: #fff; box-shadow: 0 40px 80px -40px rgba(22, 32, 74, .45), 0 0 0 1px rgba(22, 32, 74, .04); min-height: 600px; }
	.bt-auth__brand { display: flex; flex-direction: column; justify-content: center; padding: 56px 48px; }
	.bt-auth__mark { width: 150px; }
	.bt-auth__hello { margin: 26px 0 26px; font-size: clamp(2rem, 1.4rem + 1.2vw, 2.6rem); }
	.bt-auth__perks { grid-template-columns: 1fr; gap: 12px; }
	.bt-auth__perks li { padding: 0; border: 0; background: none; font-size: var(--t-md); }
	.bt-auth__perk-ic { width: 40px; height: 40px; }
	.bt-auth__perk-ic .bt-icon { width: 19px; height: 19px; }
	.bt-auth__glow { width: 460px; height: 460px; }
	.bt-auth__main { justify-content: center; margin: 0; padding: 56px clamp(40px, 5vw, 72px); border-radius: 0; box-shadow: none; }
}

@keyframes bt-auth-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes bt-auth-pop { 0% { transform: scale(.5); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: none; } }
@keyframes bt-auth-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
	.bt-auth *, .bt-auth *::before, .bt-auth *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 899px) { .bt-auth-screen .bt-wa-float { display: none; } }
