/* ============================================================
   CoinScanner auth popup
   Card over a dimmed site. Full screen on phones.
   Light only, to match the rest of the site.
   ============================================================ */

.cs-auth, .cs-auth *, .cs-auth *::before, .cs-auth *::after{box-sizing:border-box}

.cs-auth{
  position:fixed; inset:0; z-index:9999;
  display:flex; align-items:center; justify-content:center;
  padding:20px;
}
.cs-auth[hidden]{display:none}

.cs-auth-backdrop{
  position:absolute; inset:0;
  background:rgba(15,23,42,.55);
  backdrop-filter:blur(2px);
  animation:csFade .18s ease;
}
@keyframes csFade{from{opacity:0}to{opacity:1}}

.cs-auth-card{
  position:relative;
  width:100%; max-width:396px;
  max-height:calc(100vh - 40px);
  overflow-y:auto;
  background:#fff;
  border-radius:18px;
  padding:26px 28px 22px;
  box-shadow:0 24px 64px rgba(15,23,42,.3);
  animation:csPop .22s cubic-bezier(.2,.9,.3,1.15);
  color:#0f172a;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,Arial,sans-serif;
}
@keyframes csPop{from{opacity:0;transform:scale(.95) translateY(10px)}to{opacity:1;transform:none}}

.cs-auth-x{
  position:absolute; right:14px; top:12px;
  width:32px; height:32px;
  border:0; background:none;
  font-size:24px; line-height:1; color:#94a3b8;
  cursor:pointer; border-radius:9px;
}
.cs-auth-x:hover{background:#f1f5f9; color:#0f172a}

.cs-auth-brand{
  display:flex; align-items:center; justify-content:center; gap:9px;
  margin-bottom:20px;
}
/* 40px on screen needs a 80px source for Retina. logo-nav.png is
   only 68x68, so the template points at favicon-192.png, which is
   the same mark at 192x192 and stays sharp. */
.cs-auth-brand img{height:40px;width:40px;display:block}
.cs-auth-brand span{font-weight:800;font-size:17px;letter-spacing:.2px;color:#0f172a}

.cs-auth-h{margin:0 0 5px;font-size:21px;font-weight:800;letter-spacing:-.4px;text-align:center;color:#0f172a}
.cs-auth-sub{margin:0 0 20px;font-size:13px;line-height:1.55;color:#475569;text-align:center}

/* messages */
.cs-auth-msg{
  font-size:13px; line-height:1.5;
  padding:10px 13px; border-radius:10px; margin-bottom:15px;
}
.cs-auth-msg[hidden]{display:none}
.cs-auth-msg.err{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}
.cs-auth-msg.ok{background:#f0fdf4;color:#14532d;border:1px solid #bbf7d0}

/* google */
.cs-g{
  width:100%; display:flex; align-items:center; justify-content:center; gap:11px;
  padding:12px; font-size:14.5px; font-weight:650; color:#1f2937;
  background:#fff; border:1.5px solid #d5dbe4; border-radius:11px;
  cursor:pointer; text-decoration:none; transition:.15s;
}
.cs-g:hover{background:#f8fafc;border-color:#b9c4d2;box-shadow:0 3px 12px rgba(15,23,42,.08)}
.cs-g svg{width:18px;height:18px;flex:none}

.cs-or{
  display:flex; align-items:center; gap:12px; margin:17px 0;
  color:#94a3b8; font-size:11.5px; font-weight:700;
  letter-spacing:.5px; text-transform:uppercase;
}
.cs-or::before,.cs-or::after{content:"";flex:1;height:1px;background:#e2e8f0}

/* fields */
.cs-auth-card form{margin:0}
.cs-f{margin-bottom:14px}
.cs-l{display:block;font-size:12.5px;font-weight:650;color:#334155;margin-bottom:6px}
.cs-row{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:6px}
.cs-row .cs-l{margin-bottom:0}
.cs-sm{font-size:12px;font-weight:650;color:#1877F2;text-decoration:none}
.cs-sm:hover{text-decoration:underline}

.cs-wrap{position:relative}
.cs-i{
  width:100%; height:45px; padding:0 14px;
  font-size:15px; font-family:inherit; color:#0f172a;
  background:#fff; border:1.5px solid #e2e8f0; border-radius:11px;
  outline:none; transition:border-color .15s, box-shadow .15s;
}
.cs-i::placeholder{color:#b2bcc9}
.cs-i:focus{border-color:#1877F2;box-shadow:0 0 0 3.5px rgba(24,119,242,.14)}
.cs-eye-i{padding-right:46px}

.cs-eye{
  position:absolute; right:6px; top:50%; transform:translateY(-50%);
  width:36px; height:36px; display:grid; place-items:center;
  background:none; border:0; border-radius:9px;
  color:#94a3b8; cursor:pointer; font-size:14px;
}
.cs-eye:hover{color:#64748b;background:#f1f5f9}

.cs-hint{margin:6px 0 0;font-size:11.5px;color:#94a3b8;line-height:1.45}
/* Helper line that sits under the label, above the input, rather
   than under the input. Same look, spacing flipped. */
.cs-hint-top{margin:2px 0 6px}

.cs-meter{display:flex;gap:4px;margin-top:8px}
.cs-meter i{height:3px;flex:1;border-radius:2px;background:#e2e8f0;transition:background .2s}
.cs-meter i.on{background:#16a34a}

.cs-check{
  display:flex;align-items:center;gap:9px;cursor:pointer;
  font-size:13px;color:#475569;margin:2px 0 16px;
}
.cs-check input{width:16px;height:16px;accent-color:#1877F2;cursor:pointer;flex:none}

.cs-btn{
  width:100%; height:46px;
  font-family:inherit; font-size:15px; font-weight:700; color:#fff;
  background:#1877F2; border:0; border-radius:11px; cursor:pointer;
  box-shadow:0 3px 12px rgba(24,119,242,.28); transition:.15s;
}
.cs-btn:hover{background:#0f5fd0;box-shadow:0 5px 18px rgba(24,119,242,.34)}
.cs-btn:disabled{opacity:.6;cursor:not-allowed;box-shadow:none}

.cs-switch{margin:16px 0 0;text-align:center;font-size:13.5px;color:#475569}
.cs-switch a{color:#1877F2;font-weight:700;text-decoration:none}
.cs-switch a:hover{text-decoration:underline}
.cs-muted{color:#94a3b8;font-size:12.5px}

.cs-legal{margin:13px 0 0;text-align:center;font-size:11.5px;line-height:1.55;color:#94a3b8}
.cs-legal a{color:#64748b;text-decoration:underline}

.cs-ic{
  width:52px;height:52px;border-radius:14px;
  background:#eaf2fe;color:#1877F2;
  display:grid;place-items:center;font-size:22px;
  margin:0 auto 13px;
}

/* otp */
.cs-otp{display:flex;gap:8px;justify-content:center;margin:18px 0}
.cs-otp input{
  width:42px;height:50px;text-align:center;
  font-size:20px;font-weight:800;color:#0f172a;
  background:#fff;border:1.5px solid #e2e8f0;border-radius:11px;
  outline:none;transition:.15s;font-family:inherit;
}
.cs-otp input:focus{border-color:#1877F2;box-shadow:0 0 0 3.5px rgba(24,119,242,.14)}
.cs-otp input.filled{border-color:#1877F2;background:#eaf2fe;color:#1877F2}

/* honeypot */
.cs-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;opacity:0;pointer-events:none}

/* guest nudge, smaller card */
.cs-auth.nudge .cs-auth-card{max-width:340px;text-align:center}

/* phone: full screen */
@media (max-width:520px){
  .cs-auth{padding:0;align-items:stretch}
  .cs-auth-card{
    max-width:none;width:100%;
    max-height:none;min-height:100vh;
    border-radius:0;padding:60px 22px 30px;
    animation:csSlide .24s ease;
  }
  @keyframes csSlide{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
  .cs-auth-x{right:12px;top:12px;width:38px;height:38px;font-size:26px}
  .cs-otp input{width:40px;height:48px;font-size:19px}
}

/* stop the page scrolling behind the popup */
body.cs-auth-open{overflow:hidden}
