/* Compliance Chatbot Widget Styles
   Edit --ccb-primary to match your brand (Landlord Certification). */
:root{
  --ccb-primary:#F4762A;
  --ccb-primary-dark:#C85A1A;
  --ccb-accent:#F4762A;
  --ccb-bg:#ffffff;
  --ccb-text:#1a1a1a;
  --ccb-muted:#6b7280;
  --ccb-radius:14px;
}
#ccb-launcher{
  position:fixed; bottom:24px; right:24px; z-index:999999;
  width:64px; height:64px; border-radius:50%;
  background-color:var(--ccb-primary);
  background-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='white'%3E%3Cpath%20d='M12%202C6.48%202%202%205.94%202%2010.8c0%202.73%201.44%205.17%203.7%206.78-.12.98-.53%202.36-1.55%203.75a.5.5%200%200%200%20.5.77c2.02-.4%203.7-1.24%204.85-1.97.79.16%201.62.24%202.5.24%205.52%200%2010-3.94%2010-8.8S17.52%202%2012%202z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:center;
  background-size:28px 28px;
  border:none; cursor:pointer;
  box-shadow:0 6px 20px rgba(244,118,42,.45);
  transition:transform .15s ease, box-shadow .15s ease;
  animation:ccb-pop 2.6s ease-in-out infinite;
}
#ccb-launcher:hover{
  transform:scale(1.08);
  box-shadow:0 8px 26px rgba(244,118,42,.55);
  animation-play-state:paused;
}

@keyframes ccb-pop{
  0%, 100% { transform:scale(1); }
  6%  { transform:scale(1.12); }
  12% { transform:scale(0.97); }
  18% { transform:scale(1.04); }
  24% { transform:scale(1); }
}

/* Greeting bubble that pops up next to the launcher */
#ccb-teaser{
  position:fixed; bottom:32px; right:98px; z-index:999998;
  background:#fff; color:var(--ccb-text);
  padding:12px 16px; border-radius:16px 16px 4px 16px;
  box-shadow:0 6px 20px rgba(0,0,0,.15);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:14px; font-weight:500; white-space:nowrap;
  opacity:0; transform:translateY(8px) scale(0.9);
  pointer-events:none;
  transition:opacity .3s ease, transform .3s ease;
}
#ccb-teaser.ccb-show{
  opacity:1; transform:translateY(0) scale(1);
  pointer-events:auto; cursor:pointer;
}
#ccb-teaser::after{
  content:''; position:absolute; right:-6px; bottom:14px;
  width:12px; height:12px; background:#fff;
  clip-path:polygon(0 0, 100% 50%, 0 100%);
}
#ccb-teaser .ccb-teaser-close{
  position:absolute; top:-6px; left:-6px; width:20px; height:20px;
  background:#e5e7eb; border-radius:50%; display:flex; align-items:center;
  justify-content:center; font-size:12px; color:#4b5563; cursor:pointer;
  pointer-events:auto;
}

@media (max-width: 480px){
  #ccb-teaser{
    right:16px; bottom:98px; left:16px; width:auto;
    white-space:normal; text-align:center;
  }
  #ccb-teaser::after{ display:none; }
}

#ccb-panel{
  position:fixed; bottom:96px; right:24px; z-index:999999;
  width:360px; max-width:92vw; height:520px; max-height:75vh;
  background:var(--ccb-bg); border-radius:var(--ccb-radius);
  box-shadow:0 12px 40px rgba(0,0,0,.25);
  display:none; flex-direction:column; overflow:hidden;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}
#ccb-panel.ccb-open{ display:flex; }

#ccb-header{
  background:linear-gradient(135deg,var(--ccb-primary),var(--ccb-primary-dark));
  color:#fff; padding:14px 16px; display:flex; align-items:center; justify-content:space-between;
}
#ccb-header .ccb-title{ font-weight:600; font-size:15px; }
#ccb-header .ccb-sub{ font-size:12px; opacity:.8; margin-top:2px; }
#ccb-close{ background:none; border:none; color:#fff; font-size:20px; cursor:pointer; line-height:1; }

#ccb-messages{
  flex:1; overflow-y:auto; padding:14px; background:#f7f9fb;
  display:flex; flex-direction:column; gap:10px;
}
.ccb-msg{ max-width:82%; padding:9px 12px; border-radius:12px; font-size:14px; line-height:1.4; white-space:pre-wrap; }
.ccb-msg.user{ align-self:flex-end; background:var(--ccb-accent); color:#fff; border-bottom-right-radius:4px; }
.ccb-msg.bot{ align-self:flex-start; background:#fff; color:var(--ccb-text); border:1px solid #e5e7eb; border-bottom-left-radius:4px; }
.ccb-msg.typing{ align-self:flex-start; color:var(--ccb-muted); font-style:italic; }

#ccb-inputbar{
  display:flex; gap:8px; padding:10px; border-top:1px solid #e5e7eb; background:#fff;
}
#ccb-input{
  flex:1; border:1px solid #d1d5db; border-radius:20px; padding:9px 14px;
  font-size:14px; outline:none;
}
#ccb-input:focus{ border-color:var(--ccb-accent); }
#ccb-send{
  background:var(--ccb-primary); color:#fff; border:none; border-radius:50%;
  width:38px; height:38px; cursor:pointer; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
}
#ccb-send:disabled{ opacity:.5; cursor:default; }

#ccb-footer-note{
  font-size:10px; color:var(--ccb-muted); text-align:center; padding:4px 0 8px;
  background:#fff;
}