/* ==========================================================================
   RankForge AI BYOK Chatbot Stylesheet
   Styles for Widget, Full-Page Analyst, and Embedded Triggers
   ========================================================================== */

/* ---- BASE VARIABLES ---- */
:root {
  --rf-bg: #0a0d14;
  --rf-surface: #0d1117;
  --rf-card: #161b22;
  --rf-border: #1e293b;
  --rf-accent: #2563eb;
  --rf-accent-hover: #1d4ed8;
  --rf-text: #f1f5f9;
  --rf-muted: #94a3b8;
  --rf-dim: #64748b;
  --rf-success: #10b981;
  --rf-warning: #f59e0b;
  --rf-radius: 12px;
}

/* ---- WIDGET LAUNCHER BUTTON ---- */
.rf-widget-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: var(--rf-accent);
  border: none;
  border-radius: 50px;
  padding: 12px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 24px rgba(37, 99, 235, 0.45);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.rf-widget-launcher:hover {
  transform: translateY(-2px);
  background: var(--rf-accent-hover);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.55);
}

.rf-widget-launcher.active {
  box-shadow: 0 0 0 2px var(--rf-bg), 0 0 0 4px var(--rf-accent);
}

.rf-launcher-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.rf-launcher-text {
  letter-spacing: -0.01em;
}

.rf-launcher-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -4px;
  right: -4px;
  border: 2px solid var(--rf-bg);
  animation: rf-pulse 2s infinite;
}

.rf-launcher-badge.visible {
  display: flex;
}

/* ---- WIDGET CONTAINER ---- */
.rf-widget-container {
  position: fixed;
  bottom: 88px;
  right: 24px;
  width: 395px;
  height: 580px;
  max-height: calc(100vh - 110px);
  max-height: calc(100dvh - 110px);
  z-index: 9998;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px var(--rf-border);
  overscroll-behavior: contain;
}

.rf-widget-container.minimized {
  height: 0;
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  pointer-events: none;
}

/* ---- CHAT WRAPPER ---- */
.rf-chat-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--rf-bg);
  border: 1px solid var(--rf-border);
  font-family: inherit;
  overflow: hidden;
}

.rf-chat-wrapper.fullpage {
  height: 100%;
  min-height: 0;
  border-radius: 0;
  border: none;
}

/* ---- HEADER ---- */
.rf-chat-header {
  background: var(--rf-surface);
  border-bottom: 1px solid var(--rf-border);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  z-index: 2;
}

.rf-chat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rf-chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.rf-chat-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--rf-text);
  line-height: 1.2;
}

.rf-chat-subtitle {
  font-size: 11px;
  color: var(--rf-dim);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.rf-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rf-success);
  display: inline-block;
  animation: rf-pulse 2s infinite;
}

@keyframes rf-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.92); }
}

.rf-chat-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rf-key-btn {
  background: var(--rf-card);
  border: 1px solid var(--rf-border);
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 500;
  color: var(--rf-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
  font-family: inherit;
}

.rf-key-btn:hover {
  border-color: rgba(37, 99, 235, 0.4);
  color: var(--rf-text);
}

.rf-key-btn-active {
  background: var(--rf-accent) !important;
  color: #ffffff !important;
  border-color: var(--rf-accent) !important;
  font-weight: 600 !important;
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.4);
}

.rf-header-link-btn {
  color: var(--rf-muted);
  font-size: 14px;
  text-decoration: none;
  padding: 3px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.rf-header-link-btn:hover {
  color: var(--rf-text);
  background: var(--rf-card);
}

.rf-minimize-btn {
  background: none;
  border: none;
  color: var(--rf-dim);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.rf-minimize-btn:hover {
  color: var(--rf-text);
  background: rgba(255, 255, 255, 0.05);
}

/* ---- MESSAGES AREA ---- */
.rf-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Custom Scrollbar for Chat */
.rf-messages::-webkit-scrollbar,
.chatbot-left::-webkit-scrollbar {
  width: 6px;
}
.rf-messages::-webkit-scrollbar-track,
.chatbot-left::-webkit-scrollbar-track {
  background: transparent;
}
.rf-messages::-webkit-scrollbar-thumb,
.chatbot-left::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 3px;
}
.rf-messages::-webkit-scrollbar-thumb:hover,
.chatbot-left::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* ---- CHAT BUBBLES ---- */
.rf-message {
  display: flex;
  gap: 10px;
  max-width: 100%;
  animation: rf-msgFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes rf-msgFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.rf-message.user {
  flex-direction: row-reverse;
}

.rf-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1e3a5f;
  color: #60a5fa;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.rf-msg-bubble {
  max-width: 86%;
}

.rf-msg-content {
  background: var(--rf-card);
  border: 1px solid var(--rf-border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--rf-text);
  line-height: 1.6;
  word-break: break-word;
}

.rf-message.user .rf-msg-content {
  background: #1e3a5f;
  border-color: rgba(37, 99, 235, 0.4);
  color: #f8fafc;
}

.rf-msg-cta {
  margin-top: 8px;
}

.rf-cta-btn {
  background: var(--rf-accent);
  color: #ffffff;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  transition: background 0.15s;
}
.rf-cta-btn:hover {
  background: var(--rf-accent-hover);
}

/* ---- PREVIEW MODE ALERT BANNER ---- */
.rf-preview-alert {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.rf-preview-alert-content {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.rf-preview-alert-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.rf-preview-alert strong {
  font-size: 12.5px;
  color: #fbbf24;
  display: block;
}

.rf-preview-alert p {
  font-size: 11.5px;
  color: var(--rf-muted);
  margin: 2px 0 0 0;
  line-height: 1.4;
}

.rf-preview-alert-btn {
  background: #f59e0b;
  color: #0b0f19;
  font-size: 11.5px;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}
.rf-preview-alert-btn:hover {
  background: #d97706;
}

/* ---- TYPING INDICATOR ---- */
.rf-typing-dots {
  display: flex;
  gap: 4px;
  padding: 6px 4px;
}

.rf-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rf-dim);
  animation: rf-bounce 1.2s infinite;
}

.rf-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.rf-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes rf-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
}

/* ---- SETUP SCREEN (Clean, Above-the-fold) ---- */
.rf-setup-screen {
  padding: 24px 16px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.rf-setup-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 8px;
}

.rf-setup-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--rf-text);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.rf-setup-desc {
  font-size: 13px;
  color: var(--rf-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

/* Provider tabs */
.rf-provider-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  justify-content: center;
}

.rf-provider-tab {
  background: var(--rf-card);
  border: 1px solid var(--rf-border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--rf-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  font-family: inherit;
  font-weight: 500;
}

.rf-provider-tab.active {
  border-color: var(--rf-accent);
  color: var(--rf-text);
  background: rgba(37, 99, 235, 0.12);
}

.rf-free-badge {
  background: #10b981;
  color: #ffffff;
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Key input container */
.rf-key-input-container {
  text-align: left;
  margin-bottom: 12px;
}

.rf-input-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--rf-text);
  margin-bottom: 6px;
}

.rf-get-key-link {
  font-size: 11.5px;
  color: #60a5fa;
  text-decoration: none;
  font-weight: 500;
}
.rf-get-key-link:hover {
  text-decoration: underline;
}

.rf-key-input-wrap {
  position: relative;
  margin-bottom: 0;
}

.rf-key-input {
  width: 100%;
  background: var(--rf-card);
  border: 1px solid var(--rf-border);
  border-radius: 8px;
  padding: 11px 40px 11px 14px;
  font-size: 13px;
  color: var(--rf-text);
  font-family: var(--font-mono, monospace);
  box-sizing: border-box;
  transition: border-color 0.2s;
}

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

.rf-key-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: var(--rf-dim);
}

/* Model selector styling */
.rf-model-select-wrap {
  margin-bottom: 12px;
  text-align: left;
}
.rf-model-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 6px;
  font-weight: 500;
}
.rf-model-badge {
  background: #10b981;
  color: #fff;
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
}
.rf-model-select {
  width: 100%;
  background: #161b22;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: #f1f5f9;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.rf-model-select:focus {
  outline: none;
  border-color: #2563eb44;
}
.rf-model-hint {
  font-size: 11px;
  color: #475569;
  margin: 4px 0 0;
}

.rf-connect-btn {
  width: 100%;
  background: var(--rf-accent);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 12px;
}

.rf-connect-btn:hover {
  background: var(--rf-accent-hover);
}

.rf-connect-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Instructions card */
.rf-key-instructions {
  background: var(--rf-card);
  border: 1px solid var(--rf-border);
  border-radius: 8px;
  padding: 12px 14px;
  text-align: left;
  margin-bottom: 12px;
}

.rf-provider-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.rf-provider-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--rf-text);
}

.rf-provider-badge {
  font-size: 10.5px;
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
}

.rf-provider-free {
  font-size: 11px;
  color: var(--rf-success);
  margin-bottom: 6px;
}

.rf-provider-steps {
  font-size: 11.5px;
  color: var(--rf-muted);
  line-height: 1.6;
  padding-left: 18px;
  margin: 0;
}

.rf-key-privacy {
  font-size: 11px;
  color: var(--rf-dim);
  margin: 8px 0;
  line-height: 1.5;
}

.rf-skip-btn {
  background: none;
  border: none;
  color: var(--rf-dim);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 8px;
  font-family: inherit;
}
.rf-skip-btn:hover {
  color: var(--rf-muted);
}

.rf-error-msg {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  font-size: 12px;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 10px;
  text-align: left;
}

/* ---- QUICK PROMPTS ---- */
.rf-quick-prompts {
  padding: 0 16px 12px;
  flex-shrink: 0;
}

.rf-quick-label {
  font-size: 11px;
  color: var(--rf-dim);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.rf-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rf-chip {
  background: var(--rf-card);
  border: 1px solid var(--rf-border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--rf-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  font-family: inherit;
}

.rf-chip:hover {
  border-color: rgba(37, 99, 235, 0.4);
  color: var(--rf-text);
  background: rgba(37, 99, 235, 0.08);
}

/* ---- INPUT AREA ---- */
.rf-input-area {
  padding: 12px 16px 6px;
  border-top: 1px solid var(--rf-border);
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
  background: var(--rf-surface);
}

#rf-input {
  flex: 1;
  background: var(--rf-card);
  border: 1px solid var(--rf-border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--rf-text);
  resize: none;
  max-height: 120px;
  line-height: 1.5;
  font-family: inherit;
  box-sizing: border-box;
}

#rf-input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.5);
}

.rf-send-btn {
  background: var(--rf-accent);
  border: none;
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffffff;
  flex-shrink: 0;
  transition: background 0.15s;
}

.rf-send-btn:hover {
  background: var(--rf-accent-hover);
}

.rf-input-footer {
  font-size: 11px;
  color: var(--rf-dim);
  padding: 4px 16px 10px;
  text-align: center;
  background: var(--rf-surface);
}

.rf-input-footer a {
  color: #60a5fa;
  text-decoration: none;
}

.rf-link-btn {
  background: none;
  border: none;
  color: #60a5fa;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-family: inherit;
}

/* ---- PROACTIVE BUBBLE ---- */
.rf-proactive-bubble {
  position: fixed;
  bottom: 88px;
  right: 90px;
  background: var(--rf-card);
  border: 1px solid var(--rf-border);
  border-radius: 14px;
  padding: 14px 16px;
  max-width: 280px;
  z-index: 9997;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  animation: rf-fadeIn 0.3s ease;
}

@keyframes rf-fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.rf-proactive-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: var(--rf-dim);
  font-size: 16px;
  cursor: pointer;
}

.rf-proactive-bubble p {
  font-size: 13px;
  color: var(--rf-muted);
  line-height: 1.5;
  margin: 0 0 12px;
  padding-right: 16px;
}

.rf-proactive-open {
  background: var(--rf-accent);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s;
}
.rf-proactive-open:hover {
  background: var(--rf-accent-hover);
}

/* ---- FULL STANDALONE PAGE LAYOUT ---- */
.chatbot-page {
  display: grid;
  grid-template-columns: 420px 1fr;
  height: 100vh;
  height: 100dvh;
  background: var(--rf-bg);
  overflow: hidden;
}

.chatbot-left {
  background: var(--rf-surface);
  border-right: 1px solid var(--rf-border);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  height: 100%;
}

.chatbot-left-inner {
  padding: 2.5rem 2rem;
}

.chatbot-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--rf-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2rem;
}

.chatbot-page-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--rf-text);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.chatbot-page-desc {
  font-size: 14px;
  color: var(--rf-muted);
  line-height: 1.65;
  margin-bottom: 2rem;
}

.chatbot-features {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.chatbot-feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.chatbot-feature span {
  font-size: 20px;
  line-height: 1.2;
}

.chatbot-feature strong {
  font-size: 13.5px;
  color: var(--rf-text);
  display: block;
  margin-bottom: 2px;
}

.chatbot-feature p {
  font-size: 12.5px;
  color: var(--rf-dim);
  margin: 0;
  line-height: 1.45;
}

.chatbot-upgrade-card {
  background: var(--rf-card);
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 12px;
  padding: 1.35rem;
  margin-top: 2rem;
}

.chatbot-upgrade-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--rf-text);
  margin-bottom: 6px;
}

.chatbot-upgrade-card p {
  font-size: 12.5px;
  color: var(--rf-dim);
  margin-bottom: 14px;
  line-height: 1.55;
}

.chatbot-upgrade-btn {
  background: var(--rf-accent);
  color: #ffffff;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s;
}
.chatbot-upgrade-btn:hover {
  background: var(--rf-accent-hover);
}

.chatbot-right {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--rf-bg);
}

#rf-fullpage-chatbot {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ---- CODE BLOCKS IN CHAT ---- */
.rf-code {
  background: #161b22;
  border: 1px solid var(--rf-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: monospace;
  font-size: 12px;
  color: #60a5fa;
}

.rf-code-block {
  background: #0d1117;
  border: 1px solid var(--rf-border);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: monospace;
  font-size: 12px;
  color: #94a3b8;
  overflow-x: auto;
  margin: 8px 0;
}

/* ---- WELCOME SCREEN ---- */
.rf-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1rem;
  gap: 12px;
  margin: auto 0;
}

.rf-welcome-icon {
  font-size: 2.2rem;
}

.rf-welcome-text strong {
  font-size: 15px;
  color: var(--rf-text);
  display: block;
  margin-bottom: 6px;
}

.rf-welcome-text p {
  font-size: 13.5px;
  color: var(--rf-muted);
  line-height: 1.6;
  max-width: 380px;
  margin: 0;
}

/* ---- PRICING BANNER CTA ---- */
.pricing-chat-banner {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  font-size: 14px;
  color: var(--rf-text);
  gap: 1rem;
}

.pricing-chat-btn {
  background: var(--rf-accent);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pricing-chat-btn:hover {
  background: var(--rf-accent-hover);
}

.chatbot-mobile-header {
  display: none;
}

/* ---- MOBILE RESPONSIVENESS ---- */
@media (max-width: 860px) {
  .chatbot-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--rf-surface);
    border-bottom: 1px solid var(--rf-border);
    flex-shrink: 0;
  }

  .rf-widget-container {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 84px;
    height: calc(100vh - 120px);
    height: calc(100dvh - 120px);
  }

  .chatbot-page {
    grid-template-columns: 1fr;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .chatbot-left {
    display: none;
  }

  .chatbot-right {
    height: 100%;
    min-height: 0;
  }

  .pricing-chat-banner {
    flex-direction: column;
    text-align: center;
  }
}
