/* Generated by @comercii/demo-forge — AI receptionist surface. */

body {
  background-image: var(--wash), var(--grid);
  min-height: 100vh;
}

.chat-wrap {
  width: 100%;
  max-width: 660px;
  margin-inline: auto;
  padding: 26px 20px 32px;
}

.chat-intro {
  margin-bottom: 18px;
}

.chat-intro h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 6px;
}

.chat-intro p {
  margin: 0;
  font-size: 0.95rem;
}

.chat {
  background: var(--paper-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Fits a phone viewport without the page itself scrolling. */
  height: min(72vh, 620px);
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--paper);
}

.chat-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), var(--accent-deep));
  color: var(--paper-card);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
}

.chat-who {
  font-weight: 600;
  font-size: 0.96rem;
}

.chat-status {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot-online {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 82%;
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.msg-bot {
  align-self: flex-start;
  background: var(--paper-2);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.msg-user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--paper-card);
  border-bottom-right-radius: 4px;
}

.typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 4px;
  padding: 13px 15px;
  background: var(--paper-2);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}

.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: blink 1.3s infinite ease-in-out;
}

.typing span:nth-child(2) {
  animation-delay: 0.18s;
}

.typing span:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.3;
  }
  40% {
    opacity: 1;
  }
}

/* Chips sit directly under the log, above the composer — never floating in a
   dead gap between them. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 12px;
}

.chip {
  font: inherit;
  font-size: 0.87rem;
  color: var(--accent-deep);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 36px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.chip:hover {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.composer {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--paper);
}

.composer input {
  flex: 1;
  font: inherit;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  background: var(--paper-card);
  color: var(--text);
}

.composer input:focus-visible {
  border-color: var(--accent);
}

.chat-foot {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
