.fa-chatbot-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(140deg, #1f2937, #0f172a);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.35);
  z-index: 5000;
}

.fa-chatbot-toggle svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
}

.fa-chatbot-panel {
  position: fixed;
  right: 18px;
  bottom: 84px;
  width: min(360px, calc(100vw - 24px));
  max-height: min(620px, calc(100vh - 120px));
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  z-index: 5000;
  display: none;
  grid-template-rows: auto 1fr auto;
}

.fa-chatbot-panel.open {
  display: grid;
}

.fa-chatbot-head {
  background: linear-gradient(145deg, #111827, #1f2937);
  color: #ffffff;
  padding: 14px 16px;
}

.fa-chatbot-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.fa-chatbot-sub {
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.8);
}

.fa-chatbot-body {
  padding: 12px;
  overflow-y: auto;
  background: #f8fafc;
}

.fa-chat-row {
  display: flex;
  margin-bottom: 10px;
}

.fa-chat-row.bot {
  justify-content: flex-start;
}

.fa-chat-row.user {
  justify-content: flex-end;
}

.fa-chat-bubble {
  max-width: 86%;
  font-size: 0.8rem;
  line-height: 1.55;
  padding: 9px 11px;
  border-radius: 11px;
}

.fa-chat-row.bot .fa-chat-bubble {
  background: #e2e8f0;
  color: #0f172a;
}

.fa-chat-row.user .fa-chat-bubble {
  background: #1f2937;
  color: #ffffff;
}

.fa-chat-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 6px 0 10px;
}

.fa-chat-chip {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #1f2937;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
}

.fa-chat-form {
  border-top: 1px solid #e2e8f0;
  padding: 10px;
  background: #ffffff;
}

.fa-chat-input-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.fa-chat-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 0.8rem;
  outline: none;
}

.fa-chat-input:focus {
  border-color: #334155;
}

.fa-chat-send {
  border: none;
  border-radius: 999px;
  background: #1f2937;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0 14px;
  cursor: pointer;
}

.fa-chat-lead {
  border-top: 1px dashed #cbd5e1;
  margin-top: 8px;
  padding-top: 8px;
}

.fa-chat-lead h4 {
  font-size: 0.75rem;
  margin-bottom: 6px;
  color: #0f172a;
}

.fa-chat-lead-grid {
  display: grid;
  gap: 6px;
}

.fa-chat-lead-grid input,
.fa-chat-lead-grid textarea,
.fa-chat-lead-grid select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 0.74rem;
  font-family: inherit;
}

.fa-chat-lead-grid textarea {
  resize: vertical;
  min-height: 72px;
}

.fa-chat-lead-submit {
  margin-top: 6px;
  width: 100%;
  border: none;
  border-radius: 9px;
  padding: 8px;
  background: #0f766e;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.fa-chat-small {
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 5px;
}

@media (max-width: 700px) {
  .fa-chatbot-panel {
    right: 12px;
    bottom: 78px;
    width: calc(100vw - 24px);
  }

  .fa-chatbot-toggle {
    right: 12px;
    bottom: 12px;
  }
}
