:root {
  --bt-chat-navy: #1b365d;
  --bt-chat-amber: #e39b2b;
  --bt-chat-bg: #f4f6f9;
  --bt-chat-user: #1b365d;
  --bt-chat-bot: #ffffff;
}

.bt-chat-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #eef2f7 0%, #f8fafc 100%);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  color: #1e293b;
}

.bt-chat-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.bt-chat-shell header h1 {
  margin: 0 0 6px;
  font-size: 1.6rem;
  color: var(--bt-chat-navy);
}

.bt-chat-shell header p {
  margin: 0 0 18px;
  color: #475569;
}

.bt-chat-window {
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 16px;
  min-height: 420px;
  max-height: 62vh;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bt-chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.bt-chat-msg a {
  color: #0f4c81;
  font-weight: 600;
}

.bt-chat-msg.user {
  align-self: flex-end;
  background: var(--bt-chat-user);
  color: #fff;
}

.bt-chat-msg.bot {
  align-self: flex-start;
  background: var(--bt-chat-bg);
  border: 1px solid #e2e8f0;
}

.bt-chat-msg.error {
  align-self: stretch;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.bt-chat-products {
  display: grid;
  gap: 8px;
}

.bt-chat-product {
  display: block;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}

.bt-chat-product strong {
  display: block;
  color: var(--bt-chat-navy);
}

.bt-chat-product span {
  font-size: 0.85rem;
  color: #64748b;
}

.bt-chat-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.bt-chat-form textarea {
  flex: 1;
  min-height: 52px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}

.bt-chat-form button,
.bt-chat-rate button {
  background: var(--bt-chat-amber);
  color: #1b365d;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}

.bt-chat-rate {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.bt-chat-rate button {
  padding: 4px 10px;
  font-size: 0.85rem;
}

.bt-chat-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1080;
}

.bt-chat-launcher button {
  background: var(--bt-chat-navy);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(27, 54, 93, 0.28);
  cursor: pointer;
}

.bt-chat-popup {
  position: fixed;
  right: 18px;
  bottom: 78px;
  width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 110px));
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1080;
}

.bt-chat-popup.open {
  display: flex;
}

.bt-chat-popup header {
  background: var(--bt-chat-navy);
  color: #fff;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bt-chat-popup header button {
  background: transparent;
  color: #fff;
  border: 0;
  font-size: 1.2rem;
  cursor: pointer;
}

.bt-chat-popup .bt-chat-window {
  border: 0;
  border-radius: 0;
  flex: 1;
  max-height: none;
}

.bt-chat-popup .bt-chat-form {
  margin: 0;
  padding: 10px;
  border-top: 1px solid #e2e8f0;
}
