/* Arcarea Chatbot — Responsive / Mobile-friendly CSS */

/* Chat is hidden by default; bubble triggers .arc-open and display:flex */
#arcarea-chatbot {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  right: 20px;
  width: 380px;
  max-width: 95vw;
  height: 560px;
  max-height: 85vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 38px rgba(0,0,0,0.22);
  display: none;
  flex-direction: column;
  z-index: 99999;
  font-family: Arial, sans-serif;
  overflow: hidden;
  box-sizing: border-box;
}
#arcarea-chatbot.arc-open { display: flex; }

/* Bubble */
#arcarea-bubble {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg,#2b6cb0,#4fc3f7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  z-index: 100000;
  cursor: pointer;
  border: none;
}

/* Header */
#arcarea-chatbot-header {
  background: #2b6cb0;
  color: #fff;
  padding: 12px;
  border-radius: 12px 12px 0 0;
  font-weight: 700;
  text-align: center;
  font-size: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Messages area */
#arcarea-chatbot-messages {
  flex: 1 1 auto;
  padding: 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #f7fafc;
  box-sizing: border-box;
}

/* Bot and user messages */
.bot-message, .arc-bot {
  background: #eaf4ff;
  color: #054a91;
  padding: 10px 12px;
  border-radius: 12px;
  margin: 8px 0;
  max-width: 82%;
  clear: both;
  word-wrap: break-word;
}
.user-message, .arc-user {
  background: #2b6cb0;
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  margin: 8px 0;
  max-width: 82%;
  margin-left: auto;
  word-wrap: break-word;
}

/* Chips area */
#arcarea-chatbot-chips {
  padding: 10px 12px;
  border-top: 1px solid #eee;
  background: #fff;
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  max-height: 140px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Individual chip */
.faq-chip {
  background: linear-gradient(135deg,#eef6ff,#cfe9ff);
  border-radius: 18px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid #dbeeff;
  white-space: nowrap;
}

/* Show Questions button (styled similarly to chips) */
#show-options-btn, #arc-show-chips {
  display: inline-block;
  padding: 8px 12px;
  margin: 6px 0;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #dbeeff;
  color: #1A73E8;
  cursor: pointer;
  text-align: center;
}

/* Input area */
#arcarea-chatbot-input {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #ddd;
  background: #fff;
  flex: 0 0 auto;
  box-sizing: border-box;
}
#arcarea-chat-input {
  flex: 1; padding: 10px; border-radius: 6px; border: 1px solid #ddd; font-size: 14px; box-sizing: border-box;
}
#arcarea-send-btn { background: #2b6cb0; color: #fff; border: none; padding: 10px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; }

/* small helpers & scrollbar */
#arcarea-chatbot-messages img { max-width: 100%; height: auto; border-radius: 8px; }
#arcarea-chatbot-messages::-webkit-scrollbar { width: 6px; }
#arcarea-chatbot-messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 3px; }

/* Responsive adjustments */
@media (max-width: 480px) {
  #arcarea-chatbot { left: 12px; right: 12px; width: auto; height: 78vh; max-height: 78vh; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); border-radius: 12px; }
  #arcarea-chatbot-header { font-size: 15px; padding: 12px; }
  .faq-chip { font-size: 13px; padding: 6px 10px; }
  #arcarea-chatbot-chips { max-height: 120px; }
  #arcarea-chatbot-input { padding-bottom: env(safe-area-inset-bottom, 10px); }
}
