/* Floating site-wide Blackbook Gemini 4 Carbon Co-Pilot widget */
.bb-gem-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 4200;
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
  color: #f3f0e8;
}
body[data-page="trade"] .bb-gem-root,
.bb-gem-root.bb-gem-left {
  right: auto;
  left: 16px;
  bottom: 16px;
}
.bb-gem-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid rgba(78, 207, 161, 0.55);
  background: linear-gradient(135deg, #111815 0%, #17211d 100%);
  color: #f3f0e8;
  font: 600 13px/1 "Instrument Sans", system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.bb-gem-pill:hover {
  transform: translateY(-1px);
  border-color: #4ecfa1;
}
.bb-gem-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ecfa1;
  box-shadow: 0 0 8px rgba(78, 207, 161, 0.75);
}
.bb-gem-panel {
  width: min(390px, calc(100vw - 28px));
  max-height: min(560px, calc(100vh - 84px));
  margin-bottom: 10px;
  border-radius: 12px;
  border: 1px solid #2b3531;
  background: #101413;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.62);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.bb-gem-panel[hidden] {
  display: none;
}
.bb-gem-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 13px;
  border-bottom: 1px solid #222926;
  background: #141917;
}
.bb-gem-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.bb-gem-sub {
  margin: 2px 0 0;
  font-size: 11px;
  color: #8fa39a;
}
.bb-gem-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bb-gem-icon-btn {
  border: 1px solid #2a332f;
  background: #18201d;
  color: #dbe3de;
  border-radius: 6px;
  min-width: 28px;
  height: 28px;
  font-size: 12px;
  cursor: pointer;
}
.bb-gem-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 9px 12px 6px;
  border-bottom: 1px solid #1d2320;
}
.bb-gem-chip {
  border: 1px solid #2c3531;
  background: #161c1a;
  color: #dce5df;
  border-radius: 999px;
  padding: 5px 10px;
  font: 600 11.5px/1.1 "Instrument Sans", sans-serif;
  cursor: pointer;
}
.bb-gem-chip:hover {
  border-color: #4ecfa1;
  color: #4ecfa1;
}
.bb-gem-log {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.45;
}
.bb-gem-msg {
  padding: 8px 10px;
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}
.bb-gem-msg.user {
  align-self: flex-end;
  max-width: 85%;
  background: #1d2a24;
  border: 1px solid rgba(78, 207, 161, 0.35);
}
.bb-gem-msg.bot {
  align-self: flex-start;
  max-width: 96%;
  background: #151918;
  border: 1px solid #262e2a;
}
.bb-gem-msg small {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #4ecfa1;
  margin-bottom: 3px;
}
.bb-gem-form {
  display: flex;
  gap: 6px;
  padding: 9px 11px;
  border-top: 1px solid #222926;
  background: #121715;
}
.bb-gem-form input {
  flex: 1 1 auto;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid #2d3733;
  background: #0c0f0e;
  color: #f3f0e8;
  font-size: 12.5px;
}
.bb-gem-send {
  height: 34px;
  padding: 0 13px;
  border-radius: 7px;
  border: 1px solid #4ecfa1;
  background: #4ecfa1;
  color: #0b110f;
  font: 700 12.5px/1 "Instrument Sans", sans-serif;
  cursor: pointer;
}
.bb-gem-send:disabled {
  opacity: 0.55;
  cursor: wait;
}
@media (max-width: 640px) {
  .bb-gem-root, body[data-page="trade"] .bb-gem-root {
    right: 12px;
    left: auto;
    bottom: 12px;
  }
}
