.aps-chatbot{
  position:fixed;
  right:22px;
  bottom:92px;
  z-index:9998;
  font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color:#0f172a;
}

.aps-chatbot *{
  box-sizing:border-box;
}

.aps-chatbot__launcher{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:58px;
  padding:0 18px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:999px;
  background:linear-gradient(135deg, #0f96af, #087c99 54%, #0f172a);
  color:#fff;
  box-shadow:0 18px 42px rgba(8,12,18,.24);
  cursor:pointer;
  font-weight:900;
  letter-spacing:-.01em;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.aps-chatbot__launcher:hover{
  transform:translateY(-2px);
  border-color:rgba(255,255,255,.44);
  box-shadow:0 22px 52px rgba(8,12,18,.30);
}

.aps-chatbot__launcher-icon{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:999px;
  background:rgba(255,255,255,.16);
  font-size:18px;
}

.aps-chatbot__panel{
  position:absolute;
  right:0;
  bottom:76px;
  display:grid;
  grid-template-rows:auto minmax(0, 1fr) auto;
  width:min(430px, calc(100vw - 28px));
  height:min(680px, calc(100vh - 120px));
  border:1px solid rgba(15,23,42,.12);
  border-radius:28px;
  overflow:hidden;
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(244,248,250,.94));
  box-shadow:0 28px 90px rgba(8,12,18,.28);
  transform-origin:bottom right;
  opacity:0;
  pointer-events:none;
  transform:translateY(16px) scale(.98);
  transition:opacity .2s ease, transform .2s ease;
  backdrop-filter:blur(18px);
}

.aps-chatbot.is-open .aps-chatbot__panel{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0) scale(1);
}

.aps-chatbot__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:18px 18px 16px;
  background:
    radial-gradient(circle at 10% 0, rgba(240,217,160,.28), transparent 32%),
    linear-gradient(135deg, #0f172a, #0a6f86 68%, #0f96af);
  color:#fff;
}

.aps-chatbot__title{
  display:grid;
  gap:3px;
}

.aps-chatbot__title strong{
  font-size:16px;
  letter-spacing:-.02em;
}

.aps-chatbot__title span{
  color:rgba(255,255,255,.76);
  font-size:12px;
  line-height:1.35;
}

.aps-chatbot__close{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:14px;
  background:rgba(255,255,255,.10);
  color:#fff;
  cursor:pointer;
}

.aps-chatbot__messages{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:18px;
  overflow:auto;
  scroll-behavior:smooth;
}

.aps-chatbot__msg{
  max-width:88%;
  padding:12px 14px;
  border-radius:18px;
  font-size:14px;
  line-height:1.55;
  white-space:pre-wrap;
}

.aps-chatbot__msg--bot{
  align-self:flex-start;
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 10px 24px rgba(15,23,42,.06);
}

.aps-chatbot__msg--user{
  align-self:flex-end;
  background:#0f172a;
  color:#fff;
  box-shadow:0 12px 24px rgba(15,23,42,.16);
}

.aps-chatbot__quick{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  max-width:100%;
  margin-top:-4px;
}

.aps-chatbot__quick button{
  border:1px solid rgba(8,145,178,.18);
  border-radius:999px;
  background:rgba(8,145,178,.08);
  color:#075f75;
  padding:8px 11px;
  cursor:pointer;
  font-weight:800;
  font-size:12px;
  transition:background .18s ease, border-color .18s ease, transform .18s ease;
}

.aps-chatbot__quick button:hover{
  transform:translateY(-1px);
  border-color:rgba(8,145,178,.32);
  background:rgba(8,145,178,.14);
}

.aps-chatbot__composer{
  display:grid;
  gap:10px;
  padding:14px;
  border-top:1px solid rgba(15,23,42,.08);
  background:rgba(255,255,255,.82);
}

.aps-chatbot__status{
  min-height:18px;
  color:#64748b;
  font-size:12px;
  line-height:1.4;
}

.aps-chatbot__form{
  display:flex;
  align-items:flex-end;
  gap:8px;
}

.aps-chatbot__input{
  flex:1;
  min-height:46px;
  max-height:120px;
  resize:none;
  border:1px solid rgba(15,23,42,.12);
  border-radius:16px;
  padding:12px 13px;
  outline:none;
  color:#0f172a;
  background:#fff;
  line-height:1.45;
}

.aps-chatbot__input:focus{
  border-color:rgba(8,145,178,.36);
  box-shadow:0 0 0 4px rgba(8,145,178,.10);
}

.aps-chatbot__send{
  width:48px;
  height:46px;
  border:0;
  border-radius:16px;
  background:linear-gradient(180deg, #0f96af, #087c99);
  color:#fff;
  cursor:pointer;
  font-weight:900;
  box-shadow:0 12px 24px rgba(8,145,178,.22);
}

.aps-chatbot__send:disabled{
  opacity:.55;
  cursor:not-allowed;
  box-shadow:none;
}

.aps-chatbot__privacy{
  color:#64748b;
  font-size:11px;
  line-height:1.45;
}

.aps-chatbot__privacy label{
  display:flex;
  align-items:flex-start;
  gap:8px;
}

.aps-chatbot__privacy input{
  margin-top:2px;
}

.aps-chatbot__hidden{
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
  opacity:0;
}

.aps-chatbot__summary{
  display:grid;
  gap:7px;
  margin-top:4px;
}

.aps-chatbot__summary-row{
  display:grid;
  grid-template-columns:112px 1fr;
  gap:8px;
  padding-bottom:7px;
  border-bottom:1px solid rgba(15,23,42,.06);
}

.aps-chatbot__summary-row b{
  color:#0f172a;
}

.aps-chatbot__summary-row span{
  color:#475569;
}

@media (max-width: 640px){
  .aps-chatbot{
    right:14px;
    bottom:84px;
  }

  .aps-chatbot__launcher{
    min-height:54px;
    padding:0 14px;
  }

  .aps-chatbot__launcher-text{
    max-width:142px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .aps-chatbot__panel{
    position:fixed;
    left:10px;
    right:10px;
    bottom:10px;
    width:auto;
    height:min(720px, calc(100vh - 20px));
    border-radius:24px;
  }

  .aps-chatbot__msg{
    max-width:94%;
  }

  .aps-chatbot__summary-row{
    grid-template-columns:1fr;
    gap:2px;
  }
}
