:root{
  --site-bg: #f7f5f2;        /* Astrabon light cream */
  --site-border: #e2dfd9;    /* subtle border */
  --site-text: #2c2c2c;
  --site-muted: #7a7a7a;
  --badge: #d64545;

  --shadow: 0 14px 40px rgba(0,0,0,.18);
}

/* ================= FLOATING AI BUTTON ================= */
.chat-launcher{
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;

  width: 64px;
  height: 64px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.chat-launcher-icon{
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

/* pulse ring */
.chat-launcher.is-pulsing::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(214,69,69,.35);
  animation: pulse 2s infinite;
}

@keyframes pulse{
  0% { box-shadow: 0 0 0 0 rgba(214,69,69,.35); }
  70% { box-shadow: 0 0 0 14px rgba(214,69,69,0); }
  100% { box-shadow: 0 0 0 0 rgba(214,69,69,0); }
}

/* badge */
.chat-badge{
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  background: var(--badge);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-badge.is-hidden{ display:none; }

/* ================= CHAT POPPER ================= */
.chat-popper{
  position: fixed;
  right: 20px;
  bottom: 100px;

  width: 360px;
  height: 520px;

  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;

  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: .2s ease;
}

.chat-popper.is-open{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* HEADER — MATCH SITE (NO BLUE) */
.chat-header{
  height: 60px;
  background: var(--site-bg);
  border-bottom: 1px solid var(--site-border);
  padding: 0 14px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-left{
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header-avatar{
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
}

.chat-title{
  font-size: 14px;
  font-weight: 600;
  color: var(--site-text);
}

.chat-status{
  font-size: 11px;
  color: var(--site-muted);
}

/* CLOSE BUTTON */
.chat-close-btn{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: var(--site-text);
}

.chat-close-btn:hover{
  background: rgba(0,0,0,.06);
}

/* BODY */
.chat-body{
  height: calc(100% - 60px);
  background: #fff;
}

.chat-loading{
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--site-muted);
}

.chat-iframe{
  width: 100%;
  height: 100%;
  border: 0;
}

/* MOBILE */
@media (max-width: 420px){
  .chat-popper{
    width: calc(100vw - 40px);
  }
}
