/* =========================================
   9. FLOATING CHAT WIDGET
   ========================================= */
.chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 260px;
  height: 140px;
  z-index: 50;
}
.chat-btn {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: #d99c2e;
  border: 2px solid #eab655;
  box-shadow: 0 4px 15px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 3;
  animation: chatButtonGlow 2.4s ease-in-out infinite alternate;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.chat-btn:hover,
.chat-btn:focus-visible {
  animation: none;
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 24px rgba(234, 182, 85, 0.78);
}
.chat-btn svg {
  width: 28px;
  height: 28px;
}
.bubble {
  position: absolute;
  right: 70px; /* positioned to the left of the chat button */
  bottom: 8px; /* centered vertically with chat button */
  background: #191512;
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 12px 18px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  z-index: 2;
  animation: chatBubbleFloat 3s ease-in-out infinite, chatBubbleGlow 2.2s ease-in-out infinite alternate;
  transform-origin: 100% 50%;
}
.bubble::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: 12px;
  transform: rotate(-45deg);
  width: 12px;
  height: 12px;
  background: #191512;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

@keyframes chatButtonGlow {
  from {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), 0 0 7px rgba(217, 156, 46, 0.32);
  }
  to {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.68), 0 0 20px rgba(234, 182, 85, 0.72);
  }
}

@keyframes chatBubbleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes chatBubbleGlow {
  from { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 4px rgba(217, 156, 46, 0.18); }
  to { box-shadow: 0 7px 18px rgba(0, 0, 0, 0.58), 0 0 14px rgba(217, 156, 46, 0.48); }
}
.chat img {
  position: absolute;
  right: 22px; /* move closer to button so hand overlaps */
  bottom: -5px;
  width: 120px; /* slightly larger to match proportions */
  height: auto;
  object-fit: contain;
  object-position: bottom center;
  border-radius: 0;
  filter:
    drop-shadow(0 12px 16px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 10px rgba(217, 156, 46, 0.55));
  animation: mascot-float 3.4s ease-in-out infinite,
    mascot-glow 2.4s ease-in-out infinite alternate;
  transform-origin: 50% 90%;
  will-change: transform, filter;
  z-index: 4; /* Higher z-index than chat button */
}

/* Alpha-aware mascot motion and brand glow */
.hero-mascot-container::before {
  content: "";
  position: absolute;
  inset: 12% 8% 5%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(234, 182, 85, 0.3) 0%,
    rgba(217, 156, 46, 0.12) 45%,
    transparent 72%
  );
  filter: blur(18px);
  animation: mascot-aura 2.8s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero-mascot-img,
.hero-visual > img {
  position: relative;
  z-index: 1;
  animation: mascot-float 4s ease-in-out infinite,
    mascot-glow 2.8s ease-in-out infinite alternate;
  transform-origin: 50% 90%;
  will-change: transform, filter;
  transition: scale 280ms ease;
}

.hero-mascot-container:hover .hero-mascot-img,
.hero-visual:hover > img {
  scale: 1.035;
}

@keyframes mascot-float {
  0%,
  100% {
    transform: translateY(0) rotate(-0.35deg);
  }
  50% {
    transform: translateY(-10px) rotate(0.35deg);
  }
}

@keyframes mascot-glow {
  from {
    filter:
      drop-shadow(0 18px 22px rgba(0, 0, 0, 0.65))
      drop-shadow(0 0 8px rgba(217, 156, 46, 0.35));
  }
  to {
    filter:
      drop-shadow(0 22px 28px rgba(0, 0, 0, 0.75))
      drop-shadow(0 0 22px rgba(234, 182, 85, 0.82));
  }
}

@keyframes mascot-aura {
  from {
    opacity: 0.5;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-mascot-img,
  .hero-visual > img,
  .chat img {
    animation: none;
    will-change: auto;
  }

  .chat-btn,
  .bubble {
    animation: none;
  }

  .hero-mascot-container::before {
    animation: none;
  }
}

@media (max-width: 768px) {
  .hero-mascot-img,
  .hero-visual > img {
    animation-duration: 5s, 3.5s;
  }
  @keyframes mascot-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
  }
}
/* =========================================
   10. TOAST NOTIFICATIONS
   ========================================= */
.toast {
  position: fixed;
  top: 92px;
  left: 50%;
  transform: translateX(-50%) translateY(-130px);
  opacity: 0;
  background: #1c1810;
  border: 1px solid var(--gold);
  border-radius: 10px;
  color: #f3d18f;
  padding: 13px 20px;
  transition: 0.3s;
  z-index: 8;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
