/* =============================================================================
   BRUXÃO MENU — Activity pop-ups (isolado: prefixo bm-activity-)
   Canto inferior esquerdo · glass + neon roxo · abaixo do carrinho (z-50)
============================================================================= */

.bm-activity-root {
  position: fixed;
  left: max(0.75rem, env(safe-area-inset-left, 0px));
  bottom: max(6.25rem, calc(0.75rem + env(safe-area-inset-bottom, 0px)));
  z-index: 45;
  pointer-events: none;
  max-width: min(22rem, calc(100vw - 1.5rem));
}

@media (min-width: 641px) {
  .bm-activity-root {
    left: max(1rem, env(safe-area-inset-left, 0px));
    bottom: max(5.75rem, calc(1rem + env(safe-area-inset-bottom, 0px)));
    max-width: min(24rem, calc(100vw - 2rem));
  }
}

.bm-activity-stack {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 0.55rem;
  pointer-events: none;
}

.bm-activity-toast {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  padding: 0.72rem 0.85rem 0.78rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(168, 85, 247, 0.34);
  background: linear-gradient(
    145deg,
    rgba(18, 10, 32, 0.72) 0%,
    rgba(8, 6, 14, 0.78) 55%,
    rgba(22, 12, 38, 0.74) 100%
  );
  backdrop-filter: blur(18px) saturate(1.45);
  -webkit-backdrop-filter: blur(18px) saturate(1.45);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 0 1px rgba(168, 85, 247, 0.12) inset,
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 22px rgba(139, 92, 246, 0.16),
    0 0 48px rgba(88, 28, 135, 0.08);
  color: rgba(248, 250, 252, 0.94);
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 0.8125rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translate3d(0, 14px, 0) scale(0.98);
  animation: bm-activity-enter 0.62s cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
  transition:
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.35s ease;
}

@media (min-width: 641px) {
  .bm-activity-toast {
    padding: 0.85rem 1rem 0.9rem;
    font-size: 0.875rem;
    border-radius: 1.05rem;
  }
}

.bm-activity-toast::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(168, 85, 247, 0.055) 42%,
    transparent 68%
  );
  animation: bm-activity-sheen 7s ease-in-out infinite;
}

.bm-activity-toast::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.42;
  box-shadow: 0 0 18px rgba(167, 139, 250, 0.22);
  animation: bm-activity-glow-pulse 3.6s ease-in-out infinite;
  z-index: -1;
}

.bm-activity-toast:hover {
  border-color: rgba(192, 132, 252, 0.52);
  transform: translate3d(0, 0, 0) scale(1.006);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 0 1px rgba(192, 132, 252, 0.2) inset,
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 28px rgba(167, 139, 250, 0.26),
    0 0 56px rgba(88, 28, 135, 0.14);
}

.bm-activity-toast--exit {
  animation: bm-activity-exit 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.bm-activity-toast--exit::before,
.bm-activity-toast--exit::after {
  animation: none;
  opacity: 0;
}

.bm-activity-kicker {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.22rem;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(216, 180, 254, 0.72);
}

@media (min-width: 641px) {
  .bm-activity-kicker {
    font-size: 0.6rem;
  }
}

.bm-activity-kicker-dot {
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 9999px;
  background: rgba(192, 132, 252, 0.88);
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.55);
  animation: bm-activity-dot-pulse 2.2s ease-in-out infinite;
}

.bm-activity-title {
  font-weight: 600;
  color: rgba(252, 252, 253, 0.94);
  margin: 0 0 0.15rem;
  text-shadow: 0 0 14px rgba(139, 92, 246, 0.18);
}

.bm-activity-body {
  margin: 0;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.92);
  font-size: 0.78em;
}

@media (min-width: 641px) {
  .bm-activity-body {
    font-size: 0.8em;
  }
}

.bm-activity-product {
  display: block;
  margin-top: 0.28rem;
  font-family: 'Kanit', system-ui, sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: 1.02em;
  letter-spacing: 0.01em;
  color: rgba(245, 240, 255, 0.96);
  text-shadow:
    0 0 12px rgba(167, 139, 250, 0.32),
    0 2px 10px rgba(0, 0, 0, 0.28);
}

@keyframes bm-activity-enter {
  0% {
    opacity: 0;
    transform: translate3d(0, 16px, 0) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes bm-activity-exit {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.96);
  }
}

@keyframes bm-activity-sheen {
  0%,
  100% {
    opacity: 0.22;
    transform: translateX(-8%);
  }
  50% {
    opacity: 0.4;
    transform: translateX(8%);
  }
}

@keyframes bm-activity-glow-pulse {
  0%,
  100% {
    opacity: 0.28;
    filter: blur(0);
  }
  50% {
    opacity: 0.52;
    filter: blur(0.5px);
  }
}

@keyframes bm-activity-dot-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.25);
    opacity: 0.75;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bm-activity-toast {
    animation-duration: 0.25s;
    transition: none;
  }

  .bm-activity-toast::before,
  .bm-activity-toast::after,
  .bm-activity-kicker-dot {
    animation: none !important;
  }

  .bm-activity-toast--exit {
    animation: bm-activity-exit-reduced 0.3s ease forwards;
  }

  @keyframes bm-activity-exit-reduced {
    to {
      opacity: 0;
    }
  }
}
