/* Sentinel Chatbot Styles */
.sentinel-chatbot-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9999;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  width: auto;
  height: auto;
   transform: scale(1.5);  /* Adjust scale to enlarge */
}
.sentinel-chatbot-window {
  position: fixed;
  bottom: 100px;
  right: 32px;
  width: 340px;
  max-width: 95vw;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  /* Prevent the window from growing beyond the viewport */
  max-height: 75vh;
  height: 520px; /* graceful default for desktops */
}
.sentinel-chatbot-header {
  background: #4CAF50;
  color: #fff;
  padding: 0.75rem 1rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sentinel-chatbot-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  font-size: 1rem;
  background: #f7f7f7;
  /* Ensure long text/URLs wrap and don't overflow */
  word-break: break-word;
  overflow-wrap: anywhere;
  position: relative; /* added to accommodate scroll-to-bottom button */
}
.sentinel-chatbot-options {
  padding: 0.5rem 1rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sentinel-chatbot-option {
  background: #e8f5e9;
  color: #1b5e20;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}
.sentinel-chatbot-option:hover {
  background: #c8e6c9;
}
.sentinel-chatbot-input {
  padding: 0.5rem 1rem 1rem 1rem;
  display: flex;
  gap: 0.5rem;
}
.sentinel-chatbot-input input {
  flex: 1;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
}
.sentinel-chatbot-input button {
  background: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
}
.sentinel-chatbot-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

/* Header actions (Clear Chat) */
.sentinel-chatbot-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sentinel-chatbot-clear {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transform: translateX(-20px); /* Move 10px to the left */
}
.sentinel-chatbot-clear:hover {
  background: rgba(255,255,255,0.3);
}

/* Scroll to bottom button inside messages area */
.sentinel-chatbot-scroll-bottom {
  position: absolute;
  right: 12px;
  bottom: 74px; /* above input area */
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #4CAF50;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  display: none; /* toggled via JS */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.sentinel-chatbot-scroll-bottom.visible {
  display: flex;
}

/* Compact mode on very small screens/heights */
@media (max-height: 600px) {
  .sentinel-chatbot-window {
    bottom: 80px;
    height: 420px;
    max-height: 70vh;
  }
}
