#alc-bubble{
  position:fixed;bottom:22px;right:22px;z-index:999999;
  width:58px;height:58px;border-radius:50%;
  background:var(--alc-accent,#0d7a6e);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;box-shadow:0 6px 20px rgba(0,0,0,.22);
  transition:transform .15s ease;
}
#alc-bubble:hover{transform:scale(1.06);}
#alc-bubble svg{width:26px;height:26px;fill:#fff;}
#alc-bubble.alc-hidden{display:none;}

.alc-badge{
  position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;padding:0 5px;
  background:#e0483c;color:#fff;border-radius:20px;font-size:11px;font-weight:700;
  align-items:center;justify-content:center;box-shadow:0 0 0 2px #fff;
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}

#alc-panel{
  position:fixed;bottom:92px;right:22px;z-index:999999;
  width:340px;max-width:calc(100vw - 32px);
  height:520px;max-height:calc(100vh - 140px);
  background:#fff;border-radius:16px;
  box-shadow:0 12px 40px rgba(0,0,0,.25);
  display:none;flex-direction:column;overflow:hidden;
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}
#alc-panel.alc-open{display:flex;}

#alc-header{
  background:var(--alc-accent,#0d7a6e);color:#fff;
  padding:16px 18px;display:flex;justify-content:space-between;align-items:center;flex:none;
}
#alc-header .alc-title{font-size:14.5px;font-weight:600;}
#alc-header .alc-sub{font-size:11.5px;opacity:.85;margin-top:2px;}
#alc-close{cursor:pointer;font-size:20px;line-height:1;background:none;border:none;color:#fff;opacity:.85;}
#alc-close:hover{opacity:1;}

#alc-endchat{
  cursor:pointer;font-size:11px;line-height:1;background:none;border:none;color:#fff;
  opacity:.75;white-space:nowrap;padding:0 10px 0 0;font-family:inherit;
}
#alc-endchat:hover{opacity:1;text-decoration:underline;}
#alc-endchat:disabled{opacity:.4;cursor:default;text-decoration:none;}

#alc-prechat{
  flex:1;display:flex;flex-direction:column;gap:10px;padding:18px;background:#faf9f6;
}
.alc-prechat-hint{margin:0 0 2px;font-size:13px;color:#132521;}
#alc-prechat input{
  border:1px solid #e4e1d8;border-radius:10px;padding:10px 12px;font-size:13.5px;outline:none;
}
#alc-prechat input:focus{border-color:var(--alc-accent,#0d7a6e);}
#alc-prechat-start{
  background:var(--alc-accent,#0d7a6e);color:#fff;border:none;border-radius:10px;
  padding:11px;font-weight:600;cursor:pointer;font-size:13.5px;margin-top:4px;
}
#alc-prechat-start:hover{filter:brightness(0.95);}

#alc-messages{
  flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;
  background:#faf9f6;
}
.alc-msg{max-width:80%;padding:9px 13px;border-radius:14px;font-size:13.5px;line-height:1.4;word-wrap:break-word;}
.alc-msg.alc-bot{align-self:flex-start;background:#eef0ee;color:#132521;border-bottom-left-radius:4px;}
.alc-msg.alc-agent{align-self:flex-start;background:#fbf3e3;color:#132521;border-bottom-left-radius:4px;}
.alc-msg.alc-me{align-self:flex-end;background:var(--alc-accent,#0d7a6e);color:#fff;border-bottom-right-radius:4px;position:relative;}
.alc-seen{
  font-size:10.5px;color:#9aa39e;text-align:right;margin-top:3px;
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}
.alc-typing{align-self:flex-start;display:flex;gap:4px;padding:10px 13px;}
.alc-typing span{width:6px;height:6px;border-radius:50%;background:#9aa39e;animation:alc-bounce 1.2s infinite ease-in-out;}
.alc-typing span:nth-child(2){animation-delay:.15s;}
.alc-typing span:nth-child(3){animation-delay:.3s;}
@keyframes alc-bounce{0%,60%,100%{transform:translateY(0);opacity:.5;}30%{transform:translateY(-4px);opacity:1;}}

.alc-msg.alc-csat{
  align-self:stretch;max-width:100%;background:#fff;border:1px solid #ece9e2;
  border-radius:14px;text-align:center;padding:12px 13px;
}
.alc-csat-question{font-size:13px;color:#132521;font-weight:600;margin-bottom:8px;}
.alc-csat-buttons{display:flex;gap:10px;justify-content:center;}
.alc-csat-btn{
  border:1px solid #e4e1d8;background:#fff;border-radius:10px;
  width:44px;height:40px;font-size:18px;cursor:pointer;line-height:1;
  transition:transform .1s ease, border-color .1s ease;
}
.alc-csat-btn:hover:not(:disabled){border-color:var(--alc-accent,#0d7a6e);transform:translateY(-1px);}
.alc-csat-btn:disabled{opacity:.5;cursor:default;}

.alc-quick-replies{
  display:flex;flex-wrap:wrap;gap:6px;padding:0 14px;flex:none;
}
.alc-quick-replies:not(:empty){padding-bottom:10px;}
.alc-chip{
  background:#fff;border:1px solid var(--alc-accent,#0d7a6e);color:var(--alc-accent,#0d7a6e);
  border-radius:20px;padding:6px 12px;font-size:12px;cursor:pointer;font-weight:600;
}
.alc-chip:hover{background:var(--alc-accent,#0d7a6e);color:#fff;}

#alc-form{display:flex;border-top:1px solid #ece9e2;padding:10px;gap:8px;background:#fff;flex:none;}
#alc-input{flex:1;border:1px solid #e4e1d8;border-radius:10px;padding:9px 12px;font-size:13.5px;outline:none;}
#alc-input:focus{border-color:var(--alc-accent,#0d7a6e);}
#alc-send{background:var(--alc-accent,#0d7a6e);border:none;color:#fff;border-radius:10px;width:38px;cursor:pointer;display:flex;align-items:center;justify-content:center;}
#alc-send svg{width:16px;height:16px;fill:#fff;}

/* Dark mode support – scoped to #alc-root */
[data-alc-theme="dark"] #alc-root #alc-panel {
  background: #1a1a1a;
  color: #eee;
}
[data-alc-theme="dark"] #alc-root #alc-messages {
  background: #1a1a1a;
}
[data-alc-theme="dark"] #alc-root #alc-form {
  background: #252525;
  border-top-color: #333;
}
[data-alc-theme="dark"] #alc-root #alc-input {
  background: #333;
  color: #eee;
  border-color: #444;
}
[data-alc-theme="dark"] #alc-root .alc-msg.alc-bot,
[data-alc-theme="dark"] #alc-root .alc-msg.alc-agent {
  background: #2d2d2d;
  color: #eee;
}
[data-alc-theme="dark"] #alc-root .alc-msg.alc-me {
  color: #fff;
}
[data-alc-theme="dark"] #alc-root .alc-chip {
  background: #333;
  border-color: var(--alc-accent, #0d7a6e);
  color: var(--alc-accent, #0d7a6e);
}
[data-alc-theme="dark"] #alc-root .alc-chip:hover {
  background: var(--alc-accent, #0d7a6e);
  color: #fff;
}
[data-alc-theme="dark"] #alc-root .alc-msg.alc-csat {
  background: #252525;
  border-color: #333;
}
[data-alc-theme="dark"] #alc-root .alc-csat-question {
  color: #eee;
}
[data-alc-theme="dark"] #alc-root .alc-csat-btn {
  background: #333;
  border-color: #444;
  color: #eee;
}
[data-alc-theme="dark"] #alc-root .alc-prechat-hint {
  color: #ccc;
}
[data-alc-theme="dark"] #alc-root #alc-prechat-start {
  background: var(--alc-accent, #0d7a6e);
  color: #fff;
}
[data-alc-theme="dark"] #alc-root #alc-prechat input {
  background: #333;
  color: #eee;
  border-color: #444;
}
[data-alc-theme="dark"] #alc-root .alc-typing span {
  background: #999;
}
[data-alc-theme="dark"] #alc-root .alc-msg.alc-agent {
  background: #2d2d2d;
  color: #eee;
}
[data-alc-theme="dark"] #alc-root #alc-prechat {
  background: #1a1a1a;
  color: #eee;
}

@media (max-width:480px){
  #alc-root #alc-panel{right:16px;left:16px;width:auto;bottom:86px;height:70vh;}
  #alc-root #alc-bubble{right:16px;}
}