/* Light theme chat — centered and responsive */
:root {
  --bg: #f7f9fc;
  --panel: #ffffff;
  --ink: #111;
  --muted: #5d6b7a;
  --line: #e6e9ef;
  --accent: #0a7bdc;
  --user: #e8f3ff;
  --bot: #f5f7fb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.chat-shell {
  max-width: 900px;
  margin: 40px auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 32px rgba(0,0,0,.06);
}

.chat-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.chat-title {
  font-weight: 700;
  font-size: 18px;
}

.chat-sub {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

.chat-window {
  height: 480px;
  overflow-y: auto;
  padding: 18px;
  background: linear-gradient(180deg, #fff 0%, #fafbfe 100%);
}

.msg {
  display: flex;
  margin: 10px 0;
}

.msg.user {
  justify-content: flex-end;
}

.bubble {
  max-width: 72%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  line-height: 1.5;
}

.msg.user .bubble {
  background: var(--user);
  border-color: #d7e9ff;
}

.msg.bot .bubble {
  background: var(--bot);
}

.typing .bubble {
  width: 74px;
}

.dots {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.dots i {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--muted);
  border-radius: 50%;
  opacity: 0.5;
  animation: blink 1.4s infinite ease-in-out;
}
.dots i:nth-child(2){ animation-delay: .2s; }
.dots i:nth-child(3){ animation-delay: .4s; }

@keyframes blink {
  0%, 80%, 100% { transform: translateY(0); opacity: .5; }
  40% { transform: translateY(-3px); opacity: 1; }
}

.composer {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
}
.input:focus {
  border-color: #c5d3e6;
  box-shadow: 0 0 0 3px rgba(10,123,220,.1);
}

.send {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}
.send:hover { filter: brightness(0.95); }

.chat-footer {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 14px;
}
.chat-footer img {
  height: 18px;
  width: auto;
  filter: grayscale(100%);
  opacity: 0.75;
}
