/* ============================================================
   Elyus — Chatbot Widget Styles
   ============================================================ */

#elyChatWidget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Collapsed pill ─────────────────────────────────────── */
#elyChatPill {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  background: linear-gradient(135deg, #090d1c, #18245c);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(10,14,30,0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
#elyChatPill svg { width: 16px; height: 16px; flex-shrink: 0; }
#elyChatPill:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(10,14,30,0.4); }

/* Collapsed state */
#elyChatWidget.ely-collapsed #elyChatPill   { display: flex; }
#elyChatWidget.ely-collapsed #elyChatWindow { display: none; }

/* ── Chat window ────────────────────────────────────────── */
#elyChatWindow {
  display: flex;
  flex-direction: column;
  width: 340px;
  max-width: calc(100vw - 48px);
  height: 500px;
  max-height: calc(100vh - 60px);
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(10,14,30,0.09);
  box-shadow: 0 8px 48px rgba(10,14,30,0.18), 0 2px 12px rgba(10,14,30,0.07);
  overflow: hidden;
  animation: ely-rise 0.32s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes ely-rise {
  from { opacity:0; transform:translateY(14px) scale(0.97); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}

/* ── Header ─────────────────────────────────────────────── */
.ely-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  background: linear-gradient(135deg, #090d1c 0%, #18245c 100%);
  flex-shrink: 0;
}
.ely-av {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #3a56ff, #7a8fff);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: #fff; flex-shrink: 0;
}
.ely-hinfo  { flex: 1; min-width: 0; }
.ely-hname  { font-size: 13.5px; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.ely-hstatus {
  font-size: 11px; color: rgba(255,255,255,0.55);
  display: flex; align-items: center; gap: 4px; margin-top: 2px;
}
.ely-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #2ecc71; box-shadow: 0 0 5px rgba(46,204,113,0.6); flex-shrink: 0;
}
.ely-close-btn {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.65);
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}
.ely-close-btn:hover { background: rgba(255,255,255,0.22); color: #fff; }
.ely-close-btn svg { width: 14px; height: 14px; }

/* ── Messages ───────────────────────────────────────────── */
.ely-msgs {
  flex: 1; overflow-y: auto;
  padding: 14px 13px; display: flex;
  flex-direction: column; gap: 7px;
  background: #f4f5fb; scroll-behavior: smooth;
}
.ely-msgs::-webkit-scrollbar { width: 3px; }
.ely-msgs::-webkit-scrollbar-thumb { background: #c8ccdf; border-radius: 3px; }

/* ── Bubbles ────────────────────────────────────────────── */
.ely-bubble {
  max-width: 86%; padding: 9px 12px; border-radius: 15px;
  font-size: 13px; line-height: 1.6; word-break: break-word;
  animation: ely-popin 0.24s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes ely-popin {
  from { opacity:0; transform:translateY(6px) scale(0.95); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}
.ely-bot  { background:#fff; color:#0a0a0f; align-self:flex-start; border-bottom-left-radius:4px; box-shadow:0 1px 3px rgba(10,14,30,0.07); }
.ely-user { background:linear-gradient(135deg,#3a56ff,#2543e0); color:#fff; align-self:flex-end; border-bottom-right-radius:4px; }

/* Typing dots */
.ely-typing { display:flex !important; align-items:center; gap:4px; padding:11px 14px; width:fit-content; }
.ely-typing span { width:6px; height:6px; border-radius:50%; background:#9aa1c4; animation:ely-bounce 1.3s ease-in-out infinite; }
.ely-typing span:nth-child(2) { animation-delay:.18s; }
.ely-typing span:nth-child(3) { animation-delay:.36s; }
@keyframes ely-bounce {
  0%,80%,100% { transform:translateY(0); opacity:0.4; }
  40%          { transform:translateY(-5px); opacity:1; }
}

/* ── Footer ─────────────────────────────────────────────── */
.ely-footer {
  background: #fff;
  border-top: 1px solid #e8eaf4;
  flex-shrink: 0;
}

/* Chips / CTAs row */
.ely-chips-row {
  padding: 10px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ely-chips-row:empty { padding: 0; }

/* CTA buttons */
.ely-cta {
  display: block; text-align: center;
  padding: 9px 14px;
  background: #0a0a0f; color: #fff;
  border-radius: 999px; font-size: 12.5px; font-weight: 600;
  text-decoration: none; letter-spacing: -0.01em;
  transition: background 0.2s ease, transform 0.15s ease;
}
.ely-cta:hover { background: #3a56ff; transform: translateY(-1px); }
.ely-cta-ghost {
  background: transparent; color: #0a0a0f;
  border: 1.5px solid #e0e3f0;
}
.ely-cta-ghost:hover { background: #f4f5fb; border-color: rgba(10,14,30,0.22); }

/* Chips */
.ely-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ely-chip {
  padding: 5px 11px; border-radius: 999px;
  border: 1.5px solid #e0e3f0; background: #fff; color: #0a0a0f;
  font-family: inherit; font-size: 12px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.12s;
}
.ely-chip:hover { border-color:#3a56ff; color:#3a56ff; background:rgba(58,86,255,.05); transform:translateY(-1px); }

/* ── Input row ──────────────────────────────────────────── */
.ely-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 12px;
}
#elyChatInput {
  flex: 1;
  height: 38px;
  padding: 0 13px;
  border: 1.5px solid #e0e3f0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  color: #0a0a0f;
  background: #f8f9fd;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
#elyChatInput::placeholder { color: #9aa1c4; }
#elyChatInput:focus { border-color: #3a56ff; background: #fff; }

#elyChatSend {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #3a56ff, #2543e0);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 10px rgba(58,86,255,0.35);
}
#elyChatSend:hover { transform: scale(1.08); box-shadow: 0 4px 16px rgba(58,86,255,0.5); }
#elyChatSend svg { width: 14px; height: 14px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
  #elyChatWidget { bottom: 16px; right: 16px; }
  #elyChatWindow { width: calc(100vw - 32px); height: 70vh; }
}
