
#tulaneSearchPanel {

  max-height: 80vh !important;       /* Never taller than 90% of viewport height */
  max-width: 95vw;        /* Never wider than 95% of viewport width */
  overflow-y: auto;       /* Scroll vertically if content is too tall */
  overflow-x: hidden;     /* Prevent horizontal scroll */

  display: flex;
  flex-direction: column;  /* Allow inner content to expand vertically */
  overflow: hidden;        /* Don't scroll the container itself */
}

#tulaneSearchPanel > #aiResponse  {
  overflow-y: auto;        /* Make inner content scrollable */
}

.ai-hidden { display: none !important; }

.tulane-ai-sticky-wrapper {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 2147483647; /* Ensure it stays on top of everything */
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#tulaneSearchTrigger {
  background: #006747; /* Tulane Green */
  color: #fff;
  border: 2px solid #fff;
  padding: 12px 24px;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  font-weight: 700;
  transition: transform 0.2s;
}

#tulaneSearchTrigger:hover { transform: scale(1.05); }

#tulaneSearchPanel {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 380px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  overflow: hidden;
  border: 1px solid #ddd;
}

.panel-header {
  background: #006747;
  color: #fff;
  padding: 15px;
  font-weight: bold;
}

.panel-body { padding: 15px; }

.input-group { display: flex; gap: 8px; margin-bottom: 10px; }

#aiQuery {
  flex-grow: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#aiSubmit {
  background: #d39f10; /* Tulane Gold */
  border: none;
  color: #000;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.filter-group { font-size: 12px; margin-bottom: 15px; color: #555; }

#aiResponse {
  max-height: 300px;
  overflow-y: auto;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.ai-summary { background: #f9f9f9; padding: 10px; border-radius: 6px; margin-bottom: 10px; font-size: 14px; }
.ai-sources ul { padding-left: 20px; font-size: 13px; margin: 5px 0; }
.ai-sources a { color: #006747; text-decoration: none; }
.ai-sources a:hover { text-decoration: underline; }