/* ═══════════════════════════════════════════════════════════════
   FUN MINI POPUPS - Small encouraging messages
   ═══════════════════════════════════════════════════════════════ */

.mini-popup {
  position: fixed;
  bottom: 100px;
  right: 30px;
  background: linear-gradient(135deg, var(--card), var(--surface));
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 16px 20px;
  max-width: 280px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(255, 46, 63, 0.2);
  z-index: 9000;
  opacity: 0;
  transform: translateX(400px);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mini-popup.show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.mini-popup.hide {
  opacity: 0;
  transform: translateX(400px);
}

.mini-popup-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.mini-popup-emoji {
  font-size: 32px;
  flex-shrink: 0;
  animation: miniPopupBounce 0.6s ease;
}

@keyframes miniPopupBounce {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.2) rotate(-10deg); }
  50% { transform: scale(0.9) rotate(10deg); }
  75% { transform: scale(1.1) rotate(-5deg); }
}

.mini-popup-text {
  flex: 1;
}

.mini-popup-message {
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  font-weight: 400;
}

.mini-popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  opacity: 0.6;
}

.mini-popup-close:hover {
  background: rgba(255, 46, 63, 0.2);
  color: var(--accent);
  opacity: 1;
  transform: rotate(90deg);
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .mini-popup {
    bottom: 90px;
    right: 20px;
    left: 20px;
    max-width: none;
  }

  .mini-popup-emoji {
    font-size: 28px;
  }

  .mini-popup-message {
    font-size: 12px;
  }
}

/* Animation for progress indicator */
.mini-popup-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  width: 100%;
  transform-origin: left;
  animation: progressShrink 5s linear forwards;
  border-radius: 0 0 14px 14px;
}

@keyframes progressShrink {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* Low power mode */
.low-power .mini-popup {
  animation: none !important;
}

.low-power .mini-popup-emoji {
  animation: none !important;
}

.low-power .mini-popup-progress {
  display: none;
}
