/* ═══════════════════════════════════════════════════════════
   login_drawer.css — styles specific to the login drawer.
   Generic drawer chassis lives in css/base.css (.tb-drawer*).
═══════════════════════════════════════════════════════════ */

/* Login drawer must sit above every other drawer (e.g. trade drawer
   on /index.php opens the login drawer from inside its own content). */
#loginDrawerBackdrop { z-index: 1000; }
.tb-login-drawer    { z-index: 1001; }

.tb-login-drawer .tb-drawer-inner {
  padding: 64px 56px 48px 56px;
  position: relative;
  overflow-x: hidden;
}

.tb-login-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  font-size: 28px; line-height: 1;
  color: var(--c-text3);
  background: transparent; border: 0; cursor: pointer;
  border-radius: 50%;
  transition: background var(--t-fast), color var(--t-fast);
}
.tb-login-close:hover { background: var(--c-bg2); color: var(--c-text1); }

/* ── Screen switching ────────────────────────────────────────
   JS toggles aria-hidden on the inactive screen; CSS hides it
   completely. (Earlier slide trick was leaking screen 2 into
   view — replaced with a plain show/hide.)
─────────────────────────────────────────────────────────── */
.tb-login-screens { display: block; width: 100%; }
.tb-login-screen  { width: 100%; }
.tb-login-screen[aria-hidden="true"] { display: none; }

/* ── Typography ──────────────────────────────────────────── */
.tb-login-title {
  font-family: var(--font-display);
  font-size: 56px;
  letter-spacing: .01em;
  line-height: 1;
  color: var(--c-text1);
  margin: 0 0 12px 0;
}
.tb-login-sub {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--c-text2);
  margin: 0 0 32px 0;
  line-height: 1.5;
}
.tb-login-email-echo {
  color: var(--c-text1);
  border-bottom: 1px solid var(--c-border2);
  padding-bottom: 1px;
}

/* ── Google button ───────────────────────────────────────── */
.tb-login-google {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--c-bg3);
  color: var(--c-text1);
  border: 1px solid var(--c-border2);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .15em;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.tb-login-google:hover { background: var(--c-bg4); border-color: rgba(255,255,255,.22); }
.tb-login-google svg { color: var(--c-text2); }

/* ── Divider ─────────────────────────────────────────────── */
.tb-login-divider {
  display: flex; align-items: center; gap: 16px;
  margin: 28px 0;
}
.tb-login-divider::before,
.tb-login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--c-border);
}
.tb-login-divider span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .25em;
  color: var(--c-text3);
}

/* ── Form ────────────────────────────────────────────────── */
.tb-login-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--c-text3);
  margin: 0 0 10px 0;
  text-transform: uppercase;
}
.tb-login-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--c-bg2);
  border: 1px solid var(--c-border2);
  border-radius: var(--r-md);
  color: var(--c-text1);
  font-family: var(--font-body);
  font-size: 16px;
  transition: border-color var(--t-fast);
  margin-bottom: 16px;
}
.tb-login-input:focus {
  outline: none;
  border-color: var(--c-red);
}
.tb-login-input::placeholder { color: var(--c-text3); }

/* ── OTP grid ────────────────────────────────────────────── */
.tb-login-otp {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.tb-login-otp-slot {
  width: 100%;
  min-width: 0;          /* override <input>'s intrinsic min-width */
  height: 56px;
  padding: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 24px;
  background: var(--c-bg2);
  border: 1px solid var(--c-border2);
  border-radius: var(--r-md);
  color: var(--c-text1);
  caret-color: var(--c-red);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.tb-login-otp-slot:focus {
  outline: none;
  border-color: var(--c-red);
  background: var(--c-bg3);
}
.tb-login-otp-slot.filled { border-color: rgba(255,255,255,.22); }

/* ── Resend countdown ────────────────────────────────────── */
.tb-login-resend {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--c-text3);
  text-align: center;
  margin: 0 0 20px 0;
  text-transform: uppercase;
}
.tb-login-resend.ready {
  color: var(--c-text1);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Status band ─────────────────────────────────────────── */
.tb-login-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  margin-bottom: 14px;
}
.tb-login-status.success { background: rgba(22,199,132,.10); color: var(--c-green); border: 1px solid rgba(22,199,132,.30); }
.tb-login-status.error   { background: rgba(229,9,26,.10);   color: var(--c-red);   border: 1px solid rgba(229,9,26,.30); }

/* ── CTA button ──────────────────────────────────────────── */
.tb-login-cta {
  width: 100%;
  padding: 16px 20px;
  background: var(--c-red);
  color: #fff;
  border: 0; border-radius: var(--r-md);
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: .12em;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.tb-login-cta:hover { background: var(--c-red2); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(229,9,26,.35); }
.tb-login-cta:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.tb-login-arrow { font-size: 18px; line-height: 1; }

/* ── Back link (Screen 2) ────────────────────────────────── */
.tb-login-back {
  background: transparent; border: 0; padding: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--c-text2);
  text-transform: uppercase;
  cursor: pointer;
  margin: 0 0 24px 0;
}
.tb-login-back:hover { color: var(--c-text1); }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .tb-login-drawer .tb-drawer-inner { padding: 56px 24px 32px 24px; }
  .tb-login-title { font-size: 44px; }
  .tb-login-otp-slot { font-size: 22px; }
  .tb-login-otp { gap: 8px; }
}
