/* Flask Voice Agent widget styles */
:root {
  --bg: #0f1220;
  --card: #1a1f35;
  --accent: #6c5ce7;
  --accent-2: #a29bfe;
  --text: #eef0ff;
  --muted: #9aa0c3;
  --ok: #2ecc71;
  --warn: #f39c12;
}

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

body.page {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px;
}

body { background: transparent; }

.hero { max-width: 640px; text-align: center; }
.hero h1 { font-size: 1.7rem; margin-bottom: 10px; }
.hero p { color: var(--muted); line-height: 1.5; }
.hero code { background: #262c4a; padding: 2px 6px; border-radius: 6px; }

.agent-card {
  width: min(380px, 94vw);
  background: var(--card);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.agent-card header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.agent-card h1 { font-size: 1.05rem; font-weight: 600; flex: 1; }

.status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}
.status-dot.busy { background: var(--warn); box-shadow: 0 0 8px var(--warn); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }

.badge {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em;
  background: #262c4a; color: var(--accent-2);
  padding: 3px 8px; border-radius: 999px;
}

.conversation {
  min-height: 170px; max-height: 300px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  background: #131729; border-radius: 14px; padding: 12px;
}
.hint { color: var(--muted); font-size: 0.85rem; text-align: center; margin: auto; }

.bubble {
  max-width: 85%; padding: 8px 12px; border-radius: 14px;
  font-size: 0.88rem; line-height: 1.4;
}
.bubble.you  { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.bubble.bot  { align-self: flex-start; background: #262c4a; color: var(--text); border-bottom-left-radius: 4px; }
.bubble.error { align-self: center; background: #4a2030; color: #ff9db5; font-size: 0.8rem; }

.controls {
  display: flex; align-items: center; gap: 14px; justify-content: center;
}

#micButton {
  width: 62px; height: 62px; border-radius: 50%;
  border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; display: grid; place-items: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#micButton:hover { transform: scale(1.05); }
#micButton.recording {
  background: linear-gradient(135deg, #e74c3c, #ff7675);
  box-shadow: 0 0 0 8px rgba(231, 76, 60, 0.15);
  animation: pulse 1s infinite;
}
#micButton:disabled { opacity: 0.5; cursor: wait; }

#micHint { color: var(--muted); font-size: 0.85rem; }

footer { text-align: center; }
footer a { color: var(--muted); font-size: 0.72rem; text-decoration: none; }
