/* phone_pair.css — CTA banner + pairing modal
 * Step A 2026-05-11: restyled to match the welcome-page cyberpunk theme
 *   (green #4eff7f ink + blue rgba(62,168,255,*) glow, monospace type).
 * Older yellow-green palette retired in favor of the welcome.css tokens.
 */

/* ============================================================
 * CTA banner — kept on the page as a way back in if the user
 * dismisses the auto-opened modal.
 * ============================================================ */
.pair-cta {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 16px 0;
  padding: 12px 18px;
  background: linear-gradient(180deg, rgba(20, 30, 42, 0.92) 0%, rgba(4, 10, 18, 0.92) 100%);
  border: 1px solid rgba(62, 168, 255, 0.45);
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(120, 180, 220, 0.20),
    inset 0 -2px 0 rgba(0, 0, 0, 0.4),
    0 3px 0 rgba(0, 0, 0, 0.55),
    0 5px 12px rgba(0, 0, 0, 0.5),
    0 0 14px rgba(62, 168, 255, 0.22);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
  user-select: none;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.pair-cta:hover {
  transform: translateY(-1px);
  border-color: rgba(62, 168, 255, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(120, 180, 220, 0.30),
    0 4px 0 rgba(0, 0, 0, 0.6),
    0 7px 16px rgba(0, 0, 0, 0.55),
    0 0 26px rgba(62, 168, 255, 0.45);
}
.pair-cta-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(220, 235, 245, 0.90);
}
.pair-cta-text b {
  color: #4eff7f;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-shadow: 0 0 6px rgba(62, 168, 255, 0.55), 0 0 14px rgba(62, 168, 255, 0.30);
}
.pair-cta-arrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #4eff7f;
  text-transform: uppercase;
  flex-shrink: 0;
  text-shadow: 0 0 6px rgba(62, 168, 255, 0.55);
}

/* ============================================================
 * Modal overlay
 * ============================================================ */
.pair-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}
.pair-modal.show { display: flex; animation: pair-modal-fade 0.35s ease both; }

@keyframes pair-modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.pair-modal-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: rgba(6, 10, 16, 0.97);
  border: 1px solid rgba(62, 168, 255, 0.45);
  border-radius: 10px;
  padding: 26px 24px 22px;
  box-shadow:
    0 0 24px rgba(62, 168, 255, 0.25),
    0 0 60px rgba(62, 168, 255, 0.12),
    0 20px 60px rgba(0, 0, 0, 0.65);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  animation: pair-card-in 0.45s cubic-bezier(.2,.7,.3,1.2) both;
}
@keyframes pair-card-in {
  from { transform: translateY(8px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0)   scale(1);    opacity: 1; }
}

/* Close button */
.pair-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(220, 235, 245, 0.55);
  font-size: 20px;
  font-weight: 400;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.1s, background 0.1s, text-shadow 0.1s;
}
.pair-close:hover {
  color: #4eff7f;
  background: rgba(62, 168, 255, 0.10);
  text-shadow: 0 0 8px rgba(62, 168, 255, 0.55);
}

/* Eyebrow — small uppercase tag above title (matches welcome .legal-flag) */
.pair-modal-eyebrow {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: #4eff7f;
  background: rgba(78, 255, 127, 0.10);
  border: 1px solid rgba(78, 255, 127, 0.45);
  padding: 4px 10px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-bottom: 14px;
  text-shadow: 0 0 6px rgba(62, 168, 255, 0.55), 0 0 14px rgba(62, 168, 255, 0.30);
}

/* Title — typewritten, with a blinking caret tacked on via ::after */
.pair-modal-title {
  position: relative;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #4eff7f;
  margin: 0 0 8px;
  min-height: 1.4em;            /* prevents reflow during type-in */
  text-shadow: 0 0 8px rgba(62, 168, 255, 0.65), 0 0 18px rgba(62, 168, 255, 0.38);
}
.pair-modal-title::after {
  content: '_';
  display: inline-block;
  margin-left: 2px;
  color: #4eff7f;
  animation: pair-caret 1s steps(1, end) infinite;
  text-shadow: 0 0 8px rgba(62, 168, 255, 0.65);
}
@keyframes pair-caret {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.pair-modal-sub {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: rgba(220, 235, 245, 0.78);
  margin: 0 0 18px;
  line-height: 1.55;
}

/* QR container — white tile so dark-theme phones can scan reliably,
   thin blue glow ring around it to fit the cyberpunk frame */
.pair-qr {
  width: 280px;
  height: 280px;
  margin: 0 auto 14px;
  background: #ffffff;
  border-radius: 6px;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1px rgba(62, 168, 255, 0.45),
    0 0 18px rgba(62, 168, 255, 0.30),
    0 0 40px rgba(62, 168, 255, 0.15);
}
.pair-qr svg { display: block; width: 100%; height: 100%; }

/* URL row — click to copy */
.pair-url-text {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(220, 235, 245, 0.92);
  background: rgba(4, 10, 18, 0.85);
  border: 1px solid rgba(62, 168, 255, 0.28);
  border-radius: 4px;
  padding: 9px 10px;
  margin: 0 0 14px;
  cursor: pointer;
  word-break: break-all;
  text-align: center;
  transition: border-color 0.12s, background 0.12s, color 0.12s, box-shadow 0.12s;
}
.pair-url-text:hover {
  border-color: rgba(62, 168, 255, 0.55);
  box-shadow: 0 0 12px rgba(62, 168, 255, 0.25);
}
.pair-url-text.copied {
  border-color: #4eff7f;
  background: rgba(78, 255, 127, 0.08);
  color: #4eff7f;
  box-shadow: 0 0 16px rgba(78, 255, 127, 0.45);
}

/* Status pill */
.pair-status-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(4, 10, 18, 0.85);
  border: 1px solid rgba(62, 168, 255, 0.28);
  border-radius: 999px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(220, 235, 245, 0.70);
}
.pair-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(62, 168, 255, 0.60);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(62, 168, 255, 0.55);
  animation: pair-pulse 1.4s ease-in-out infinite;
}
.pair-status-pill[data-state="seen"] {
  color: #ff9500;
  border-color: rgba(255, 149, 0, 0.55);
}
.pair-status-pill[data-state="seen"] .pair-status-dot {
  background: #ff9500;
  box-shadow: 0 0 8px rgba(255, 149, 0, 0.75);
}
.pair-status-pill[data-state="paired"] {
  color: #4eff7f;
  border-color: #4eff7f;
}
.pair-status-pill[data-state="paired"] .pair-status-dot {
  background: #4eff7f;
  box-shadow: 0 0 10px rgba(78, 255, 127, 0.85);
  animation: none;
}

@keyframes pair-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

@media (max-width: 480px) {
  .pair-modal-card { padding: 22px 18px 18px; max-width: 320px; }
  .pair-qr { width: 240px; height: 240px; }
}

/* =====================================================
   Toast — "VIN received from phone" notification.
   Added Step B 2026-05-11. Fades in top-center, auto-dismisses.
   ===================================================== */
#pair-toast-host {
  position: fixed;
  top: 28px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
}
.pair-toast {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: #4eff7f;
  background: rgba(6, 10, 16, 0.96);
  border: 1px solid #4eff7f;
  border-radius: 8px;
  padding: 12px 18px;
  text-shadow: 0 0 6px rgba(78, 255, 127, 0.4);
  box-shadow:
    0 0 0 1px rgba(78, 255, 127, 0.20),
    0 0 22px rgba(78, 255, 127, 0.35),
    0 12px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
}
.pair-toast.show {
  opacity: 1;
  transform: translateY(0);
}
