/* ── Sampoorna Chatbot Widget ─────────────────────────────── */
:root {
  --sc-primary:   #e63946;
  --sc-primary-d: #c1121f;
  --sc-bg:        #ffffff;
  --sc-text:      #1d1d1d;
  --sc-muted:     #6b7280;
  --sc-border:    #e5e7eb;
  --sc-bot-bg:    #f3f4f6;
  --sc-user-bg:   #e63946;
  --sc-user-text: #ffffff;
  --sc-radius:    16px;
  --sc-shadow:    0 8px 32px rgba(0,0,0,0.18);
}

#sc-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sc-primary);
  border: none;
  cursor: pointer;
  box-shadow: var(--sc-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99998;
  transition: transform 0.2s, background 0.2s;
}
#sc-launcher:hover { background: var(--sc-primary-d); transform: scale(1.08); }
#sc-launcher svg   { width: 28px; height: 28px; fill: #fff; }

#sc-window {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 360px;
  height: 520px;
  background: var(--sc-bg);
  border-radius: var(--sc-radius);
  box-shadow: var(--sc-shadow);
  display: flex;
  flex-direction: column;
  z-index: 99999;
  overflow: hidden;
  transition: opacity 0.2s, transform 0.2s;
}
#sc-window.sc-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.97);
}

#sc-header {
  background: var(--sc-primary);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
#sc-header .sc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
#sc-header .sc-title   { font-weight: 600; font-size: 15px; }
#sc-header .sc-subtitle{ font-size: 11px; opacity: 0.85; }
#sc-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  opacity: 0.8;
}
#sc-close:hover { opacity: 1; }

#sc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

.sc-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}
.sc-msg.sc-bot  {
  background: var(--sc-bot-bg);
  color: var(--sc-text);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.sc-msg.sc-user {
  background: var(--sc-user-bg);
  color: var(--sc-user-text);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.sc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: flex-start;
  margin-top: -4px;
}
.sc-chip {
  background: #fff;
  border: 1.5px solid var(--sc-primary);
  color: var(--sc-primary);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.sc-chip:hover { background: var(--sc-primary); color: #fff; }

.sc-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  padding: 10px 14px;
  background: var(--sc-bot-bg);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.sc-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sc-muted);
  animation: sc-bounce 1.2s infinite;
}
.sc-typing span:nth-child(2) { animation-delay: 0.2s; }
.sc-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes sc-bounce {
  0%,80%,100% { transform: translateY(0); }
  40%          { transform: translateY(-6px); }
}

#sc-footer {
  border-top: 1px solid var(--sc-border);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
#sc-input {
  flex: 1;
  border: 1.5px solid var(--sc-border);
  border-radius: 22px;
  padding: 9px 14px;
  font-size: 14px;
  outline: none;
  resize: none;
  font-family: inherit;
  line-height: 1.4;
  max-height: 80px;
  overflow-y: auto;
}
#sc-input:focus { border-color: var(--sc-primary); }
#sc-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--sc-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
#sc-send:hover    { background: var(--sc-primary-d); }
#sc-send:disabled { background: var(--sc-border); cursor: not-allowed; }
#sc-send svg      { width: 18px; height: 18px; fill: #fff; }

/* Mobile */
@media (max-width: 480px) {
  #sc-window {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    border-radius: 0;
  }
  #sc-launcher { bottom: 16px; right: 16px; }
}
