/* ===== Chatbot Widget Styles ===== */

.chatbot-widget {
  --chatbot-primary: #10b981;
  --chatbot-width: 360px;
  --chatbot-shadow: 0 18px 30px rgba(15, 23, 42, 0.2);

  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 99990;
  font-family: 'Inter', sans-serif;
}

.chatbot-widget button,
.chatbot-widget input,
.chatbot-widget textarea {
  font-family: inherit;
}

.chatbot-trigger {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--chatbot-primary), #0f766e);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--chatbot-shadow);
}

.chatbot-trigger svg {
  width: 28px;
  height: 28px;
}

.chatbot-panel {
  width: min(var(--chatbot-width), calc(100vw - 2rem));
  max-height: min(78vh, 640px);
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--chatbot-shadow);
  display: none;
  flex-direction: column;
  border: 1px solid #e5e7eb;
}

.chatbot-widget.open .chatbot-panel {
  display: flex;
}

.chatbot-widget.open .chatbot-trigger {
  display: none;
}

.chatbot-header {
  background: linear-gradient(135deg, var(--chatbot-primary), #0f766e);
  color: #ffffff;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbot-title-wrap {
  display: flex;
  flex-direction: column;
}

.chatbot-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.chatbot-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  opacity: 0.9;
}

.chatbot-header-actions {
  display: flex;
  gap: 0.25rem;
}

.chatbot-icon-btn {
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.chatbot-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.chatbot-messages {
  overflow-y: auto;
  padding: 0.9rem;
  flex: 1;
  min-height: 180px;
}

.chatbot-msg {
  max-width: 88%;
  margin-bottom: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.chatbot-msg.user {
  margin-left: auto;
  background: #dcfce7;
  color: #14532d;
  border-bottom-right-radius: 4px;
}

.chatbot-msg.bot {
  margin-right: auto;
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 4px;
}

.chatbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.chatbot-suggestion-btn {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
  border-radius: 999px;
  font-size: 0.75rem;
  padding: 0.28rem 0.7rem;
  cursor: pointer;
}

.chatbot-footer {
  border-top: 1px solid #e5e7eb;
  padding: 0.65rem;
  background: #ffffff;
}

.chatbot-input-row {
  display: flex;
  gap: 0.5rem;
}

.chatbot-input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0.58rem 0.72rem;
  font-size: 0.87rem;
  outline: none;
}

.chatbot-input:focus {
  border-color: var(--chatbot-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.chatbot-send {
  border: none;
  min-width: 86px;
  border-radius: 10px;
  cursor: pointer;
  background: var(--chatbot-primary);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
}

.chatbot-status {
  margin-top: 0.35rem;
  min-height: 1rem;
  font-size: 0.72rem;
  color: #64748b;
}

@media (max-width: 768px) {
  .chatbot-widget {
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .chatbot-panel {
    width: min(100vw - 1.5rem, 360px);
    max-height: 74vh;
  }
}
