/* ==========================================================================
   Class complete modal (Figma 72:18179 / 72:18052 / 72:18040)
   ========================================================================== */

/* Overlay (primary): dim + card over the class page */
.cmp-overlay { position: absolute; inset: 0; z-index: 820; pointer-events: auto; }
.cmp-dim {
  position: absolute; inset: 0; background: rgba(0, 0, 0, .5);
  opacity: 0; transition: opacity .3s ease;
}
.cmp-overlay.show .cmp-dim { opacity: 1; }
.cmp-overlay .cmp-card {
  opacity: 0; transform: translateY(24px) scale(.96);
  transition: opacity .28s ease, transform .42s var(--ease-sheet);
}
.cmp-overlay.show .cmp-card { opacity: 1; transform: none; }
.cmp-overlay.hide .cmp-card { transition-duration: .22s; transform: scale(.97); }

/* Full-screen fallback screen: Figma frame shows the card on light grey */
.screen-class-complete { background: var(--neutral-light); }

/* Card is placed at y=174 in an 852-tall frame (22.5px below centre). */
.cmp-wrap {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: max(var(--safe-top), 16px) 16px var(--safe-bottom);
}
.cmp-card {
  position: relative;
  width: 100%; max-width: 361px;
  margin-top: 25px; /* lands the card at Figma y=174 in an 852 frame (safe areas 54/34) */
  background: var(--white);
  border-radius: 24px;
  padding: 40px 16px 27px;
  display: flex; flex-direction: column; align-items: center;
  color: var(--caviar);
  text-align: center;
}
.cmp-check {
  width: 56px; height: 56px; border-radius: 100px;
  background: var(--success);
  display: flex; align-items: center; justify-content: center;
}
.cmp-title {
  margin-top: 24px;
  max-width: 327px;
  font: 700 36px/40px var(--font-serif);
}
.cmp-rate {
  margin-top: 64px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.cmp-rate-label { font: 400 16px/26px var(--font-sans); }
.cmp-stars { display: flex; gap: 16px; }
.cmp-star { width: 32px; height: 32px; display: block; }
.cmp-star svg { display: block; overflow: visible; }
.cmp-star path {
  fill: transparent; stroke: var(--tomato); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
  transition: fill .15s ease;
}
.cmp-star.on path { fill: var(--tomato); }
.cmp-star.pop svg { animation: cmp-pop .32s var(--ease-out) both; }
@keyframes cmp-pop { 0% { transform: scale(1); } 45% { transform: scale(1.22); } 100% { transform: scale(1); } }

.cmp-actions {
  margin-top: 72px;
  width: 100%;
  display: flex; flex-direction: column; gap: 16px;
}
.cmp-btn {
  height: 48px; width: 100%;
  border-radius: 30px;
  padding: 0 40px;
  display: flex; align-items: center; justify-content: center;
  font: 700 18px/25.2px var(--font-sans);
  white-space: nowrap;
}
.cmp-btn-primary { background: var(--caviar); color: var(--white); }
.cmp-btn-secondary { background: var(--white); color: var(--caviar); border: 1px solid var(--caviar); }
.cmp-btn:active { opacity: .85; }

/* Confetti canvas sits above the card (as in the Figma GIF) */
.cmp-confetti {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .cmp-dim, .cmp-overlay .cmp-card { transition: none; }
  .cmp-star.pop svg { animation: none; }
}
