/* ── Coinbase Auth Modal ─────────────────────────────────────────── */

#cb-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: CoinbaseDisplay, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", sans-serif;
}

#cb-auth-overlay[hidden] {
  display: none;
}

.cb-auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 13, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: cb-auth-fade-in 0.2s ease-out;
}

@keyframes cb-auth-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.cb-auth-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow:
    0 32px 64px rgba(10, 11, 13, 0.18),
    0 0 0 1px rgba(10, 11, 13, 0.06);
  padding: 36px 32px 32px;
  overflow: hidden;
  animation: cb-auth-slide-up 0.22s cubic-bezier(0.34, 1.26, 0.64, 1);
}

.cb-auth-dialog.cb-auth-dialog-wide {
  max-width: 520px;
}

@keyframes cb-auth-slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Shared hidden ─────────────────────────────────────────────── */
.cb-auth-loading[hidden],
.cb-auth-message[hidden],
.cb-auth-device-check[hidden],
.cb-auth-binding[hidden] {
  display: none;
}

/* ── Coinbase logo ─────────────────────────────────────────────── */
.cb-auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.cb-auth-logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.cb-auth-logo-wordmark {
  font-size: 17px;
  font-weight: 600;
  color: #0a0b0d;
  letter-spacing: -0.02em;
}

/* ── Loading ───────────────────────────────────────────────────── */
.cb-auth-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 12px 0 8px;
  text-align: center;
}

.cb-auth-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid #eef2ff;
  border-top-color: #0052ff;
  border-radius: 50%;
  animation: cb-auth-spin 0.8s linear infinite;
}

@keyframes cb-auth-spin {
  to { transform: rotate(360deg); }
}

.cb-auth-loading-label {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #0a0b0d;
  letter-spacing: -0.01em;
}

.cb-auth-loading-dots {
  display: flex;
  gap: 6px;
}

.cb-auth-loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0052ff;
  animation: cb-auth-dot 1.2s ease-in-out infinite;
}

.cb-auth-loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.cb-auth-loading-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes cb-auth-dot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1; }
}

/* ── High-volume message ───────────────────────────────────────── */
.cb-auth-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cb-auth-alert-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: #f5f8ff;
  color: #0052ff;
}

.cb-auth-title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: #0a0b0d;
  letter-spacing: -0.03em;
}

.cb-auth-body {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.6;
  color: #5b616e;
  max-width: 340px;
}

.cb-auth-register {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 12px;
  background: #0052ff;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  letter-spacing: -0.01em;
}

.cb-auth-register:hover  { background: #0048e0; }
.cb-auth-register:active { transform: scale(0.98); }

/* ── Device check ──────────────────────────────────────────────── */
.cb-auth-device-check {
  text-align: left;
}

.cb-auth-check-heading {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: #0a0b0d;
  letter-spacing: -0.02em;
}

.cb-auth-check-tagline {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: #5b616e;
}

.cb-auth-check-session {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px 14px;
  border: 1px solid #c5d5ff;
  border-radius: 999px;
  background: #f5f8ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #0052ff;
  font-variant-numeric: tabular-nums;
}

.cb-auth-check-session-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0052ff;
  box-shadow: 0 0 8px rgba(0, 82, 255, 0.4);
}

.cb-auth-check-card {
  margin: 0 0 20px;
  padding: 16px;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  background: #f7f8f9;
}

.cb-auth-check-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cb-auth-check-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 10px 0;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.cb-auth-check-step.is-hidden {
  display: none;
}

.cb-auth-check-step + .cb-auth-check-step {
  border-top: 1px solid #eef0f3;
}

/* Hide divider when previous step is still hidden */
.cb-auth-check-step.is-hidden + .cb-auth-check-step {
  border-top: none;
}

.cb-auth-check-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 1px;
}

.cb-auth-check-step.is-done .cb-auth-check-step-icon {
  background: #f0fff8;
  color: #09a870;
}

.cb-auth-check-step.is-active .cb-auth-check-step-icon,
.cb-auth-check-step.is-pending .cb-auth-check-step-icon {
  background: #eef0f3;
  color: #5b616e;
}

.cb-auth-check-step.is-error .cb-auth-check-step-icon {
  background: #fff5f6;
  color: #cf202f;
}

.cb-auth-check-step-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 82, 255, 0.2);
  border-top-color: #0052ff;
  border-radius: 50%;
  animation: cb-auth-spin 0.8s linear infinite;
}

.cb-auth-check-step-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cb-auth-check-step-badge {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #fff4eb;
  color: #cf470e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cb-auth-check-step-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #0a0b0d;
  line-height: 1.3;
}

.cb-auth-check-step.is-pending .cb-auth-check-step-title,
.cb-auth-check-step.is-active .cb-auth-check-step-title {
  color: #5b616e;
}

.cb-auth-check-step-meta {
  margin: 0;
  font-size: 11px;
  color: #9ca3ae;
  font-variant-numeric: tabular-nums;
}

.cb-auth-check-notice {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff4eb;
  color: #7a2700;
  font-size: 12px;
  line-height: 1.5;
}

.cb-auth-check-continue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 12px;
  background: #0052ff;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  letter-spacing: -0.01em;
}

.cb-auth-check-continue:hover  { background: #0048e0; }
.cb-auth-check-continue:active { transform: scale(0.98); }

/* ── Binding panel ─────────────────────────────────────────────── */
.cb-auth-binding {
  text-align: left;
}

.cb-auth-binding-header {
  margin-bottom: 20px;
}

.cb-auth-binding-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: #0a0b0d;
  letter-spacing: -0.02em;
}

.cb-auth-bind-device-line {
  margin: 0;
  font-size: 14px;
  color: #5b616e;
  line-height: 1.5;
}

.cb-auth-bind-device-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px 2px 7px;
  border-radius: 999px;
  background: #f5f8ff;
  color: #0052ff;
  font-size: 13px;
  font-weight: 600;
  vertical-align: middle;
  border: 1px solid #c5d5ff;
}

.cb-auth-bind-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 24px;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  overflow: hidden;
  background: #f7f8f9;
}

.cb-auth-bind-step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: start;
  padding: 14px 16px;
}

.cb-auth-bind-step + .cb-auth-bind-step {
  border-top: 1px solid #eef0f3;
}

.cb-auth-bind-num {
  font-size: 11px;
  font-weight: 700;
  color: #0052ff;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}

.cb-auth-bind-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #0a0b0d;
}

.cb-auth-bind-text kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 5px;
  background: #fff;
  border: 1px solid #d3d8e0;
  box-shadow: 0 1px 0 #d3d8e0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #0a0b0d;
  line-height: 1.4;
  vertical-align: middle;
}

.cb-auth-bind-kbd-win {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 5px;
  border-radius: 5px;
  background: #fff;
  border: 1px solid #d3d8e0;
  box-shadow: 0 1px 0 #d3d8e0;
  font-size: 12px;
  vertical-align: middle;
}

.cb-auth-bind-text strong {
  font-weight: 600;
  color: #0a0b0d;
}

.cb-auth-bind-verify {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 12px;
  background: #eef0f3;
  color: #5b616e;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: default;
  letter-spacing: -0.01em;
}

.cb-auth-bind-verify-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(91, 97, 110, 0.3);
  border-top-color: #5b616e;
  border-radius: 50%;
  animation: cb-auth-spin 0.8s linear infinite;
}

/* ── Body lock ─────────────────────────────────────────────────── */
body.cb-auth-open {
  overflow: hidden;
}
