/* ══════════════════════════════════════════════════════
   DEAR MUSÉ — ARTISTIC EFFECTS CSS
   Falling Tuyet Mai (White Flowers) Animation
══════════════════════════════════════════════════════ */

#artistic-effects-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.dm-tuyet-mai {
  position: absolute;
  top: -50px;
  fill: #ffffff;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
  opacity: 0;
  animation: fallDown var(--duration, 15s) linear infinite;
  animation-delay: var(--delay, 0s);
  transform-origin: center;
}

@keyframes fallDown {
  0% {
    opacity: 0;
    transform: translateY(-50px) translateX(0) scale(var(--scale, 1)) rotate(0deg);
  }
  10% {
    opacity: var(--max-opacity, 0.9);
  }
  90% {
    opacity: var(--max-opacity, 0.9);
  }
  100% {
    opacity: 0;
    transform: translateY(110vh) translateX(var(--drift, 50px)) scale(var(--scale, 1)) rotate(var(--rot, 360deg));
  }
}

/* ──────────────────────────────────────────────────────
   MASCOT ON TRIPLE CLOUD WIDGET (Avocado, Pink, Cream)
   ────────────────────────────────────────────────────── */

.mascot-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 220px; /* Increased from 140px to make mascot larger */
  height: 220px; /* Increased from 180px */
  z-index: 997;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  pointer-events: auto;
  user-select: none;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mascot-widget:hover {
  transform: scale(1.08) translateY(-4px);
}

/* Clouds container */
.mascot-clouds-container {
  position: relative;
  width: 100%;
  height: 124px; /* Increased to accommodate larger mascot */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mascot Image Nesting */
.mascot-image-wrap {
  position: absolute;
  bottom: 0;
  z-index: 3;
  width: 220px; /* Increased to make mascot sit large and clear */
  height: auto;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  animation: mascot-idle 5s ease-in-out infinite;
  transform-origin: bottom center;
}

.mascot-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 1; /* always visible, drawn dynamic or placeholder */
  transition: transform 0.3s var(--ease-silk, ease), opacity 0.5s ease, filter 0.3s ease;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15)) drop-shadow(0 0 10px rgba(212, 219, 116, 0.25));
}

/* Cheerful swaying when hovered (waving body + greeting) */
.mascot-widget:hover .mascot-image-wrap {
  animation: mascot-wave-hover 1.2s ease-in-out infinite alternate;
}

.mascot-widget:hover .mascot-img {
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25)) drop-shadow(0 0 18px rgba(247, 200, 211, 0.5));
}

/* Speech Bubble */
.mascot-bubble {
  position: absolute;
  top: -20px;
  background: var(--vanilla, #FFF7E6);
  border: 1px solid var(--bone, #EDE8DF);
  padding: 8px 16px;
  border-radius: 20px;
  font-family: var(--font-body), sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink, #1A1916);
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(26, 25, 22, 0.08);
  opacity: 0;
  transform: scale(0.8) translateY(12px);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 5;
}

.mascot-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: var(--vanilla, #FFF7E6);
  border-right: 1px solid var(--bone, #EDE8DF);
  border-bottom: 1px solid var(--bone, #EDE8DF);
}

.mascot-widget.active-bubble:not(:hover) .mascot-bubble {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Sparkles / Heart / Music note particles */
.mascot-sparkle {
  position: absolute;
  pointer-events: none;
  z-index: 120; /* Float above everything including chatbot/menus */
  opacity: 0;
  font-size: 23px; /* Larger sparkles */
  animation: sparkle-float var(--duration, 2s) ease-out forwards;
}

/* Mascot Animations */

@keyframes mascot-idle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-2deg); }
}

@keyframes mascot-wave-hover {
  0% { transform: translateY(-8px) rotate(-4deg) scale(1.02); }
  100% { transform: translateY(-14px) rotate(5deg) scale(1.05); }
}

@keyframes sparkle-float {
  0% {
    transform: translate(0, 0) scale(0.4);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx, 40px), var(--ty, -80px)) scale(1.3) rotate(var(--tr, 45deg));
    opacity: 0;
  }
}

/* Responsive adjustments for mobile viewports */
@media (max-width: 768px) {
  .mascot-widget {
    bottom: 16px;
    right: 16px;
    width: 120px;
    height: 120px;
  }
  .mascot-image-wrap {
    width: 120px;
  }
  .mascot-clouds-container {
    height: 68px;
  }
  .mascot-bubble {
    top: -15px;
    padding: 6px 12px;
    font-size: 13px;
  }
  .mascot-menu {
    bottom: 80px;
    right: 10px;
    min-width: 140px;
    gap: 6px;
  }
  .mascot-menu-item {
    padding: 8px 16px;
    font-size: 14px;
  }
  .chatbot-window {
    width: calc(100vw - 32px) !important;
    height: 500px;
    max-height: calc(100vh - 120px);
    bottom: 16px;
    right: -100%;
    left: auto;
  }
  .chatbot-window.open {
    right: auto !important;
    left: 16px !important;
    width: calc(100vw - 32px) !important;
    z-index: 1001;
  }
  .chatbot-window.zoomed {
    width: 100vw !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100dvh !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    border-radius: 0 !important;
    z-index: 9999 !important;
  }
}

/* ======================================================
   MASCOT DROPDOWN MENU
   ====================================================== */
.mascot-menu {
  position: absolute;
  bottom: 140px; /* sit nicely above the cloud */
  right: 20px; /* Align to the right side of cloud container */
  width: auto;
  min-width: 180px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 10;
  transform: translateY(10px);
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* Align items to the right side */
  gap: 8px;
}

.mascot-widget:hover .mascot-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mascot-menu-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* Align items to the right side */
  gap: 8px;
  width: 100%;
}
.mascot-menu-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  padding: 12px 24px;
  font-family: var(--font-body), sans-serif;
  font-size: 16px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.5px;
  color: var(--ink, #1A1916) !important;
  text-decoration: none !important;
  background: #FFF7E6 !important; /* Light cream capsule - forced for all items */
  border: 1px solid var(--bone, #EDE8DF) !important;
  border-radius: 50px;
  box-shadow: 0 6px 16px rgba(26, 25, 22, 0.08);
  box-sizing: border-box;
  cursor: pointer;
  transition: background 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1;
  white-space: nowrap;
}

/* Reset link states for mascot items - prevent :visited/:active browser defaults */
a.mascot-menu-item:link,
a.mascot-menu-item:visited,
a.mascot-menu-item:active {
  color: var(--ink, #1A1916) !important;
  background: #FFF7E6 !important;
  border-color: var(--bone, #EDE8DF) !important;
}

.mascot-menu-item:hover,
a.mascot-menu-item:hover {
  background: var(--avocado-cream, #D4DB74) !important;
  color: var(--ink, #1A1916) !important;
  border-color: var(--avocado-cream, #D4DB74) !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(212, 219, 116, 0.35);
}



/* ======================================================
   PREMIUM CHATBOT WINDOW (Avocado & Cream themed)
   ====================================================== */
.chatbot-window {
  position: fixed;
  bottom: 24px;
  right: -400px; /* Hidden offscreen initially */
  width: 360px;
  height: 500px;
  background: rgba(255, 247, 230, 0.95);
  border: 1px solid var(--bone, #EDE8DF);
  border-radius: 24px;
  box-shadow: 0 16px 48px rgba(26, 25, 22, 0.15);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, width 0.4s cubic-bezier(0.16, 1, 0.3, 1), height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  pointer-events: none;
}

.chatbot-window.open {
  right: 260px; /* Sits next to mascot */
  opacity: 1;
  pointer-events: auto;
}

.chatbot-window.zoomed {
  width: 520px !important;
  height: 680px !important;
  max-width: 90vw !important;
  max-height: 90vh !important;
}

.chatbot-zoom-btn svg {
  pointer-events: none;
}

/* Chatbot Header */
.chatbot-header {
  background: var(--ink, #1A1916);
  color: var(--vanilla-cream, #FFF7E6);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 247, 230, 0.1);
}

.chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chatbot-avatar-status {
  width: 10px;
  height: 10px;
  background: #10b981; /* active green */
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 8px #10b981;
}

.chatbot-header-info h4 {
  font-family: var(--font-display), serif;
  font-size: 20px;
  font-style: italic;
  font-weight: 500;
  margin: 0;
}

.chatbot-header-info span {
  font-family: var(--font-body), sans-serif;
  font-size: 14px;
  opacity: 0.6;
}

.chatbot-zoom-btn,
.chatbot-close-btn {
  background: none;
  border: none;
  color: var(--vanilla-cream, #FFF7E6);
  font-size: 23px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-zoom-btn:hover,
.chatbot-close-btn:hover {
  opacity: 1;
}

.chatbot-window.zoomed .zoom-in-icon {
  display: none !important;
}

.chatbot-window.zoomed .zoom-out-icon {
  display: block !important;
}

/* Messages area */
.chatbot-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

/* Message bubbles */
.chatbot-msg {
  display: flex;
  max-width: 85%;
}

.chatbot-msg.bot {
  align-self: flex-start;
}

.chatbot-msg.user {
  align-self: flex-end;
}

.chatbot-bubble-text {
  padding: 10px 14px;
  font-family: var(--font-body), sans-serif;
  font-size: 16px;
  line-height: 1.5;
  border-radius: 16px;
  word-break: break-word;
}

.chatbot-msg.bot .chatbot-bubble-text {
  background: var(--parchment, #F5EFE4);
  color: var(--ink, #1A1916);
  border-top-left-radius: 4px;
}

.chatbot-msg.user .chatbot-bubble-text {
  background: var(--avocado-cream, #D4DB74);
  color: var(--ink, #1A1916);
  border-top-right-radius: 4px;
}

.chatbot-msg a {
  color: var(--logo-mocha, #9C8474);
  text-decoration: underline;
  font-weight: 600;
}

/* Suggestions replies */
.chatbot-suggestions {
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-top: 1px solid rgba(26, 25, 22, 0.05);
}

.chatbot-suggest-btn {
  background: var(--vanilla, #FFF7E6);
  border: 1px solid var(--bone, #EDE8DF);
  border-radius: 14px;
  padding: 6px 12px;
  font-family: var(--font-body), sans-serif;
  font-size: 14px;
  color: var(--ink, #1A1916);
  cursor: pointer;
  transition: all 0.2s ease;
}

.chatbot-suggest-btn:hover {
  background: var(--avocado-cream, #D4DB74);
  border-color: var(--avocado-cream, #D4DB74);
}

/* Form input area */
.chatbot-input-area {
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  background: #FFF;
  border-top: 1px solid var(--bone, #EDE8DF);
}

.chatbot-input-area input {
  flex: 1;
  border: 1px solid var(--bone, #EDE8DF);
  border-radius: 20px;
  padding: 8px 16px;
  font-family: var(--font-body), sans-serif;
  font-size: 16px;
  outline: none;
  background: var(--parchment, #F5EFE4);
  transition: border-color 0.2s;
}

.chatbot-input-area input:focus {
  border-color: var(--logo-taupe, #9C8474);
  background: #FFF;
}

.chatbot-send-btn {
  background: var(--ink, #1A1916);
  color: var(--vanilla-cream, #FFF7E6);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
}

.chatbot-send-btn:hover {
  background: var(--logo-mocha, #9C8474);
  transform: scale(1.05);
}

