/* Neurodiversity Foundation – Chatbot Styling (v2.1) */

#ndf-chatbot-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #5b2a86;
  color: #fff;
  border-radius: 40px;
  padding: 10px 22px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: background 0.2s;
  z-index: 99998;
}
#ndf-chatbot-launcher:hover {
  background: #7c39b5;
}
.ndf-bubble { color: #111; }

.ndf-chatbot-attach {
  display: none; /* hidden by default */
  margin: 0 8px 0 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: #efefef;
  cursor: pointer;
}
.ndf-chatbot-attach:hover { background: #e6e6e6; }



#ndf-chatbot-window {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 720px;
  height: 80vh;
  max-height: 80vh;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 99999;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
}

/* === Chatbot Header – Gradient background === */
.ndf-chatbot-header {
  background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
  color: #fff;
  padding: 10px 16px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.ndf-chatbot-title {
  flex: 1;
  text-align: left;
}

.ndf-chatbot-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* Messages area */
#ndf-chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  background: #fafafa;
}

/* Message bubbles */
.ndf-message {
  margin-bottom: 12px;
  display: flex;
}
.ndf-message.bot {
  justify-content: flex-start;
}
.ndf-message.user {
  justify-content: flex-end;
}
.ndf-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  line-height: 1.4;
  word-wrap: break-word;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  font-size: 14px;
}



.ndf-chatbot-window {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.ndf-chatbot-messages {
  background-color: #faf7ff; /* very light ND purple background */
}

.ndf-chatbot-input-area {
  border-top: 1px solid #ddd;
  background: #fff;
}








.ndf-message.bot .ndf-bubble {
  background: #ece8f4;
  color: #222;
}
.ndf-message.user .ndf-bubble {
  background: #5b2a86;
  color: #fff;
}

/* Options / buttons */
.ndf-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.ndf-option-btn {
  flex: 0 1 auto;
  border: 1px solid #5b2a86;
  background: #fff;
  color: #5b2a86;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ndf-option-btn:hover {
  background: #5b2a86;
  color: #fff;
}
.ndf-option-btn.ndf-option-selected {
  background: #5b2a86;
  color: #fff;
}

/* Input area */
#ndf-chatbot-input-area {
  border-top: 1px solid #ddd;
  padding: 12px 18px 16px;
  display: none;
  flex-direction: column;
  gap: 10px;
  background: #fff;
}
#ndf-chatbot-input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #ccc;
  padding: 10px 12px;
  font-size: 15px;
  min-height: 100px; /* slightly smaller than before */
  resize: vertical;
}
#ndf-chatbot-send {
  align-self: flex-end;
  background: #5b2a86;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  transition: background 0.2s;
}
#ndf-chatbot-send:hover {
  background: #7c39b5;
}

/* Links in messages */
.ndf-bubble a.ndf-link {
  color: #03b5aa;
  text-decoration: underline;
  font-weight: 600;
}
.ndf-bubble a.ndf-link::before {
  content: "🔗 ";
}
.ndf-bubble a.ndf-link:hover {
  color: #028f86;
  text-decoration: none;
}

/* Scrollbar */
#ndf-chatbot-messages::-webkit-scrollbar {
  width: 8px;
}
#ndf-chatbot-messages::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

/* Small screens */
@media (max-width: 800px) {
  #ndf-chatbot-window {
    width: 94vw;
    right: 3vw;
  }
}
/* Force text to be visible */
/* .ndf-bubble,
.ndf-message,
.ndf-options,
.ndf-option-btn {
  visibility: visible !important;
  opacity: 1 !important;
  color: #111 !important;
}

.ndf-bubble { 
  font-size: 15px; 
  line-height: 1.4;
}

.ndf-chatbot-window[aria-hidden="true"] {
  display: none !important;
}
.ndf-chatbot-window[aria-hidden="false"] {
  display: flex !important;
}*/
@media (max-width: 800px) {
  #ndf-chatbot-window {
    width: 94vw;
    right: 3vw;
    height: 70vh !important;
    max-height: 70vh !important;
  }
}
