/* === CHATBOT WIDGET === */
#alsaed-chatbot-btn{
  position:fixed;
  bottom:24px;
  right:24px;
  width:56px;
  height:56px;
  border-radius:50%;
  background:var(--gold);
  color:var(--ink);
  border:0;
  cursor:pointer;
  z-index:9999;
  box-shadow:0 4px 20px rgba(0,0,0,0.25);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.5rem;
  transition:transform 0.2s ease;
}
#alsaed-chatbot-btn:hover{ transform:scale(1.08); }
#alsaed-chatbot-btn svg{ width:28px; height:28px; }

#alsaed-chatbot-window{
  position:fixed;
  bottom:90px;
  right:24px;
  width:380px;
  max-height:600px;
  height:70vh;
  background:#fff;
  border-radius:16px;
  box-shadow:0 8px 40px rgba(0,0,0,0.18);
  z-index:9998;
  display:none;
  flex-direction:column;
  overflow:hidden;
  font-family:Inter,system-ui,sans-serif;
  border:1px solid var(--line-gold);
}
#alsaed-chatbot-window.open{ display:flex; }

.cb-header{
  background:var(--ink);
  color:#fff;
  padding:1rem 1.2rem;
  display:flex;
  align-items:center;
  gap:0.7rem;
  flex-shrink:0;
}
.cb-header-icon{
  width:36px;
  height:36px;
  border-radius:50%;
  background:var(--gold);
  color:var(--ink);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.1rem;
  font-weight:700;
  font-family:var(--serif);
}
.cb-header-info{ flex:1; }
.cb-header-title{ font-size:0.95rem; font-weight:600; font-family:var(--serif); color:var(--gold); }
.cb-header-status{ font-size:0.72rem; color:#8a8278; }
.cb-close{
  background:none;
  border:0;
  color:#8a8278;
  cursor:pointer;
  font-size:1.2rem;
  padding:0.2rem;
  line-height:1;
}

.cb-messages{
  flex:1;
  overflow-y:auto;
  padding:1rem;
  background:#faf6ef;
  display:flex;
  flex-direction:column;
  gap:0.6rem;
}
.cb-msg{
  max-width:85%;
  padding:0.6rem 1rem;
  border-radius:12px;
  font-size:0.88rem;
  line-height:1.5;
  animation:cbFadeIn 0.25s ease;
}
@keyframes cbFadeIn{ from{ opacity:0; transform:translateY(8px); } to{ opacity:1; transform:none; } }
.cb-msg.bot{
  align-self:flex-start;
  background:#fff;
  border:1px solid var(--line);
  color:var(--text-dark);
  border-bottom-left-radius:4px;
}
.cb-msg.user{
  align-self:flex-end;
  background:var(--gold);
  color:var(--ink);
  border-bottom-right-radius:4px;
}
.cb-msg.bot em{ color:var(--gold-deep); font-style:normal; font-weight:500; }
.cb-msg.bot strong{ color:var(--text-dark); }
.cb-msg.bot a{ color:var(--gold-deep); text-decoration:underline; }

.cb-typing{
  align-self:flex-start;
  display:flex;
  gap:0.3rem;
  padding:0.8rem 1rem;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  border-bottom-left-radius:4px;
}
.cb-typing span{
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--line);
  animation:cbBounce 1.2s infinite ease;
}
.cb-typing span:nth-child(2){ animation-delay:0.2s; }
.cb-typing span:nth-child(3){ animation-delay:0.4s; }
@keyframes cbBounce{
  0%,60%,100%{ transform:translateY(0); }
  30%{ transform:translateY(-6px); }
}

.cb-input-wrap{
  display:flex;
  gap:0.5rem;
  padding:0.8rem 1rem;
  border-top:1px solid var(--line);
  background:#fff;
  flex-shrink:0;
}
.cb-input{
  flex:1;
  border:1px solid var(--line);
  border-radius:24px;
  padding:0.6rem 1rem;
  font-size:0.88rem;
  font-family:inherit;
  outline:none;
  transition:border-color 0.2s;
}
.cb-input:focus{ border-color:var(--gold); }
.cb-send{
  width:40px;
  height:40px;
  border-radius:50%;
  background:var(--gold);
  color:var(--ink);
  border:0;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.1rem;
  transition:opacity 0.2s;
  flex-shrink:0;
}
.cb-send:disabled{ opacity:0.4; cursor:default; }

.cb-footer{
  padding:0.5rem 1rem;
  text-align:center;
  font-size:0.65rem;
  color:var(--text-muted);
  background:#fff;
  border-top:1px solid var(--line);
  flex-shrink:0;
}

@media(max-width:560px){
  #alsaed-chatbot-window{
    right:0;
    bottom:0;
    width:100%;
    height:100%;
    max-height:100%;
    border-radius:0;
    border:0;
  }
  #alsaed-chatbot-btn{ bottom:16px; right:16px; }
}
