/* ══════════════════════════════════════════════════════
   G2 SUCCESS MODAL — shared "You're in the Groove!" popup
   Used by register-dance-class.html (registration) and
   fitness-dance-class.html (session pack / walk-in purchase).
   Markup: <div class="modal fade" id="successModal"> … see either page.
   Colours are scoped here so the popup looks the same on any page.
══════════════════════════════════════════════════════ */
#successModal {
  --g2-violet: #7c3aed;
  --g2-card: #ffffff;
  --g2-text: #1a1530;
  --g2-muted: #6b7280;
  --g2-gradient: linear-gradient(135deg, #ec4899 0%, #7c3aed 100%);
  --g2-shadow: 0 24px 60px -24px rgba(124, 58, 237, 0.35);
}
#successModal .modal-dialog {
  width: auto;
  max-width: 460px;
  margin: 30px auto;
}
@media (max-width: 500px) {
  #successModal .modal-dialog {
    margin: 16px;
  }
}
#successModal .modal-content {
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--g2-shadow);
  font-family: var(--font-body);
}
.sm-hero {
  position: relative;
  background: var(--g2-gradient);
  color: #fff;
  text-align: center;
  padding: 34px 24px 26px;
  overflow: hidden;
}
.sm-hero .close {
  position: absolute;
  top: 12px;
  right: 16px;
  color: #fff;
  opacity: 0.85;
  text-shadow: none;
  font-size: 28px;
}
.sm-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.sm-confetti span {
  position: absolute;
  top: -14px;
  font-size: 16px;
  animation: sm-fall 2.6s ease-in forwards;
  opacity: 0;
}
@keyframes sm-fall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(220px) rotate(300deg); opacity: 0; }
}
.sm-check {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #fff;
  color: var(--g2-violet);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.35);
  animation: sm-pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
@keyframes sm-pop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}
.sm-hero h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  margin: 0 0 6px;
  color: #fff;
}
.sm-hero p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  opacity: 0.95;
}
.sm-body {
  padding: 22px 22px 18px;
  background: var(--g2-card);
  color: var(--g2-text);
}
.sm-body h4 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 4px;
}
.sm-sub {
  text-align: center;
  color: var(--g2-muted);
  font-size: 13px;
  margin: 0 0 16px;
}
.sm-wa {
  display: block;
  border-radius: 16px;
  padding: 14px 16px;
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  color: #14532d;
  text-decoration: none;
  margin-bottom: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sm-wa:hover,
.sm-wa:focus {
  color: #14532d;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -12px rgba(22, 163, 74, 0.6);
}
.sm-wa-head {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 15px;
}
.sm-wa-head i {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.sm-wa-head small {
  display: block;
  font-weight: 600;
  font-size: 12px;
  color: #166534;
}
.sm-wa ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  font-size: 12.5px;
  line-height: 1.6;
}
.sm-socials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.sm-social {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.sm-social:hover,
.sm-social:focus {
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  filter: brightness(1.06);
}
.sm-social i,
.sm-social .fa-facebook-f {
  font-size: 22px;
  color: #fff;
}
.sm-social small {
  display: block;
  font-weight: 600;
  font-size: 11px;
  opacity: 0.9;
}
.sm-ig {
  background: linear-gradient(45deg, #f58529, #dd2a7b 50%, #8134af);
}
.sm-fb {
  background: #1877f2;
}
.sm-done {
  display: block;
  width: 100%;
  margin-top: 16px;
  background: none;
  border: 0;
  color: var(--g2-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
}
@media (max-width: 400px) {
  .sm-socials {
    grid-template-columns: 1fr;
  }
}

/* Same look on every page: some pages add global letter-spacing. */
#successModal .modal-content {
  letter-spacing: normal;
}
/* App card (js/g2-app-card.js) inside the popup: always stacked + centred. */
#successModal .g2ac {
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 0;
}
#successModal .g2ac-badges {
  justify-content: center;
}
/* Long @handles shouldn't push the social buttons past the edge. */
#successModal .sm-social {
  min-width: 0;
}
#successModal .sm-social > span {
  min-width: 0;
}
#successModal .sm-social small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
