/* ================================================
   Hair Clinic Chatbot — CSS
   ================================================ */

:root {
  --hcc-color: #2563eb;
  --hcc-color-dark: #1d4ed8;
  --hcc-radius: 16px;
  --hcc-shadow: 0 8px 30px rgba(0,0,0,.18);
}

/* ── Toggle Button ── */
#hcc-toggle {
  position: fixed;
  bottom: 160px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--hcc-color);
  border: none;
  cursor: pointer;
  box-shadow: var(--hcc-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99998;
  transition: transform .2s, background .2s;
}
#hcc-toggle:hover { transform: scale(1.08); background: var(--hcc-color-dark); }
#hcc-toggle svg { width:28px; height:28px; fill:#fff; }
#hcc-toggle .hcc-badge {
  position:absolute; top:-4px; right:-4px;
  background:#ef4444; color:#fff; font-size:11px;
  width:18px; height:18px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-weight:700; opacity:0; transition:opacity .2s;
}
#hcc-toggle .hcc-badge.show { opacity:1; }

/* ── Window ── */
#hcc-window {
  position: fixed;
  bottom: 232px;
  width: 360px;
  max-height: 540px;
  background: #fff;
  border-radius: var(--hcc-radius);
  box-shadow: var(--hcc-shadow);
  display: flex;
  flex-direction: column;
  z-index: 99999;
  overflow: hidden;
  transform: scale(.92) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .2s;
}
#hcc-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* Position */
.hcc-right #hcc-toggle,
.hcc-right #hcc-window { right: 24px; }
.hcc-left  #hcc-toggle,
.hcc-left  #hcc-window { left: 24px; }

/* ── Header ── */
#hcc-header {
  background: var(--hcc-color);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
#hcc-header .hcc-avatar {
  width:38px; height:38px; background:rgba(255,255,255,.25);
  border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-size:20px;
}
#hcc-header .hcc-title { font-weight:700; font-size:15px; line-height:1.2; }
#hcc-header .hcc-subtitle { font-size:12px; opacity:.85; }
#hcc-header .hcc-close {
  margin-left:auto; background:none; border:none; color:#fff;
  cursor:pointer; font-size:20px; line-height:1; opacity:.8; transition:opacity .15s;
}
#hcc-header .hcc-close:hover { opacity:1; }

/* ── Lang Switcher ── */
#hcc-lang {
  display:flex; gap:0; flex-shrink:0;
  border-bottom:1px solid #e5e7eb;
}
#hcc-lang button {
  flex:1; padding:8px; border:none; background:#f9fafb;
  cursor:pointer; font-size:13px; font-weight:600; color:#6b7280;
  transition:all .15s;
}
#hcc-lang button.active {
  background:#fff; color:var(--hcc-color);
  border-bottom:2px solid var(--hcc-color);
}

/* ── Messages ── */
#hcc-messages {
  flex:1; overflow-y:auto; padding:14px 12px;
  display:flex; flex-direction:column; gap:10px;
  scroll-behavior:smooth;
}
#hcc-messages::-webkit-scrollbar { width:4px; }
#hcc-messages::-webkit-scrollbar-thumb { background:#d1d5db; border-radius:4px; }

.hcc-msg { display:flex; gap:8px; max-width:88%; animation: hccFadeIn .2s ease; }
@keyframes hccFadeIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:none} }

.hcc-msg.bot { align-self:flex-start; }
.hcc-msg.user { align-self:flex-end; flex-direction:row-reverse; }

.hcc-msg .hcc-bubble {
  padding:10px 13px; border-radius:14px; font-size:14px; line-height:1.55;
  white-space:pre-wrap; word-break:break-word;
}
.hcc-msg.bot  .hcc-bubble { background:#f3f4f6; color:#1f2937; border-bottom-left-radius:4px; }
.hcc-msg.user .hcc-bubble { background:var(--hcc-color); color:#fff; border-bottom-right-radius:4px; }
.hcc-msg.bot .hcc-bubble a { color:var(--hcc-color); font-weight:600; }
.hcc-msg.user .hcc-bubble a { color:#fff; }

.hcc-avatar-sm {
  width:28px; height:28px; border-radius:50%; background:var(--hcc-color);
  display:flex; align-items:center; justify-content:center;
  font-size:14px; flex-shrink:0; align-self:flex-end;
}

/* ── Typing indicator ── */
.hcc-typing .hcc-bubble {
  display:flex; gap:4px; align-items:center; padding:12px 14px;
}
.hcc-typing .dot {
  width:7px; height:7px; background:#9ca3af; border-radius:50%;
  animation: hccDot .9s infinite ease-in-out;
}
.hcc-typing .dot:nth-child(2) { animation-delay:.15s; }
.hcc-typing .dot:nth-child(3) { animation-delay:.30s; }
@keyframes hccDot { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-5px)} }

/* ── Quick Replies ── */
#hcc-quick { padding:6px 10px; display:flex; flex-wrap:wrap; gap:6px; flex-shrink:0; }
#hcc-quick button {
  padding:6px 12px; border-radius:20px; border:1.5px solid var(--hcc-color);
  background:#fff; color:var(--hcc-color); font-size:12.5px;
  cursor:pointer; font-weight:600; transition:all .15s;
}
#hcc-quick button:hover { background:var(--hcc-color); color:#fff; }

/* ── Related ── */
.hcc-related { margin-top:8px; display:flex; flex-direction:column; gap:4px; }
.hcc-related button {
  text-align:left; padding:5px 10px; border-radius:10px;
  border:1px solid #e5e7eb; background:#f9fafb; font-size:12.5px;
  color:#374151; cursor:pointer; transition:all .15s;
}
.hcc-related button:hover { border-color:var(--hcc-color); color:var(--hcc-color); background:#fff; }

/* ── Lead Form ── */
#hcc-lead-form {
  padding: 12px 14px;
  border-top: 1px solid #e5e7eb;
  background: #f8faff;
  flex-shrink: 0;
}
#hcc-lead-inner { display:flex; flex-direction:column; gap:7px; }
#hcc-lead-form input,
#hcc-lead-form select {
  width: 100%; padding: 8px 11px; border-radius: 8px;
  border: 1.5px solid #d1d5db; font-size: 13px;
  background: #fff; outline: none; box-sizing: border-box;
  transition: border .15s;
}
#hcc-lead-form input:focus,
#hcc-lead-form select:focus { border-color: var(--hcc-color); }
.hcc-lead-btn {
  flex: 1; padding: 8px; border-radius: 8px; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.hcc-lead-btn.primary { background: var(--hcc-color); color: #fff; }
.hcc-lead-btn.primary:hover { background: var(--hcc-color-dark); }
.hcc-lead-btn.secondary { background: #e5e7eb; color: #6b7280; }
.hcc-lead-btn.secondary:ho