#sm-ai-button{
  position:fixed;
  right:20px;
  bottom:20px;
  width:64px;
  height:64px;
  border:none;
  border-radius:50%;
  cursor:pointer;
  z-index:999999;
  background:linear-gradient(135deg,#e2a23b,#c97f16);
  color:#fff;
  box-shadow:0 12px 30px rgba(0,0,0,.22);
  font-size:28px;
}

#sm-ai-panel{
  position:fixed;
  right:20px;
  bottom:95px;
  width:370px;
  max-width:calc(100vw - 24px);
  height:560px;
  background:#fffdf9;
  border:1px solid #ecd7b0;
  border-radius:20px;
  box-shadow:0 20px 55px rgba(0,0,0,.24);
  overflow:hidden;
  z-index:999999;
  display:none;
  font-family:Arial, Helvetica, sans-serif;
}

#sm-ai-panel.open{
  display:flex;
  flex-direction:column;
}

.sm-ai-header{
  background:linear-gradient(135deg,#f0b24a,#d68c21);
  color:#fff;
  padding:14px 16px;
}

.sm-ai-title{
  font-size:17px;
  font-weight:700;
  line-height:1.2;
}

.sm-ai-subtitle{
  font-size:12px;
  opacity:.95;
  margin-top:4px;
}

.sm-ai-messages{
  flex:1;
  overflow-y:auto;
  padding:14px;
  background:#fffaf2;
}

.sm-ai-msg{
  margin:0 0 12px 0;
  display:flex;
}

.sm-ai-msg.user{
  justify-content:flex-end;
}

.sm-ai-msg.bot{
  justify-content:flex-start;
}

.sm-ai-bubble{
  max-width:86%;
  padding:10px 12px;
  border-radius:16px;
  font-size:14px;
  line-height:1.45;
  white-space:pre-wrap;
  word-wrap:break-word;
}

.sm-ai-msg.user .sm-ai-bubble{
  background:#f9dca6;
  color:#3c2a09;
}

.sm-ai-msg.bot .sm-ai-bubble{
  background:#ffffff;
  color:#2d2418;
  border:1px solid #efdfbf;
}

.sm-ai-form{
  display:flex;
  gap:8px;
  padding:12px;
  border-top:1px solid #efdfbf;
  background:#fff;
}

.sm-ai-form textarea{
  flex:1;
  min-height:46px;
  max-height:100px;
  resize:none;
  border:1px solid #dcc9a3;
  border-radius:12px;
  padding:10px 12px;
  font-size:14px;
  font-family:Arial, Helvetica, sans-serif;
  outline:none;
}

.sm-ai-form button{
  border:none;
  border-radius:12px;
  padding:0 16px;
  cursor:pointer;
  font-weight:700;
  background:#d68c21;
  color:#fff;
}

.sm-ai-form button:hover{
  opacity:.95;
}

@media (max-width: 640px){
  #sm-ai-button{
    right:14px;
    bottom:14px;
    width:58px;
    height:58px;
    font-size:25px;
  }

  #sm-ai-panel{
    right:10px;
    left:10px;
    width:auto;
    bottom:80px;
    height:72vh;
  }
}