.soved-chat{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:9990;
  font-family:inherit;
}

.soved-chat__launcher{
  min-height:56px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 18px;
  border:0;
  border-radius:999px;
  color:#fff;
  background:linear-gradient(135deg,#155cff,#1787ff);
  box-shadow:0 18px 45px rgba(36,107,254,.30);
  font:inherit;
  font-size:14px;
  font-weight:760;
  cursor:pointer;
  transition:transform .2s ease,box-shadow .2s ease;
}

.soved-chat__launcher:hover{
  transform:translateY(-2px);
  box-shadow:0 22px 52px rgba(36,107,254,.34);
}

.soved-chat__launcher svg,
.soved-chat__form button svg{
  width:21px;
  height:21px;
  fill:currentColor;
}

.soved-chat__panel{
  position:absolute;
  right:0;
  bottom:72px;
  width:min(390px,calc(100vw - 32px));
  height:min(590px,calc(100vh - 116px));
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid rgba(17,24,39,.09);
  border-radius:28px;
  background:rgba(255,255,255,.97);
  box-shadow:0 30px 90px rgba(24,39,75,.22);
  backdrop-filter:blur(20px);
  opacity:0;
  visibility:hidden;
  transform:translateY(10px) scale(.98);
  transform-origin:bottom right;
  transition:opacity .18s ease,transform .18s ease,visibility .18s ease;
}

.soved-chat.is-open .soved-chat__panel{
  opacity:1;
  visibility:visible;
  transform:none;
}

.soved-chat.is-open .soved-chat__launcher{
  visibility:hidden;
  opacity:0;
  pointer-events:none;
}

.soved-chat__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:21px 20px 18px;
  border-bottom:1px solid rgba(17,24,39,.08);
  background:linear-gradient(145deg,rgba(242,247,255,.98),rgba(255,255,255,.98));
}

.soved-chat__header strong{
  display:block;
  color:#111827;
  font-size:17px;
  line-height:1.2;
  letter-spacing:-.025em;
}

.soved-chat__header span{
  display:block;
  margin-top:5px;
  color:#64748b;
  font-size:12px;
  line-height:1.4;
}

.soved-chat__close{
  flex:0 0 34px;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  padding:0 0 2px;
  border:1px solid rgba(17,24,39,.08);
  border-radius:50%;
  background:#fff;
  color:#64748b;
  font:400 25px/1 Arial,sans-serif;
  cursor:pointer;
}

.soved-chat__messages{
  flex:1;
  min-height:0;
  overflow-y:auto;
  padding:20px;
  overscroll-behavior:contain;
}

.soved-chat__bubble{
  width:fit-content;
  max-width:84%;
  margin:0 0 10px;
  padding:11px 14px;
  border-radius:18px;
  color:#263244;
  background:#eef2f7;
  font-size:14px;
  line-height:1.45;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.soved-chat__bubble--staff{
  border-bottom-left-radius:6px;
}

.soved-chat__bubble--user{
  margin-left:auto;
  color:#fff;
  background:linear-gradient(135deg,#155cff,#1787ff);
  border-bottom-right-radius:6px;
}

.soved-chat__error{
  margin:0 16px 10px;
  padding:9px 11px;
  border-radius:12px;
  color:#9f2f2f;
  background:#fff1f1;
  font-size:12px;
  line-height:1.4;
}

.soved-chat__form{
  display:flex;
  align-items:flex-end;
  gap:10px;
  padding:12px 14px 10px;
  border-top:1px solid rgba(17,24,39,.08);
  background:#fff;
}

.soved-chat__form textarea{
  flex:1;
  max-height:120px;
  min-height:42px;
  resize:none;
  padding:10px 13px;
  border:1px solid rgba(17,24,39,.11);
  border-radius:16px;
  outline:none;
  background:#f8fafc;
  color:#111827;
  font:inherit;
  font-size:14px;
  line-height:1.45;
}

.soved-chat__form textarea:focus{
  border-color:rgba(36,107,254,.38);
  box-shadow:0 0 0 4px rgba(36,107,254,.08);
}

.soved-chat__form button{
  flex:0 0 42px;
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:50%;
  color:#fff;
  background:#246bfe;
  cursor:pointer;
}

.soved-chat__form button:disabled,
.soved-chat__form textarea:disabled{
  opacity:.55;
  cursor:default;
}

.soved-chat__foot{
  padding:0 16px 12px;
  color:#8a94a3;
  background:#fff;
  font-size:10px;
  text-align:center;
}

.soved-chat__honeypot{
  position:absolute!important;
  left:-9999px!important;
  width:1px!important;
  height:1px!important;
  overflow:hidden!important;
}

@media (max-width:640px){
  .soved-chat{
    right:14px;
    bottom:14px;
  }

  .soved-chat__launcher{
    min-height:52px;
    padding:0 16px;
  }

  .soved-chat__panel{
    position:fixed;
    inset:12px;
    width:auto;
    height:auto;
    max-height:none;
    border-radius:24px;
    transform:translateY(12px) scale(.99);
  }

  .soved-chat__messages{
    padding:16px;
  }

  .soved-chat__bubble{
    max-width:88%;
  }
}

@media (prefers-reduced-motion:reduce){
  .soved-chat__launcher,
  .soved-chat__panel{
    transition:none;
  }
}
