/* Mojosoft Chat — front-end chrome (bubble + widget wrap). The widget
   itself renders its own styles into .cb-root via @mojosoft/chatbot-dom's
   injectStyles(); this file only handles the launcher UI. */

:root {
  --mc-primary: #4cd7f6;
  --mc-primary-deep: #00a2e6;
  --mc-bubble-z: 999999;
  --mc-wrap-z: 999998;
}

.mc-bubble {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(135deg, var(--mc-primary) 0%, var(--mc-primary-deep) 100%);
  color: #06212b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--mc-bubble-z);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.35),
    0 0 0 0 rgba(76, 215, 246, 0.4);
  transition:
    transform 200ms cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 200ms cubic-bezier(0.32, 0.72, 0, 1);
  padding: 0;
}
.mc-bubble--bottom-left {
  right: auto;
  left: 24px;
}
.mc-bubble--top-right {
  bottom: auto;
  top: 24px;
}
.mc-bubble--top-left {
  right: auto;
  bottom: auto;
  left: 24px;
  top: 24px;
}
.mc-bubble:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.45),
    0 0 0 6px rgba(76, 215, 246, 0.18);
}
.mc-bubble:focus-visible {
  outline: 2px solid var(--mc-primary);
  outline-offset: 3px;
}
.mc-bubble-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--mc-primary);
  animation: mc-bubble-pulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes mc-bubble-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

.mc-widget-wrap {
  position: fixed;
  right: 24px;
  bottom: 100px;
  width: 480px;
  max-width: calc(100vw - 32px);
  height: 580px;
  z-index: var(--mc-wrap-z);
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.45));
  transform: translateY(8px);
  opacity: 0;
  transition:
    transform 280ms cubic-bezier(0.32, 0.72, 0, 1),
    opacity 220ms cubic-bezier(0.32, 0.72, 0, 1);
}
/* When the bubble is on a non-default side, slide the wrap to the same side. */
.mc-bubble--bottom-left ~ .mc-widget-wrap {
  right: auto;
  left: 24px;
}
.mc-bubble--top-right ~ .mc-widget-wrap {
  bottom: auto;
  top: 100px;
}
.mc-bubble--top-left ~ .mc-widget-wrap {
  right: auto;
  bottom: auto;
  left: 24px;
  top: 100px;
}
.mc-widget-wrap.is-open {
  transform: translateY(0);
  opacity: 1;
}
.mc-root {
  width: 100%;
  height: 100%;
}

@media (max-width: 540px) {
  .mc-widget-wrap {
    right: 16px;
    left: 16px;
    bottom: 92px;
    width: auto;
    height: 70dvh;
  }
  .mc-bubble {
    right: 16px;
    bottom: 16px;
  }
}

/* Shortcode: inline mount, opens immediately, no bubble. */
.mc-shortcode-inline .mc-root {
  height: 580px;
}
.mc-shortcode-bubble .mc-mount {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .mc-bubble,
  .mc-widget-wrap,
  .mc-bubble-pulse {
    animation: none !important;
    transition: none !important;
  }
}
