/**
 * Celebration CSS
 * academy/components/celebration.css
 * Sprint: S-64 · Status: APPROVED · FROZEN
 * Version: 1.0.0-s64
 *
 * Overlay styles for CelebrationEngine.
 * Self-contained — no external stylesheet dependency.
 * Uses CSS custom properties for design-system alignment.
 * z-index: 9000 — above all content layers.
 */

/* ------------------------------------------------------------------ */
/* Design tokens (inline for component isolation)                       */
/* If TGS global tokens are available, these are superseded by :root.  */
/* ------------------------------------------------------------------ */
.tgs-celebration-overlay,
.tgs-celebration-overlay * {
  box-sizing: border-box;
}

/* ------------------------------------------------------------------ */
/* Overlay backdrop                                                     */
/* ------------------------------------------------------------------ */
.tgs-celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  animation: tgs-cel-backdrop-in 0.25s ease-out both;
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}

@keyframes tgs-cel-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ------------------------------------------------------------------ */
/* Inner card                                                           */
/* ------------------------------------------------------------------ */
.tgs-celebration-inner {
  background: #1F2937;
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 360px;
  width: 90%;
  animation: tgs-cel-card-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

@keyframes tgs-cel-card-in {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ------------------------------------------------------------------ */
/* Icon                                                                 */
/* ------------------------------------------------------------------ */
.tgs-celebration-icon {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 1rem;
  animation: tgs-cel-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
  display: block;
}

@keyframes tgs-cel-bounce {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* Type-specific icon accents */
.tgs-celebration--streak .tgs-celebration-icon {
  animation-delay: 0.15s;
  filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.6));
}

.tgs-celebration--ks .tgs-celebration-icon {
  filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.6));
}

.tgs-celebration--lesson .tgs-celebration-icon {
  filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.5));
}

/* ------------------------------------------------------------------ */
/* Message text                                                         */
/* ------------------------------------------------------------------ */
.tgs-celebration-message {
  color: #F9FAFB;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 1.5rem;
  animation: tgs-cel-fade-up 0.35s ease-out 0.3s both;
}

@keyframes tgs-cel-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------ */
/* Dismiss button                                                       */
/* ------------------------------------------------------------------ */
.tgs-celebration-dismiss {
  background: #F59E0B;
  color: #0A0A0A;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 2rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  animation: tgs-cel-fade-up 0.35s ease-out 0.45s both;
  min-width: 120px;
}

.tgs-celebration-dismiss:hover {
  background: #D97706;
}

.tgs-celebration-dismiss:active {
  transform: scale(0.97);
}

.tgs-celebration-dismiss:focus-visible {
  outline: 2px solid #F59E0B;
  outline-offset: 3px;
}

/* ------------------------------------------------------------------ */
/* Type-specific border accents                                         */
/* ------------------------------------------------------------------ */
.tgs-celebration--streak .tgs-celebration-inner {
  border-color: rgba(245, 158, 11, 0.4);
}

.tgs-celebration--ks .tgs-celebration-inner {
  border-color: rgba(16, 185, 129, 0.4);
}

.tgs-celebration--ks .tgs-celebration-dismiss {
  background: #10B981;
  color: #F9FAFB;
}

.tgs-celebration--ks .tgs-celebration-dismiss:hover {
  background: #059669;
}

/* ------------------------------------------------------------------ */
/* Reduced motion                                                       */
/* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .tgs-celebration-overlay,
  .tgs-celebration-inner,
  .tgs-celebration-icon,
  .tgs-celebration-message,
  .tgs-celebration-dismiss {
    animation: none;
  }
}
