/* StreamLumi — Interactive / Lovense goal automation celebration layer (Tier-2 #4). */

#slGoalAutoLayer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 28;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  padding: 0 12px;
  overflow: hidden;
}

/* Fallback only if the layer is ever attached to body (should not be). */
body > #slGoalAutoLayer {
  position: fixed;
  bottom: 96px;
  z-index: 40;
}

.sl-goal-auto-burst {
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(92%, 360px);
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed, #db2777);
  color: #fff;
  font: 700 13px/1.25 system-ui, "Segoe UI", Arial, sans-serif;
  box-shadow: 0 12px 34px rgba(124, 58, 237, 0.42), 0 2px 8px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(14px) scale(0.94);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  will-change: opacity, transform;
}

.sl-goal-auto-burst.is-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.sl-goal-auto-burst.is-out {
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
}

.sl-goal-auto-burst--goal {
  background: linear-gradient(135deg, #f59e0b, #ef4444 55%, #db2777);
  box-shadow: 0 16px 44px rgba(245, 158, 11, 0.5), 0 2px 10px rgba(0, 0, 0, 0.4);
  font-size: 15px;
  padding: 12px 20px;
}

.sl-goal-auto-emoji {
  font-size: 20px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.sl-goal-auto-burst--goal .sl-goal-auto-emoji {
  font-size: 24px;
  animation: sl-goal-auto-pop 0.6s ease;
}

.sl-goal-auto-text {
  display: inline-flex;
  flex-direction: column;
  min-width: 0;
}

.sl-goal-auto-text strong {
  letter-spacing: 0.02em;
}

.sl-goal-auto-text span {
  font-weight: 600;
  font-size: 11px;
  opacity: 0.9;
}

@keyframes sl-goal-auto-pop {
  0% { transform: scale(0.6); }
  55% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

@media (max-width: 860px) {
  #slGoalAutoLayer {
    bottom: 8px;
  }
  .sl-goal-auto-burst {
    max-width: min(88%, 300px);
    font-size: 12px;
    padding: 8px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sl-goal-auto-burst {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .sl-goal-auto-burst--goal .sl-goal-auto-emoji {
    animation: none;
  }
}
