/* Home page sign-in: the hero button state and the phone sign-in modal
 * (/site/auth.js). Tokens follow index.html and book/book.css. */

/* The hero button while Firebase is loading */
.d-hero-btn.is-busy { opacity: .7; pointer-events: none; }
.d-hero-btn.is-user i { font-size: 1.35rem; }

/* ── Modal ─────────────────────────────────────────────────────────── */
.rz-auth { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.rz-auth-backdrop { position: absolute; inset: 0; background: rgba(26, 26, 46, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.rz-auth-card {
  position: relative; width: 100%; max-width: 420px; max-height: calc(100vh - 2rem); overflow: auto;
  background: #fff; color: #333; border-radius: 22px; padding: 1.3rem 1.3rem 1.4rem;
  box-shadow: 0 24px 60px rgba(10, 30, 35, .35);
  animation: rz-auth-in .22s ease-out;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.45;
}
@keyframes rz-auth-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rz-auth-card { animation: none; } }
body.rz-auth-open { overflow: hidden; }
@media (max-width: 480px) {
  .rz-auth { padding: 0; align-items: flex-end; }
  .rz-auth-card { max-width: none; max-height: 92vh; border-radius: 22px 22px 0 0; padding-bottom: calc(1.4rem + env(safe-area-inset-bottom)); }
  @keyframes rz-auth-in { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
}

.rz-auth-close {
  position: absolute; top: .8rem; right: .8rem; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: #F1F5F6; color: #1A1A2E; font-size: 1.4rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.rz-auth-close:hover { background: #E3EBED; }
.rz-auth-brand { display: flex; align-items: center; gap: .45rem; font-weight: 800; color: #1A1A2E; font-size: 1rem; margin-bottom: .9rem; }
.rz-auth-brand img { width: 28px; height: 28px; border-radius: 8px; }

/* The sign-in steps rendered by mountPhoneSignIn (classes from book.css) */
.rz-auth .rw-signin { border: 0; padding: 0; background: none; }
.rz-auth .rw-title { margin: 0 0 .3rem; font-size: 1.25rem; font-weight: 800; color: #1A1A2E; line-height: 1.25; }
.rz-auth .rw-hint { margin: 0 0 1rem; font-size: .9rem; color: #666; }
.rz-auth .rw-label { display: block; font-size: .82rem; font-weight: 700; margin-bottom: .3rem; color: #1A1A2E; }
.rz-auth .rw-phone-row, .rz-auth .rw-name-row { display: flex; gap: .5rem; }
.rz-auth .rw-select { flex: 0 0 44%; min-width: 0; border: 1.5px solid #E3EBED; border-radius: 12px; padding: .7rem .5rem; background: #fff; color: #1A1A2E; font: inherit; font-size: .95rem; }
.rz-auth .rw-input { flex: 1; min-width: 0; width: 100%; border: 1.5px solid #E3EBED; border-radius: 12px; padding: .75rem .85rem; font: inherit; font-size: 16px; color: #1A1A2E; background: #fff; }
.rz-auth .rw-input:focus, .rz-auth .rw-select:focus { outline: none; border-color: #00BCD4; box-shadow: 0 0 0 3px rgba(0, 188, 212, .18); }
.rz-auth .rw-code { letter-spacing: .4em; text-align: center; font-size: 1.5rem; font-weight: 700; }
.rz-auth .rw-btn {
  display: block; width: 100%; margin-top: .8rem; padding: .9rem; border: 0; border-radius: 999px; text-align: center;
  background: #00BCD4; color: #fff; font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; text-decoration: none;
  box-shadow: 0 8px 22px rgba(0, 188, 212, .3); transition: background .15s, transform .15s;
}
.rz-auth .rw-btn:hover { background: #00A5BA; }
.rz-auth .rw-btn:disabled { opacity: .6; cursor: default; }
.rz-auth .rw-btn.secondary { background: #fff; color: #00747F; border: 1.5px solid #B2EBF2; box-shadow: none; }
.rz-auth .rw-btn.secondary:hover { background: #F1F5F6; }
.rz-auth .rw-links { display: flex; justify-content: space-between; gap: .5rem; margin-top: .7rem; }
.rz-auth .rw-link { background: none; border: 0; color: #00747F; font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer; padding: .25rem 0; text-decoration: underline; }
.rz-auth .rw-error { margin: .6rem 0 0; color: #D14343; font-size: .85rem; }
.rz-auth .rw-error[hidden] { display: none; }

/* After signing in */
.rz-auth-done { text-align: center; }
.rz-auth-done-icon { font-size: 2.6rem; color: #2E9E5B; margin: .2rem 0 .6rem; }
.rz-auth-done .rw-hint { margin-bottom: 1.1rem; }
