/* Zilkee chat — shared styles. Plain CSS, no framework. */
:root {
  --bg: #0f1216;
  --panel: #171b21;
  --panel-2: #1e242c;
  --border: #2a313b;
  --text: #e6e9ee;
  --muted: #8b95a3;
  --accent: #4f8cff;
  --accent-2: #3a6fd6;
  --user-bubble: #4f8cff;
  --assistant-bubble: #232a33;
  --error: #ff6b6b;
  --error-bg: #3a1f23;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

.chat-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 760px;
  margin: 0 auto;
  background: var(--panel);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
}
.chat-header .logo {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  flex: 0 0 auto;
}
.chat-header .title { font-weight: 600; }
.chat-header .sub { color: var(--muted); font-size: 12px; }

.banner {
  padding: 10px 18px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.banner.error { background: var(--error-bg); color: var(--error); }
.banner.info { background: var(--panel-2); color: var(--muted); }

.messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg-row { display: flex; }
.msg-row.user { justify-content: flex-end; }
.msg-row.assistant { justify-content: flex-start; }

.bubble {
  max-width: 76%;
  padding: 10px 14px;
  border-radius: var(--radius);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.msg-row.user .bubble {
  background: var(--user-bubble);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-row.assistant .bubble {
  background: var(--assistant-bubble);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

/* typing indicator */
.bubble.thinking { display: flex; gap: 5px; align-items: center; padding: 14px; }
.bubble.thinking .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted);
  animation: blink 1.2s infinite ease-in-out both;
}
.bubble.thinking .dot:nth-child(2) { animation-delay: .2s; }
.bubble.thinking .dot:nth-child(3) { animation-delay: .4s; }
@keyframes blink {
  0%, 80%, 100% { opacity: .25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.composer {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: var(--panel-2);
}
.composer textarea {
  flex: 1 1 auto;
  resize: none;
  min-height: 44px;
  max-height: 140px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font: inherit;
}
.composer textarea:focus { outline: none; border-color: var(--accent); }
.composer button {
  flex: 0 0 auto;
  padding: 0 20px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.composer button:hover:not(:disabled) { background: var(--accent-2); }
.composer button:disabled { opacity: .5; cursor: default; }

/* dev helper panel */
.dev-panel {
  position: fixed;
  bottom: 16px; right: 16px;
  width: 320px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
  z-index: 50;
}
.dev-panel h3 { margin: 0 0 4px; font-size: 13px; }
.dev-panel p { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.dev-panel input {
  width: 100%;
  padding: 9px 11px;
  margin-bottom: 8px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font: inherit;
}
.dev-panel button {
  width: 100%;
  padding: 9px;
  border: none;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.dev-panel .dev-status { margin-top: 8px; font-size: 12px; color: var(--muted); min-height: 16px; }
.dev-badge {
  display: inline-block;
  font-size: 10px;
  background: #5a3a00;
  color: #ffcf80;
  padding: 1px 6px;
  border-radius: 5px;
  margin-left: 6px;
  vertical-align: middle;
}
