/* ReBornFounder AI Agent — widget.css
   Self-contained: defines its own --rbf-* custom properties with the site's
   real brand values as defaults, so it renders correctly regardless of
   which page-level variable names (--accent vs --cyan, --text vs --white)
   happen to be defined on the host page. */

.rbf-agent-widget {
  --rbf-bg: #05101f;
  --rbf-bg2: #081828;
  --rbf-accent: #00c8ff;
  --rbf-gold: #f5a623;
  --rbf-text: #ffffff;
  --rbf-muted: #8ba4c8;
  --rbf-border: rgba(255, 255, 255, 0.12);
  --rbf-font-head: 'Syne', sans-serif;
  --rbf-font-body: 'DM Sans', sans-serif;

  position: fixed;
  right: 24px;
  bottom: 96px; /* stacked above the existing WhatsApp float button */
  z-index: 9998;
  font-family: var(--rbf-font-body);
}

.rbf-agent-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, var(--rbf-accent), #0077ff);
  color: #041018;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-family: var(--rbf-font-head);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 200, 255, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.rbf-agent-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 200, 255, 0.45);
}

.rbf-agent-panel {
  display: none;
  flex-direction: column;
  position: absolute;
  bottom: 60px;
  right: 0;
  width: min(360px, 90vw);
  height: min(480px, 70vh);
  background: var(--rbf-bg);
  border: 1px solid var(--rbf-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.rbf-agent-panel.rbf-open {
  display: flex;
}

.rbf-agent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--rbf-bg2);
  border-bottom: 1px solid var(--rbf-border);
}

.rbf-agent-header-title {
  font-family: var(--rbf-font-head);
  font-weight: 800;
  font-size: 15px;
  color: var(--rbf-text);
}

.rbf-agent-header-title span {
  color: var(--rbf-accent);
}

.rbf-agent-close {
  background: transparent;
  border: none;
  color: var(--rbf-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.rbf-agent-close:hover {
  color: var(--rbf-text);
}

.rbf-agent-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rbf-agent-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.rbf-agent-msg-user {
  align-self: flex-end;
  background: var(--rbf-accent);
  color: #041018;
  border-bottom-right-radius: 4px;
}

.rbf-agent-msg-agent {
  align-self: flex-start;
  background: var(--rbf-bg2);
  color: var(--rbf-text);
  border: 1px solid var(--rbf-border);
  border-bottom-left-radius: 4px;
}

.rbf-agent-msg-typing {
  align-self: flex-start;
  color: var(--rbf-muted);
  font-size: 13px;
  font-style: italic;
}

.rbf-agent-input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--rbf-border);
  background: var(--rbf-bg2);
}

.rbf-agent-input {
  flex: 1;
  background: var(--rbf-bg);
  color: var(--rbf-text);
  border: 1px solid var(--rbf-border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--rbf-font-body);
  resize: none;
}

.rbf-agent-input:focus {
  outline: none;
  border-color: var(--rbf-accent);
}

.rbf-agent-send {
  background: linear-gradient(90deg, var(--rbf-accent), #0077ff);
  color: #041018;
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  font-family: var(--rbf-font-head);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.rbf-agent-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .rbf-agent-widget {
    right: 12px;
    bottom: 84px;
  }
  .rbf-agent-panel {
    width: 92vw;
  }
}
