/* Restaurant AI Receptionist — UI styles */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.container {
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Voice Call Card ─────────────────────────────────── */

.call-card {
  background: linear-gradient(135deg, #1e1b4b, #1e293b);
  border: 1px solid #3730a3;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.call-info { flex: 1; }
.call-info h2 { font-size: 16px; font-weight: 600; color: #c7d2fe; margin-bottom: 4px; }
.call-info p  { font-size: 13px; color: #6b7280; }

.call-status {
  font-size: 12px;
  color: #4ade80;
  margin-top: 6px;
  display: none;
}
.call-status.visible { display: block; }

.call-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.call-btn.idle {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}
.call-btn.idle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(16, 185, 129, 0.55);
}

.call-btn.active {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
  animation: callPulse 1.5s infinite;
}
.call-btn.active:hover { transform: scale(1.08); }

.call-btn.connecting {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
  cursor: not-allowed;
}

@keyframes callPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4); }
  50%       { box-shadow: 0 4px 32px rgba(239, 68, 68, 0.75); }
}

.vol-bars {
  display: none;
  gap: 3px;
  align-items: flex-end;
  height: 20px;
  margin-top: 8px;
}
.vol-bars.visible { display: flex; }
.vol-bars span {
  width: 4px;
  background: #4ade80;
  border-radius: 2px;
  animation: volBounce 0.6s infinite alternate;
}
.vol-bars span:nth-child(1) { height: 6px;  animation-delay: 0s; }
.vol-bars span:nth-child(2) { height: 14px; animation-delay: 0.1s; }
.vol-bars span:nth-child(3) { height: 10px; animation-delay: 0.2s; }
.vol-bars span:nth-child(4) { height: 18px; animation-delay: 0.15s; }
.vol-bars span:nth-child(5) { height: 8px;  animation-delay: 0.05s; }

@keyframes volBounce {
  from { transform: scaleY(0.4); }
  to   { transform: scaleY(1); }
}

/* ── No-Vapi warning ─────────────────────────────────── */

.no-vapi {
  background: #1c1917;
  border: 1px solid #44403c;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: #a8a29e;
  text-align: center;
}

/* ── Chat Card ───────────────────────────────────────── */

.chat-card {
  background: #1e293b;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  height: 65vh;
}

.chat-header {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-avatar {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.chat-header h1 { font-size: 16px; font-weight: 600; }
.chat-header p  { font-size: 12px; opacity: 0.75; }

.status-dot {
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.messages::-webkit-scrollbar { width: 4px; }
.messages::-webkit-scrollbar-thumb { background: #334155; border-radius: 2px; }

.msg {
  display: flex;
  gap: 8px;
  max-width: 82%;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.msg.agent .msg-avatar { background: linear-gradient(135deg, #7c3aed, #2563eb); }
.msg.user  .msg-avatar { background: #334155; }

.bubble {
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-line;
}
.msg.agent .bubble { background: #273549; border-bottom-left-radius: 3px; }
.msg.user  .bubble { background: #2563eb; border-bottom-right-radius: 3px; }

.typing { display: flex; gap: 4px; padding: 10px 13px; }
.typing span {
  width: 6px;
  height: 6px;
  background: #64748b;
  border-radius: 50%;
  animation: bounce 1.2s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-5px); }
}

/* ── Input area ──────────────────────────────────────── */

.input-area {
  padding: 12px 16px;
  background: #0f172a;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

textarea {
  flex: 1;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 9px 13px;
  color: #e2e8f0;
  font-size: 14px;
  resize: none;
  outline: none;
  font-family: inherit;
  max-height: 100px;
  transition: border-color 0.2s;
}
textarea:focus { border-color: #7c3aed; }
textarea::placeholder { color: #475569; }

.send-btn {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.2s;
}
.send-btn:hover    { opacity: 0.85; }
.send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.reset-btn {
  background: transparent;
  border: 1px solid #334155;
  color: #64748b;
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}
.reset-btn:hover { border-color: #475569; color: #94a3b8; }

/* ── Footer ──────────────────────────────────────────── */

.footer {
  text-align: center;
  font-size: 11px;
  color: #334155;
  padding: 4px 0 8px;
}
