#ai-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 500px;
  height: 100vh;
  background: #fff;
  /* border-left: 2px solid #222; */
  /* box-shadow: -2px 0 8px rgba(0,0,0,0.08); */
  z-index: 9999;
  /* font-family: Arial, sans-serif; */
  color: #222;
  display: flex;
  flex-direction: column;

  background-color: #FFFFFF; /* White*/
  overflow-x: hidden; /* Disable horizontal scroll */
  padding-top: 10px; /* Place content 10px from the top */
  transition: 0.5s; /* 0.5 second transition effect to slide in the sidepanel */
  box-shadow: 6px 8px 5.8px 12px rgba(0,0,0,0.2);

  /* From HTML */
  /* margin-top: 32px !important; */
}

#ai-sidebar.closed {
  width: 0;
  min-width: 0;
  border-left: none;
  box-shadow: none;
  padding: 0;
  overflow: hidden;
  transition: width 0.5s;
}

#ai-sidebar .closebtn {
  position: relative;
  font-size: 36px;
  width: 30px;
  height: 30px;
  padding-right: 10px;
  color: #404040;
}

.ai-sidebar-section {
  display: flex;
  flex-wrap: wrap;
  /* border-bottom: 1px solid #eee;
  background: #f7f7f7; */
}

.sidebarTab{
  /* flex: 1; */
  flex-basis: 50%;
  /* padding: 12px; */
  border: none;
  background: none;
  cursor: pointer;
  text-align: center;
}

.tabSection {
  border-bottom: 1px solid #0080BE;
}

.sidebarTab:has(button.active) {
  align-content: end;
}

.sidebarTab button {
  width: 176px;
  height: 40px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  font-size: 18px;
}

.sidebarTab button:not(.active) {
  background-color: #F2F2F2;
  border: 0;
}

.sidebarTab button.active {
  background-color: #FFFFFF;
  border-width: 1px;
  border-style: solid;
  border-color: #0080BE;
  border-bottom-color: #FFFFFF;
  font-weight: 700;
  color: #0080BE;
  margin-bottom: -0.5px;
}

/* .sidebarTab.active {
  background: #e0e0e0;
  font-weight: bold;
} */

#sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

#chat-messages {
  min-height: 84vh; /* Temp, potentially */
  max-height: 84vh;
  overflow-y: auto;
  margin-bottom: 10px;
  border-bottom: 1px solid grey;
}

#chat-input {
  margin-left: 10px;
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
  border: none;
  background-color: #f3f4f6;
  border-radius: 10px;
}

.msg.user { color: #1976d2; margin-bottom: 4px; }
.msg.bot { color: #388e3c; margin-bottom: 8px; }

.send-btn {
  width: 46px;
  height: 46px;
  background-color: #155dfd;
  border: 0;
  border-radius: 10px;
  margin-left: 19px;
}

#ai-sidebar-toggle {
  position: fixed;
  top: 40px;
  right: 0;
  z-index: 10000;
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 4px 0 0 4px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 22px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: right 0.3s;
  display: none; /* JS will toggle this */
}