/* ============ DRENTIR Site Guide — robot launcher ============ */
/* Standalone: defines the palette itself so it works on any theme. */
.bot-launcher {
  --fog-100: #f4f6f5;
  --fog-400: #b9c2c9;
  --fog-500: #9aa1a8;
  --ink-800: #1a1d23;
  --line-strong: rgba(255, 255, 255, 0.15);
}

/* ============ P1: DRENTIR Website Guide robot launcher ============ */
.bot-launcher {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.bot-launcher.is-chat-open {
  right: auto;
  left: 26px;
}
.bot-launcher.is-chat-open .bot-thought {
  right: auto;
  left: 64px;
  transform-origin: bottom left;
}
.bot-launcher.is-chat-open .bot-card {
  display: none;
}
.bot-avatar {
  position: relative;
  width: 96px;
  height: 122px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  animation: bot-idle-life 9s ease-in-out infinite;
  transition: transform 0.25s ease;
}
.bot-avatar:hover {
  transform: scale(1.07);
}
.bot-avatar .bot-glow {
  position: absolute;
  inset: -18%;
  background: radial-gradient(closest-side, rgba(62, 207, 142, 0.32), rgba(62, 207, 142, 0) 72%);
  pointer-events: none;
  animation: bot-glow-pulse 4.2s ease-in-out infinite;
}
@keyframes bot-glow-pulse {
  0%, 100% { opacity: 0.65; transform: scale(0.94); }
  50% { opacity: 1; transform: scale(1.06); }
}
.bot-avatar .bot-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 5px rgba(62, 207, 142, 0.9)) drop-shadow(0 0 18px rgba(62, 207, 142, 0.35));
  transition: opacity 0.38s ease, filter 0.25s ease;
}
.bot-avatar .bot-img.is-visible {
  opacity: 1;
}
.bot-avatar:hover .bot-img {
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 6px rgba(62, 207, 142, 1)) drop-shadow(0 0 32px rgba(62, 207, 142, 0.5));
}
/* The robot lives its own life: bobbing, swaying, little hops — even idle. */
@keyframes bot-idle-life {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  14% { translate: 3px -9px; rotate: 1.6deg; }
  28% { translate: 0 -4px; rotate: 0deg; }
  42% { translate: -3px -10px; rotate: -1.8deg; }
  56% { translate: 0 -3px; rotate: 0deg; }
  68% { translate: 2px -13px; rotate: 1deg; }
  80% { translate: -1px -6px; rotate: -0.6deg; }
  92% { translate: 0 -2px; rotate: 0deg; }
}
/* Thought cloud: appears while the bot is "thinking". */
.bot-thought {
  position: absolute;
  top: -6px;
  right: 64px;
  display: flex;
  gap: 5px;
  align-items: center;
  background: #f4f7f5;
  border-radius: 999px;
  padding: 8px 12px;
  opacity: 0;
  transform: scale(0.6) translateY(6px);
  transform-origin: bottom right;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.bot-thought::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 10px;
  height: 10px;
  background: #f4f7f5;
  border-radius: 50%;
}
.bot-thought.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.bot-thought span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ecf8e;
  animation: bot-think 1.1s ease-in-out infinite;
}
.bot-thought span:nth-child(2) { animation-delay: 0.18s; }
.bot-thought span:nth-child(3) { animation-delay: 0.36s; }
@keyframes bot-think {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-4px); opacity: 1; }
}
/* Teaser card above the robot. */
.bot-card {
  position: absolute;
  right: 0;
  bottom: 100px;
  width: 15rem;
  background: var(--ink-800);
  border: 1px solid var(--line-strong);
  border-radius: 1rem;
  padding: 0.85rem 2rem 0.85rem 1rem;
  box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.bot-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.bot-card strong {
  display: block;
  font-size: 0.92rem;
  color: var(--fog-100);
}
.bot-card span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: var(--fog-400);
  line-height: 1.5;
}
.bot-card .chat-hint-notice { margin-top: 0.45rem; }
.bot-card-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: 0;
  color: var(--fog-500);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 0;
}
/* The robot replaces the AI Engine default trigger icon. */
.mwai-trigger { display: none !important; }
body.aios-bot-ready .mwai-trigger { display: none !important; }
@media (max-width: 640px) {
  .bot-launcher { right: 16px; bottom: 16px; }
  .bot-avatar { width: 74px; height: 94px; }
  .bot-card { width: 13rem; bottom: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .bot-avatar { animation: none; }
  .bot-avatar .bot-glow { animation: none; }
  .bot-thought span { animation: none; }
}
