
:root{
  --chat-blue:#0d47d9;
  --chat-navy:#061331;
  --chat-soft:#f4f8ff;
  --chat-line:#dbe5f5;
  --chat-text:#14233b;
}

.dc44-chat-launcher{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:9999;
  width:72px;
  height:72px;
  border:0;
  border-radius:26px;
  color:#fff;
  background:linear-gradient(135deg,var(--chat-blue),var(--chat-navy));
  box-shadow:0 24px 72px rgba(6,19,49,.36);
  display:grid;
  place-items:center;
  cursor:pointer;
  isolation:isolate;
}

.dc44-chat-launcher::before{
  content:"";
  position:absolute;
  inset:-6px;
  border-radius:32px;
  background:rgba(13,71,217,.18);
  animation:dc44Pulse 2.4s ease-in-out infinite;
  z-index:-1;
}

.dc44-chat-launcher span{
  font-size:30px;
}

.dc44-chat-panel{
  position:fixed;
  right:22px;
  bottom:110px;
  z-index:9999;
  width:min(420px,calc(100vw - 28px));
  max-height:min(720px,calc(100vh - 132px));
  display:none;
  flex-direction:column;
  overflow:hidden;
  border-radius:30px;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(219,229,245,.95);
  box-shadow:0 32px 100px rgba(6,19,49,.30);
  backdrop-filter:blur(22px);
}

.dc44-chat-panel.is-open{
  display:flex;
}

.dc44-chat-header{
  padding:18px 20px;
  color:#fff;
  background:
    radial-gradient(circle at 85% 10%,rgba(255,255,255,.24),transparent 30%),
    linear-gradient(135deg,var(--chat-navy),var(--chat-blue));
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.dc44-chat-brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.dc44-chat-avatar{
  width:46px;
  height:46px;
  border-radius:17px;
  background:#fff;
  color:var(--chat-blue);
  display:grid;
  place-items:center;
  font-weight:1000;
  box-shadow:0 12px 28px rgba(0,0,0,.16);
}

.dc44-chat-title strong{
  display:block;
  color:#fff;
  font-size:1rem;
  line-height:1.15;
}

.dc44-chat-title span{
  display:block;
  color:rgba(255,255,255,.78);
  font-size:.84rem;
}

.dc44-chat-close{
  width:38px;
  height:38px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:14px;
  color:#fff;
  background:rgba(255,255,255,.10);
  cursor:pointer;
  font-size:20px;
}

.dc44-chat-body{
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:280px;
  max-height:390px;
  overflow:auto;
  scroll-behavior:smooth;
  background:
    radial-gradient(circle at 20% 0%,rgba(13,71,217,.06),transparent 35%),
    linear-gradient(180deg,#fff,#f7faff);
}

.dc44-message{
  max-width:86%;
  padding:12px 14px;
  border-radius:18px;
  line-height:1.45;
  font-size:.94rem;
  animation:dc44In .22s ease both;
}

.dc44-message.bot{
  align-self:flex-start;
  background:#eef4ff;
  color:var(--chat-text);
  border:1px solid rgba(13,71,217,.08);
}

.dc44-message.user{
  align-self:flex-end;
  color:#fff;
  background:linear-gradient(135deg,var(--chat-blue),#0739bb);
}

.dc44-typing{
  display:inline-flex;
  gap:4px;
  align-items:center;
}

.dc44-typing i{
  width:6px;
  height:6px;
  border-radius:999px;
  background:var(--chat-blue);
  opacity:.55;
  animation:dc44Dot 1s infinite ease-in-out;
}

.dc44-typing i:nth-child(2){animation-delay:.12s}
.dc44-typing i:nth-child(3){animation-delay:.24s}

.dc44-quick{
  padding:0 16px 12px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  background:#f7faff;
}

.dc44-quick button{
  border:1px solid var(--chat-line);
  border-radius:999px;
  padding:9px 12px;
  background:#fff;
  color:var(--chat-navy);
  font-weight:850;
  font-size:.86rem;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(6,19,49,.06);
}

.dc44-quick button:hover{
  color:#fff;
  background:var(--chat-blue);
}

.dc44-form{
  padding:13px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  border-top:1px solid var(--chat-line);
  background:rgba(255,255,255,.96);
}

.dc44-form input{
  width:100%;
  border:1px solid var(--chat-line);
  border-radius:16px;
  padding:13px 14px;
  color:var(--chat-text);
  outline:0;
}

.dc44-form input:focus{
  border-color:var(--chat-blue);
  box-shadow:0 0 0 4px rgba(13,71,217,.12);
}

.dc44-form button{
  border:0;
  border-radius:16px;
  padding:0 16px;
  color:#fff;
  background:linear-gradient(135deg,var(--chat-blue),var(--chat-navy));
  font-weight:950;
  cursor:pointer;
}

.dc44-actions{
  padding:0 13px 13px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  background:#fff;
}

.dc44-actions a{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  border-radius:15px;
  font-weight:950;
  text-decoration:none;
}

.dc44-actions a:first-child{
  color:#fff;
  background:#18a866;
}

.dc44-actions a:last-child{
  color:var(--chat-navy);
  background:#f4f8ff;
  border:1px solid var(--chat-line);
}

@keyframes dc44Pulse{
  0%,100%{transform:scale(.96);opacity:.65}
  50%{transform:scale(1.08);opacity:.18}
}

@keyframes dc44In{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:none}
}

@keyframes dc44Dot{
  0%,80%,100%{transform:translateY(0);opacity:.35}
  40%{transform:translateY(-4px);opacity:1}
}

@media(max-width:640px){
  .dc44-chat-launcher{
    right:14px;
    bottom:86px;
    width:64px;
    height:64px;
    border-radius:22px;
  }

  .dc44-chat-panel{
    right:12px;
    left:12px;
    bottom:160px;
    width:auto;
    max-height:calc(100vh - 184px);
  }

  .dc44-actions{
    grid-template-columns:1fr;
  }
}
