:root {
  color-scheme: light;
  --accent: #0f766e;
  --line: #d9e0e5;
  --text: #172026;
  --muted: #65727d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: transparent;
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

button,
textarea {
  font: inherit;
}

.widget {
  width: min(380px, 100vw);
  height: min(560px, 100vh);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(23, 32, 38, 0.18);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: #f8fafc;
  background: #1f2933;
}

header div {
  display: grid;
  gap: 2px;
}

header span,
header small {
  color: #b7c2cc;
  font-size: 12px;
}

.widget-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding: 14px;
  background: #f5f7f8;
}

.widget-messages article {
  max-width: 86%;
  border-radius: 8px;
  padding: 10px 12px;
  line-height: 1.45;
}

.widget-messages .user {
  justify-self: end;
  color: #fff;
  background: var(--accent);
}

.widget-messages .bot {
  justify-self: start;
  background: #fff;
  border: 1px solid var(--line);
}

.widget-input {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

textarea {
  width: 100%;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  outline: none;
}

.widget-input div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

button {
  border: 0;
  border-radius: 6px;
  padding: 9px 12px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
}

#widgetRecordBtn {
  color: var(--text);
  background: #e7ecef;
}
