/* Firecracker Joe Chatbot v1 - intentionally self-contained */
#fjchat-launcher,
#fjchat-panel,
#fjchat-panel * {
  box-sizing: border-box;
}

#fjchat-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2147483000;
  border: 0;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  padding: 13px 18px;
  font: 700 14px/1.2 "Space Grotesk", Arial, sans-serif;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0,0,0,.35), 0 0 18px rgba(220,53,69,.35);
}

#fjchat-launcher:hover { filter: brightness(1.08); }

#fjchat-panel {
  position: fixed;
  right: 22px;
  bottom: 82px;
  z-index: 2147483001;
  width: min(390px, calc(100vw - 28px));
  height: min(600px, calc(100vh - 120px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  background: #111318;
  color: #e2e2e8;
  box-shadow: 0 18px 60px rgba(0,0,0,.5);
  font-family: Inter, Arial, sans-serif;
}

#fjchat-panel.fjchat-open { display: flex; }

#fjchat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #0a0c10;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

#fjchat-header strong {
  display: block;
  font-family: "Space Grotesk", Arial, sans-serif;
  font-size: 15px;
  color: #fff;
}

#fjchat-header small { color: #a8abb3; }

#fjchat-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}

#fjchat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #15171c;
}

.fjchat-message {
  max-width: 88%;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
  font-size: 14px;
}

.fjchat-bot {
  margin-right: auto;
  background: #24272d;
  color: #f3f3f5;
  border-bottom-left-radius: 3px;
}

.fjchat-user {
  margin-left: auto;
  background: #dc3545;
  color: #fff;
  border-bottom-right-radius: 3px;
}

.fjchat-message a { color: #ffb3b2; text-decoration: underline; }

#fjchat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: #0a0c10;
  border-top: 1px solid rgba(255,255,255,.1);
}

#fjchat-input {
  min-width: 0;
  flex: 1;
  border: 1px solid #484b52;
  border-radius: 8px;
  background: #1e2024;
  color: #fff;
  padding: 10px 11px;
  font: 14px Inter, Arial, sans-serif;
  outline: none;
}

#fjchat-input:focus { border-color: #dc3545; }

#fjchat-send {
  border: 0;
  border-radius: 8px;
  background: #dc3545;
  color: #fff;
  padding: 0 15px;
  font-weight: 700;
  cursor: pointer;
}

#fjchat-send:disabled,
#fjchat-input:disabled {
  opacity: .6;
  cursor: wait;
}

#fjchat-disclaimer {
  padding: 0 12px 10px;
  background: #0a0c10;
  color: #777b84;
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
}

@media (max-width: 520px) {
  #fjchat-launcher { right: 14px; bottom: 14px; }
  #fjchat-panel {
    right: 14px;
    bottom: 70px;
    width: calc(100vw - 28px);
    height: min(620px, calc(100vh - 92px));
  }
}
