html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: #ffffff;
  color: #1b1b1b;
}

#root {
  height: 100%;
  width: 100%;
}

.page {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.bar {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #e1e1e1;
}

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

.note {
  font-size: 13px;
  color: #616161;
}

.newchat {
  margin-left: auto;
  font: inherit;
  font-size: 14px;
  padding: 4px 12px;
  border: 1px solid #c7c7c7;
  border-radius: 4px;
  background: #ffffff;
  color: #1b1b1b;
  cursor: pointer;
}

.newchat[disabled] {
  opacity: 0.5;
  cursor: default;
}

/* Tables in the agent's replies: lines and room between cells, so a
   number and the next column's text never run together. */
.transcript table {
  border-collapse: collapse;
  margin: 6px 0;
}

.transcript th,
.transcript td {
  border: 1px solid #e1e1e1;
  padding: 4px 10px;
  text-align: left;
  vertical-align: top;
}

.transcript th {
  background: #f5f5f5;
  font-weight: 600;
}

.notice {
  margin: 12px 16px 0;
  padding: 10px 12px;
  border: 1px solid #d13438;
  border-radius: 4px;
  background: #fde7e9;
}

.signin {
  display: flex;
  justify-content: center;
  padding: 48px 16px;
}

.signin button {
  font: inherit;
  font-size: 16px;
  padding: 10px 20px;
  border: 1px solid #0f6cbd;
  border-radius: 4px;
  background: #0f6cbd;
  color: #ffffff;
  cursor: pointer;
}

.signin button[disabled] {
  opacity: 0.6;
  cursor: default;
}

.chat {
  flex: 1;
  min-height: 0;
}

/* The chat: the transcript, the waiting row, the text box. */
.chat-column {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.transcript {
  flex: 1;
  min-height: 0;
}

.sendbox {
  padding: 0 12px 12px;
}

/* The waiting row keeps its height when idle so nothing jumps. */
.wait {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 2px 20px;
  font-size: 13px;
  color: #616161;
}

.wait-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0f6cbd;
  animation: wait-pulse 1.2s ease-in-out infinite;
}

.wait-clock {
  color: #8a8a8a;
  font-variant-numeric: tabular-nums;
}

.wait-queued {
  color: #8a8a8a;
}

.wait-queued::before {
  content: "\00b7";
  margin-right: 8px;
}

.wait:not(.is-busy) .wait-queued::before {
  content: none;
}

@keyframes wait-pulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}
