/* Shared vCard submit → success handoff (vc.php + create_vcard.php) */

.ab-vc-handoff {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.ab-vc-handoff[hidden] {
  display: none !important;
}

.ab-vc-handoff.is-visible {
  opacity: 1;
  visibility: visible;
}

.ab-vc-handoff__card {
  text-align: center;
  max-width: 18rem;
}

.ab-vc-handoff__badge {
  position: relative;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.15rem;
}

.ab-vc-handoff__pulse {
  position: absolute;
  inset: 0;
  border-radius: 1.25rem;
  background: rgba(0, 102, 204, 0.14);
  animation: ab-vc-handoff-pulse 1.4s ease-out infinite;
}

.ab-vc-handoff.is-success .ab-vc-handoff__pulse {
  background: rgba(5, 150, 105, 0.16);
  animation: ab-vc-handoff-pulse-success 0.7s ease-out 1;
}

@keyframes ab-vc-handoff-pulse {
  0% { transform: scale(0.85); opacity: 0.75; }
  100% { transform: scale(1.45); opacity: 0; }
}

@keyframes ab-vc-handoff-pulse-success {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.ab-vc-handoff__icon-wrap {
  position: relative;
  z-index: 1;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 1.25rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #0066ff, #4f46e5);
  box-shadow: 0 14px 36px rgba(0, 102, 255, 0.28);
  transition: background 0.35s ease, box-shadow 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.ab-vc-handoff__icon {
  font-size: 1.65rem;
  line-height: 1;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.ab-vc-handoff__icon--done {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.5);
}

.ab-vc-handoff.is-success .ab-vc-handoff__icon-wrap {
  background: linear-gradient(145deg, #34d399, #059669);
  box-shadow: 0 14px 36px rgba(5, 150, 105, 0.32);
  transform: scale(1.05);
}

.ab-vc-handoff.is-success .ab-vc-handoff__icon--build {
  opacity: 0;
  transform: scale(0.6);
}

.ab-vc-handoff.is-success .ab-vc-handoff__icon--done {
  opacity: 1;
  transform: scale(1);
}

.ab-vc-handoff__title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.ab-vc-handoff__sub {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
}

/* Success page: curtain covers content during handoff; avoid opacity:0 traps if JS stalls */
html.ab-vc-handoff-ready body.ab-vcard-success .ab-vc-success__wrap,
html.ab-vc-handoff-ready body.ab-vcard-success .ab-vc-success__email-banner,
html.ab-vc-handoff-ready body.ab-vcard-success .ab-vc-success__sticky {
  animation: ab-vc-handoff-content-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes ab-vc-handoff-content-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .ab-vc-handoff,
  .ab-vc-handoff__pulse,
  .ab-vc-handoff__icon-wrap,
  .ab-vc-handoff__icon--done,
  html.ab-vc-handoff-ready body.ab-vcard-success .ab-vc-success__wrap {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
