/* Visual language reused from the official Colosseum Cleaning chatbot UI.
   Content, rates, and unapproved services are not reused. */
:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel2: #202530;
  --text: #f5f7fa;
  --muted: #aab2c0;
  --accent: #c9a227;
  --user: #2f6fed;
  --bot: #2a303b;
  --danger: #c45c5c;
  --ok: #3d9a6a;
}

.cr-reset, .cr-reset * { box-sizing: border-box; }

.cr-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99980;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #111;
  font-weight: 800;
  font-size: 22px;
  font-family: Arial, Helvetica, sans-serif;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}

.cr-panel {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 99990;
  width: min(400px, calc(100vw - 24px));
  height: min(640px, calc(100vh - 120px));
  background: var(--panel);
  color: var(--text);
  border: 1px solid #2a2f39;
  border-radius: 18px;
  overflow: hidden;
  display: none;
  grid-template-rows: auto auto 1fr auto auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  font-family: Arial, Helvetica, sans-serif;
}
.cr-panel.cr-open { display: grid; }
.cr-panel.cr-standalone {
  position: relative;
  right: auto;
  bottom: auto;
  width: min(920px, 100%);
  height: 85vh;
  min-height: 620px;
  z-index: 1;
}

.cr-header {
  padding: 16px 18px;
  background: #11141a;
  border-bottom: 1px solid #2a2f39;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cr-logo {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #111;
  font-weight: 800;
  font-size: 22px;
  flex: 0 0 auto;
}
.cr-header h1 { font-size: 16px; margin: 0; font-weight: 700; }
.cr-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.cr-header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.cr-human-btn, .cr-close-btn {
  background: #242a34;
  color: #fff;
  border: 1px solid #38404d;
  border-radius: 999px;
  padding: 8px 11px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
}
.cr-human-btn:hover, .cr-close-btn:hover { border-color: var(--accent); }
.cr-human-btn { font-weight: 700; }

.cr-banner {
  background: #2a2314;
  color: #e8d7a0;
  font-size: 11px;
  padding: 8px 14px;
  border-bottom: 1px solid #3a3424;
}

.cr-messages {
  padding: 16px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(180deg, #171a21, #14171d);
}
.cr-msg {
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 14px;
  line-height: 1.42;
  white-space: pre-wrap;
  font-size: 14px;
}
.cr-msg.bot { align-self: flex-start; background: var(--bot); border-bottom-left-radius: 4px; }
.cr-msg.user { align-self: flex-end; background: var(--user); border-bottom-right-radius: 4px; }
.cr-msg.system { align-self: center; max-width: 94%; background: #1b2230; color: var(--muted); font-size: 12px; }

.cr-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.cr-chip {
  background: #242a34;
  color: #fff;
  border: 1px solid #38404d;
  border-radius: 999px;
  padding: 8px 11px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}
.cr-chip:hover { border-color: var(--accent); }

.cr-lead {
  display: none;
  padding: 12px 14px;
  background: #151820;
  border-top: 1px solid #2a2f39;
  gap: 8px;
  flex-direction: column;
}
.cr-lead.cr-show { display: flex; }
.cr-lead h2 { margin: 0 0 4px; font-size: 13px; }
.cr-lead p { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.cr-lead label { font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.cr-lead input, .cr-lead textarea {
  background: #1e232c;
  color: #fff;
  border: 1px solid #333b48;
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.cr-lead input:focus, .cr-lead textarea:focus { border-color: var(--accent); }
.cr-lead textarea { min-height: 56px; resize: vertical; }
.cr-lead-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cr-lead-actions { display: flex; gap: 8px; }
.cr-lead button {
  background: var(--accent);
  color: #111;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.cr-lead button[type="button"] { background: #242a34; color: #fff; }
.cr-lead .cr-err { color: #f0a0a0; font-size: 12px; display: none; }
.cr-pending { font-size: 11px; color: #c9b57a; }

.cr-form {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: #11141a;
  border-top: 1px solid #2a2f39;
}
.cr-form input {
  flex: 1;
  background: #1e232c;
  color: #fff;
  border: 1px solid #333b48;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.cr-form input:focus { border-color: var(--accent); }
.cr-form button[type="submit"] {
  background: var(--accent);
  color: #111;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* Lead form layout fixes (lead capture): keep the form inside the panel and scrollable. */
.cr-panel { grid-template-columns: minmax(0, 1fr); }
.cr-lead { max-height: min(340px, 50vh); overflow-y: auto; min-width: 0; position: relative; }
.cr-lead input, .cr-lead textarea { width: 100%; min-width: 0; }
.cr-lead label, .cr-lead-row > * { min-width: 0; }
.cr-messages { min-height: 90px; min-width: 0; }
.cr-lead textarea { min-height: 44px; }
.cr-lead h2 { color: var(--text); }
.cr-lead .cr-lead-copy { display: none; }
.cr-lead { gap: 6px; padding: 10px 14px; }
