.mgc-fab{
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background-color: #2563eb;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
  cursor: pointer;
  font-size: 22px;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
  z-index: 9999;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
.mgc-fab.mgc-hide{ opacity: 0; pointer-events: none; transform: scale(.92); }

.mgc-window{
  position: fixed;
  right: 18px;
  bottom: 90px;
  width: 360px;
  max-width: calc(100vw - 36px);
  height: 520px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(2,6,23,.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 10000;
}
.mgc-window.mgc-open{
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.mgc-header{
  background: linear-gradient(135deg,#1d4ed8,#4f46e5);
  color: #fff;
  padding: 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mgc-title{ font-weight: 600; }
.mgc-close{ background: transparent; border: none; color: #fff; font-size: 18px; cursor: pointer; }

.mgc-messages{ flex: 1; padding: 14px; background: linear-gradient(180deg,#f8fafc,#ffffff); overflow-y: auto; }

.mgc-bubble{ max-width: 78%; margin: 8px 0; padding: 10px 12px; border-radius: 14px; line-height: 1.35; font-size: 14px; white-space: pre-wrap; word-wrap: break-word; }
.mgc-bot{ background: #eef2ff; color: #0f172a; border-top-left-radius: 6px; }
.mgc-user{ background: #2563eb; color: #fff; margin-left: auto; border-top-right-radius: 6px; }

.mgc-inputbar{ display: flex; gap: 8px; padding: 12px; border-top: 1px solid #eef2ff; background: #fff; }
.mgc-input{ flex: 1; border: 1px solid #e6eefc; border-radius: 999px; padding: 10px 14px; outline: none; font-size: 14px; }
.mgc-input:focus{ box-shadow: 0 0 0 4px rgba(37,99,235,.06); border-color: #93c5fd; }
.mgc-send{ border: none; background: #2563eb; color: #fff; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; }

/* typing dots */
.typing { display:inline-flex; gap:6px; }
.typing i{ width:8px; height:8px; border-radius:50%; background:#6b7280; display:block; animation:typing 1.2s infinite; }
.typing i:nth-child(2){ animation-delay:.2s; }
.typing i:nth-child(3){ animation-delay:.4s; }
@keyframes typing{ 0%{ transform: translateY(0); opacity:.4; } 20%{ transform: translateY(-3px); opacity:1; } 40%{ transform: translateY(0); opacity:.4; } }
