/* ============================================
   SAM DEMO WIDGET — styles
   ============================================ */

.sd-container {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  overflow: hidden;
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* Header */
.sd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #2a2a2a;
  background: #141414;
  flex-shrink: 0;
}

.sd-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  flex-shrink: 0;
}

.sd-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f0ebe0;
  margin: 0;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sd-sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  color: #71717a;
  margin: 0;
  line-height: 1.4;
}

/* Messages */
.sd-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 280px;
  max-height: 360px;
  scrollbar-width: thin;
  scrollbar-color: #2a2a2a transparent;
}

.sd-messages::-webkit-scrollbar { width: 4px; }
.sd-messages::-webkit-scrollbar-track { background: transparent; }
.sd-messages::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 2px; }

/* Empty state */
.sd-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  gap: 6px;
  text-align: center;
}

.sd-empty-title {
  font-family: 'Inter', sans-serif;
  color: #a1a1aa;
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0;
}

.sd-empty-sub {
  font-family: 'Inter', sans-serif;
  color: #71717a;
  font-size: 0.78rem;
  margin: 0;
  line-height: 1.6;
}

/* Message rows */
.sd-msg-row {
  display: flex;
}

.sd-msg-row-user { justify-content: flex-end; }
.sd-msg-row-sam  { justify-content: flex-start; }

/* Bubbles */
.sd-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  line-height: 1.55;
  word-break: break-word;
}

.sd-bubble-user {
  background: rgba(249, 115, 22, 0.15);
  color: #fed7aa;
  border-bottom-right-radius: 4px;
}

.sd-bubble-sam {
  background: #27272a;
  color: #f4f4f5;
  border-bottom-left-radius: 4px;
}

/* Typing indicator */
.sd-bubble-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 16px;
}

.sd-typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #71717a;
  display: inline-block;
  animation: sd-bounce 1.2s infinite ease-in-out;
}

.sd-typing-dot:nth-child(1) { animation-delay: 0s; }
.sd-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.sd-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes sd-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-5px); }
}

/* Input row */
.sd-input-row {
  display: flex;
  gap: 8px;
  padding: 8px 12px 12px;
  border-top: 1px solid #2a2a2a;
  flex-shrink: 0;
}

.sd-input {
  flex: 1;
  background: #27272a;
  border: 1px solid #3f3f46;
  border-radius: 8px;
  padding: 10px 13px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: #f4f4f5;
  outline: none;
  transition: border-color 0.2s;
}

.sd-input::placeholder { color: #71717a; }
.sd-input:focus { border-color: #f97316; }

.sd-send {
  background: #f97316;
  color: #fff;
  border: none;
  border-radius: 8px;
  width: 42px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, opacity 0.2s;
  line-height: 1;
}

.sd-send:hover:not(:disabled) { background: #ea6c0a; }
.sd-send:disabled { opacity: 0.4; cursor: not-allowed; }
