/* =============================================
   Main Layout & Structure
   ============================================= */

/* Base Styles */
body {
  color: #2B4B87;
}

/* Main Container */
#civiRagContainer {
  display: flex;
  width: 100%;
  height: 100vh;
  flex: 1;
}

/* First Column */
#civiRagFirstColumn {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  width: 300px;
  /* min-width: 250px;
  max-width: 500px; */
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(43, 75, 135, 0.25);
  background: white;
}

/* Second Column */
#civiRagSecondColumn {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100vh;
  padding: 0px;
  box-shadow: -15px 0 25px rgba(43,75,135, 0.15);
  z-index: 2;
  background-color: #fff;
  transition: flex 0.3s ease-in-out;
}

#civiRagSecondColumn.shrink {
  flex: 0 0 36%; 
}

/* Third Column */
#civiRagThirdColumn {
  flex: 0 0 36%;
  z-index: 4;
  height: 100%;
  overflow-y: auto;
  background-color: #fff;
  box-shadow: -15px 0 25px rgba(43,75,135, 0.15);
  position: fixed;
  right: 0;
  top: 0px;
  transform: translateX(110%);
  transition: transform 0.3s ease-in-out, width 0.3s ease-in-out;
}

#civiRagThirdColumn.active {
  transform: translateX(0); 
  width: 36%;
}

#civiRagThirdColumn .content {
  max-width: 100%;
}

/* .resize-handle {
  position: absolute;
  background: rgba(43, 75, 135, 0.1);
  transition: background 0.2s;
  z-index: 100;
} */

/* 
.resize-handle-tab {
  position: absolute;
  top: -20px; 
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 10px;
  background: rgba(43,75,135, 0.1);
  color: #fff; /
  border-radius: 3px 3px 0 0; 
  font-size: 12px;
  text-align: center;
  cursor: default;
}

.horizontal-handle {
  position: relative;
  height: 10px;
  flex: 0 0 10px;
  cursor: row-resize;
  background: rgba(43,75,135, 0.1);
  width: 100%;
  left: 0;
  z-index: 1000;
}

.vertical-handle {
  width: 10px;
  cursor: col-resize;
  height: 100%;
  top: 0;
  right: -5px;
} */


.resize-handle-tab {
  position: absolute;
  bottom: -10px; /* Center vertically relative to the horizontal handle */
  left: 50%;
  transform: translate(-50%, -50%); /* Center both horizontally and vertically */
  padding: 10px 25px;
  background: #2B4B87; /* Solid color instead of transparent */
  color: #fff;
  border-radius: 16px 16px 0 0;
  font-size: 14px;
  text-align: center;
  cursor: default;
  z-index: 1001; /* Ensure tab appears above the handle */
  box-shadow: 0 2px 4px rgba(43, 75, 135, 0.2);
  cursor: row-resize;
}

.horizontal-handle {
  position: relative;
  height: 16px; /* Increased height for better visibility */
  flex: 0 0 16px;
  cursor: row-resize;
  background: linear-gradient(
    to bottom,
    rgba(43, 75, 135, 0.05),
    rgba(43, 75, 135, 0.15) 40%,
    rgba(43, 75, 135, 0.15) 60%,
    rgba(43, 75, 135, 0.05)
  );
  width: 100%;
  left: 0;
  z-index: 1000;
  transition: background 0.2s ease;
}

.horizontal-handle:hover {
  background: linear-gradient(
    to bottom,
    rgba(43, 75, 135, 0.1),
    rgba(43, 75, 135, 0.25) 40%,
    rgba(43, 75, 135, 0.25) 60%,
    rgba(43, 75, 135, 0.1)
  );
}

.vertical-handle {
  width: 16px; /* Increased width for better visibility */
  cursor: col-resize;
  height: 100%;
  top: 0;
  right: -8px; /* Adjusted to center the handle on the border */
  background: linear-gradient(
    to right,
    rgba(43, 75, 135, 0.05),
    rgba(43, 75, 135, 0.15) 40%,
    rgba(43, 75, 135, 0.15) 60%,
    rgba(43, 75, 135, 0.05)
  );
  transition: background 0.2s ease;
}

.vertical-handle:hover {
  background: linear-gradient(
    to right,
    rgba(43, 75, 135, 0.1),
    rgba(43, 75, 135, 0.25) 40%,
    rgba(43, 75, 135, 0.25) 60%,
    rgba(43, 75, 135, 0.1)
  );
}

/* Prevent text selection during resize */
.resizing {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(43, 75, 135, 0.55);
  display: none;
  z-index: 9990;
  opacity: 0;
  transition: opacity 0.0s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  #civiRagContainer {
      flex-direction: column;
  }

  #civiRagFirstColumn,
  #civiRagSecondColumn,
  #civiRagThirdColumn {
      width: 100%;
      max-width: 100%;
      flex: none;
  }

  #civiRagFirstColumn {
      height: auto;
      width: 400px;
      min-height: 200px;
      overflow-y: auto;
  }

  #civiRagThirdColumn {
      position: static;
      transform: none;
  }

  #civiRagThirdColumn.active {
      width: 100%;
  }
}



#pdf-container, #text-container {
        width: 100%;
        /* height: 600px; */
        position: relative;
        overflow: hidden;
    }

    canvas {
    display: block;
    margin: 10px 0;
  }

.highlight-pdf {
  background-color: yellow;
  opacity: 0.5;
  position: absolute;
  pointer-events: none;
}

.highlight-text {
  background-color: yellow;
}


    .modal-close {
      position: absolute;
      top: 10px;
      right: 10px;
      cursor: pointer;
      font-size: 32pt;
    }



    .small-modal {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: white;
        padding: 50px 30px;
        border-radius: 10px;
        box-shadow: -15px 15px 25px rgba(43, 75, 135, 0.15);
        display: none;
        z-index: 9999;
        max-width: 800px;
        width: 40%;
        height: 40%;
    }


    .medium-modal {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: white;
        padding: 50px 30px;
        border-radius: 10px;
        box-shadow: -15px 15px 25px rgba(43, 75, 135, 0.15);
        display: none;
        z-index: 9999;
        width: 60%;
        height: 60%;
    }

    .large-modal {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: white;
        padding: 50px 30px;
        border-radius: 10px;
        box-shadow: -15px 15px 25px rgba(43, 75, 135, 0.15);
        display: none;
        z-index: 9999;
        width: 90%;
        height: 90%;
    }

    .modal-close {
      position: absolute;
      top: 10px;
      right: 10px;
      cursor: pointer;
      font-size: 22pt;
    }




    #knowledge-node-title-container {
        position: sticky;
        top: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        /* height: 60px; */
        background-color: #fff;
        z-index: 4;
        box-shadow: 0px 15px 25px rgba(43,75,135, 0.15); /* Horizontal offset, vertical offset, blur, color */
  
      }

      
    #knowledge-node-container {
        flex: 1;
        overflow-y: scroll;
        padding: 20px 20px 20px 20px;
        margin-bottom: 10px;
        position: sticky;
        top: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        /* height: 60px; */
        background-color: #fff;
        z-index: 3;
        box-shadow: 0px 15px 25px rgba(43,75,135, 0.15); /* Horizontal offset, vertical offset, blur, color */
  
      }


    #knowledge-node-message-container {
        overflow-y: scroll;
        padding: 20px 20px 20px 20px;
        margin-bottom: 10px;
        position: sticky;
        top: 0;
        /* display: flex; */
        justify-content: space-between;
        /* height: 60px; */
        background-color: #fff;
  
      }
  
    #chat-title-container {
      position: sticky;
      top: 0;
      display: flex;
      justify-content: space-between;
      align-items: center;
      /* height: 60px; */
      background-color: #fff;
      z-index: 3;
      box-shadow: 0px 15px 25px rgba(43,75,135, 0.15); /* Horizontal offset, vertical offset, blur, color */

    }
    
#clear-chat-btn {
  background-color: transparent;
  padding: 5px;
  margin: 0px;
  border-radius: 5px;
  cursor: pointer;
}

#clear-chat-btn:hover {
  background-color: #DFE7EB;
}

    #chat-title-left {
      display: flex;
  align-items: center;
  width: 80%;
  max-width: 80%;

}
.truncated-title-container {
  position: relative;
  overflow: hidden;
  max-width: 100%;
}

.truncated-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  width: 100%;
}

.truncated-title-container::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 25%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0), #ffffff);
  pointer-events: none;
}

.truncated-title-container:not(.overflow)::after {
  display: none;
}

#chat-title {

  mask-image: linear-gradient(to right, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
  white-space: nowrap;
  overflow: hidden;
  /* white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; */
  width: 100%;
  font-size: 12pt;
        font-weight: bold;
        padding: 24px;
        background: transparent;


}

#members-of-inquiry-stream {
  margin-right: 10px; /* Adjust the spacing as needed */
}

    #chat-container {
        flex: 1;
        overflow-y: auto;
        padding: 20px 65px 20px 20px;
        margin-bottom: 10px;
    }


    #knowledge-node-title {
        flex: 0 0 75%;
        min-width: 400px; 

        font-size: 12pt;
        font-weight: bold;
        padding: 24px;
        background: transparent;
      }


      #close-knowledge-node-column {
  margin-left: auto; /* Ensures the button is pushed to the right */
        margin-right: 24px;
}



#document-modal-overlay {

position: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background-color: rgba(43, 75, 135, 0.55);
z-index: 9998;
display: none;

}



#approval-modal-overlay {

position: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background-color: rgba(43, 75, 135, 0.55);
z-index: 9998;
display: none;

}


#document-modal-title-container {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    position: sticky;
    top: 0;
    background-color: white;
    border-bottom: 1px solid #e0e0e0;


}


#document-modal-title {
    flex: 1;
    font-size: 12pt;
    font-weight: bold;
    padding: 24px;
    background: transparent;

}


#document-modal-container {

    overflow-y: auto;
    height: 100%;
    flex: 1;
    padding: 20px;

}


#document-modal {

    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 0px;
    border-radius: 10px;
    box-shadow: rgba(43, 75, 135, 0.15) -15px 15px 25px;
    z-index: 9999;
    height: 90%;
    width: 90%;
    overflow: hidden;

}


#document-modal-tabs {
  display: flex;
  width: 100%;
  border-bottom: 1px solid #e0e0e0;
}

#document-modal-tabs button {
  width: 50%;
  padding: 15px 0;
  border: none;
  background-color: #f0f0f0;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease, color 0.3s ease;
  color: #333;
  font-weight: bold;
  text-transform: uppercase;
}

#document-modal-tabs button:hover {
  background-color: #e0e0e0;
}

#document-modal-tabs button.active {
  background-color: #ffffff;
  border-bottom: 3px solid #2b4b87;
  color: #2b4b87;
}

#document-modal-tabs button.active:hover {
  background-color: #f8f8f8;
}

#document-modal-tabs button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(43, 75, 135, 0.4);
}


#close-document-modal {
  margin-left: auto; /* Ensures the button is pushed to the right */
        margin-right: 24px;
}


#toggleThirdColumnButton:hover, #close-document-modal-button:hover {
  background-color: #DFE7EB; /* Optional: Change color on hover */
}

.cl-modalBackdrop {
  background-color: rgba(43, 75, 135, 0.55) !important;
}

      #chat-title-buttons-container {

        width: 25%;
        display: flex;
        flex: 1; /* Make the main panel take up the remaining space */
        font-size: 12pt;
        font-weight: bold;
        padding: 24px;
        background: transparent;
      }


      .chat-message {
  display: block;
  align-items: flex-start;
  margin-bottom: 10px;
}

.chat-message-body {
  display: flex;
}
.message-icon {
  width: 40px;
  height: 40px;
  background-color: #ccc;
  border-radius: 8px;
  margin-right: 10px;
}

.message-content {
  flex: 1;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.message-name {
  font-weight: bold;
}

.message-timestamp {
  font-size: 12px;
  color: #888;
}


    
    #conversationListContainer {
      margin: 0px;
}

.conversation-group {
  margin-bottom: 10px;
}

#documentsListContainer {
    /* border-radius: 10px; */
    margin: 0px;
    padding: 0px;
    /* border: 2px solid #000; */
}


.side-bar-panel-container {
  width: 100%;
  padding: 20px 20px 0px 20px;
  border-bottom: 1px solid rgba(43, 75, 135, 0.25);

}
/* 
.side-bar-tab-container {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid #ccc;
}

.side-bar-tab {
  padding: 10px 20px;
  cursor: pointer;
  text-align: center;
} */

.cards-container {
    margin: 20px 0px;
}

.card {
  background-color: #fff;
  /* border: 1px solid #ccc; */
  /* font-weight: bold; */
  /* background: linear-gradient(to right, #F9FBFF, #E4E8EF); */
  padding: 20px;
  margin-bottom: 20px;
  /* transform: translateX(-20px); */

  box-shadow: -15px 15px 25px rgba(43, 75, 135, 0.35);
  position: relative;
  border-radius: 10px; /* Adjust the value as per your requirement */
  border: solid 1px rgba(43, 75, 135, 0.25);
}

.card-content {
  display: flex;
  align-items: flex-start;
}

.icon-container {
  margin-right: 10px;
}

.text-container {
  flex-grow: 1;
}

/* Container styles */
.side-bar-tab-container {
  background-color: #DFE7EB;
  padding: 5px;
  margin: 20px 0px;
  border-radius: 20px;
  box-shadow: inset 0 5px 10px rgba(0, 0, 50, 0.1);
  display: flex;
  justify-content: space-between;
}

/* Tab styles */
.side-bar-tab {
  font-size: 11pt;
  opacity: 50%;

  display: inline-block;
  padding: 6px 16px;
  border-radius: 15px;
  /* background-color: #e0e0e0; */
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  flex-grow: 1;
  flex-basis: 0;
  text-align: center;
}

/* Active tab styles */
.side-bar-tab.active {
  opacity: 100%;
  border: solid 1px rgba(43, 75, 136, .1);
  background-color: #fff;
  box-shadow: 0 0px 5px rgba(0, 0, 0, 0.1);
  /* transform: translateY(-2px); */
}

/* Inactive tab hover styles */
.side-bar-tab:not(.active):hover {
  /* background-color: #d0d0d0; */
  opacity: 1;
}

/* .side-bar-tab.active {
  background-color: #f0f0f0;
} */


.side-bar-panel {
  display: none;
  /* padding: 20px; */
}

.side-bar-panel.active {
  display: block;
}





.delete-icon {
    display: inline-block;
    margin-left: 10px;
    padding: 0px 8px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
  }

  .delete-icon:hover {
    background-color: #DFE7EB;
  }


.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    padding: 0px 15px 0px 0px;
    height: 40px;


  }

  .listed-chat {
    flex-grow: 1;
    text-decoration: none;
    color: #2B4B87;
    width: 100%;
  }
/* 
  .active-chat {
    font-weight: bold;
  }
   */
.active-chat {
  /* background-color: #f0f0f0; */
  /* border: 1px solid #ccc; */
  /* font-weight: bold; */
  font-weight: 700;

  background: linear-gradient(to right, #F9FBFF, #E4E8EF);
  transform: translateX(-15px);
  margin-right: -15px;
  padding: 0px 15px;
  box-shadow: -3px 3px 5px rgba(43, 75, 135, 0.35);
  position: relative;
  border-radius: 10px; /* Adjust the value as per your requirement */
  border: solid 1px rgba(43, 75, 135, 0.25);
}


.no-results-message {
    padding: 20px;
    text-align: center;
    font-style: italic;
    color: #666;
}


.close-search-results {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    background-color: white;
    border-radius: 50%;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
}

.close-search-results:hover {
    background-color: #f0f0f0;
}

.close-search-results svg {
    display: block;
    width: 24px;
    height: 24px;
}


.reply-container {
  margin-left: 50px;
}
.child-stream-container {
  margin-left: 50px;
}

#status {

  padding: 0px 65px 0px 65px;

}

#user-button {

  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 10000;

}

#sign-in-container {
  display: block; /* Ensure it is displayed */
  position: fixed; /* Fix it to the viewport */
  top: 50%; /* Center vertically */
  left: 50%; /* Center horizontally */
  transform: translate(-50%, -50%); /* Adjust the position to center the container */
  z-index: 10001; /* Ensure it appears on top of other elements */
}


#input-group-container {
        padding: 30px 65px 65px 65px;
        width: 100%;

    }

    #checkbox-container-wrapper {

      background: #DFE7EB;
      padding-top: 10px;
      border-bottom-left-radius: 20px;
      border-bottom-right-radius: 20px;
    }

 #sources-checkbox-container {
  display: flex;
  flex-wrap: wrap;
  margin-left: 30px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-right: 30px;
}

.checkbox-text {
  margin-left: 5px;
}

#progress-container {
    margin: 30px 0px;
}
.progress-bar-wrapper {
    position: relative;
    width: 100%;
    height: 32px;
    background-color: rgba(43, 75, 135, .4);
    margin-bottom: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: rgb(43, 75, 135);
    color: white;
    line-height: 25px; /* Center text vertically */
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.progress-label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 10px;
    white-space: nowrap;
    color: white;
    font-weight: bold;
    z-index: 1;
}

.remove-progress {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background-color: rgba(43, 75, 135, .8);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    line-height: 1;
}

.remove-progress:hover {
    background-color: #555;
}

/* Hide FilePond's built-in progress indicator */
.filepond--item-panel {
    display: none !important;
}

@keyframes move-gradient {
    0% {background-position: 0% 0;}
    100% {background-position: 100% 0;}
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
    background-size: 200% 100%;
    animation: move-gradient 2s linear infinite;
}

.dropzone {
  width: 100%;
  height: auto;
  min-height: 200px;
  border: 2px dashed #ccc;
  border-radius: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  padding: 20px;
}

.dropzone:hover {
  background-color: #f0f0f0;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  grid-gap: 10px;
  margin-top: 20px;
  width: 100%;
}

.file-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 10px;
  border: 2px solid transparent;
  border-radius: 5px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.file-item:hover {
  background-color: #f0f0f0;
  border-color: #2B4B87;
}

.file-icon-wrapper {
  position: relative;
  margin-bottom: 5px;
}

.remove-button {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #ff0000;
  color: #ffffff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.file-item:hover .remove-button {
  opacity: 1;
}

.file-name {
  font-size: 12px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 100%;
}


#uploadButton {
  margin-top: 10px;
  width: 100%;
  height: 80px;
  border-radius: 10px;
  background-color: #2B4B87;
  color: #ffffff;
  font-size: 24px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#uploadButton:hover {
  background-color: #1E3A6D;
}

#uploadButton:focus {
  outline: none;
}

#uploadButton:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  opacity: 0;
  transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
}

#uploadButton:active:before {
  width: 200%;
  height: 200%;
  opacity: 1;
}


#approval-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    z-index: 1001;
    text-align: center;
}


.inquiry-title-container {
    position: relative;
    padding-right: 100px; /* Make room for the link */
}

.load-inquiry-link {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    color: #007bff;
    text-decoration: none;
    background-color: white;
    padding: 2px 5px;
    border-radius: 3px;
}

.inquiry-title-container:hover .load-inquiry-link {
    display: block;
}

.load-inquiry-link:hover {
    text-decoration: underline;
}


.hover-link {
    position: absolute;
    right: 10;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.title-container,
.inquiry-title-container,
.segment-container,
.message-container {
    position: relative;
    padding-right: 30px; /* Make room for the icon */
}

.segment-container {
    position: relative;
    overflow: hidden;
}

.segment-container::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 50px;
    height: 100%;
    background: linear-gradient(to right, rgba(43, 75, 135, 0), rgba(43, 75, 135, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.segment-container.hover::after {
    opacity: 1;
}


.pdf-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  

  #members-of-inquiry-stream {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-start;
    align-items: center;
    gap: 5px;
}

.member-square {
    width: 30px;
    height: 30px;
    background-color: #92a6b5;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 14px;
    border-radius: 4px;
}


#member-dropdown {
    background-color: white;
    border: 1px solid #ccc;
    max-height: 200px;
    overflow-y: auto;
    width: 200px;
}

#member-dropdown div {
    padding: 5px;
    cursor: pointer;
}

#member-dropdown div:hover {
    background-color: #f0f0f0;
}


.add-member-box {
    background-color: #808080; /* Grey background */
    color: white; /* White text color for the plus sign */
    cursor: pointer; /* Change cursor to pointer on hover */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px; /* Adjust the size of the plus sign as needed */
    font-weight: bold;
}

.add-member-box:hover {
    background-color: #707070; /* Slightly darker grey on hover */
}


#member-dropdown div.selected {
    background-color: #e0e0e0;
}


#current-members-container {
    margin-top: 20px;
}

.member-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.member-initials {
    width: 40px;
    height: 40px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
    font-weight: bold;
}

.member-info {
    flex-grow: 1;
}

.member-name {
    font-weight: bold;
}

.member-role-selector {
    border: none;
    padding: 0px 5px;
}

.member-role {
    font-size: 0.9em;
    color: #666;
}

.member-square {
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 5px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
}

.civi-member-square {
    background-color: white;
    border: 1px solid lightgrey;
    border-radius: 5px;
    position: relative;
}

.circle {
    position: absolute;
    border-radius: 50%;
}

.circle.small {
    width: 10px;
    height: 10px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(128, 0, 128, 0.3);
}

.circle.medium {
    width: 15px;
    height: 15px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(128, 0, 128, 0.4);
}

.circle.large {
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(128, 0, 128, 0.5);

}

.add-member-box {
    background-color: grey;
    color: white;
}

/* Container for the input box and dropdown */
.add-user-input-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    background-color: #DFE7EB;
    border-radius: 20px;
    padding: 8px;
}

/* Input box styling */
#user-to-add {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 0px 0px 0px 10px;
    border-radius: 20px 0 0 20px; /* Rounded corners for the left side */
    background-color: #DFE7EB; /* Match the background color of the container */
    color: black;
}

#user-role-container {
    padding: 0px 10px;
}

/* Dropdown styling */
#user-role {
    border: none;
    outline: none;
    background: transparent;
    padding: 0 5px;
    margin: 0;
    color: black;
    background-color: #DFE7EB; /* Match the background color of the container */
    border-radius: 0 20px 20px 0; /* Rounded corners for the right side */
    cursor: pointer;
}

#search-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

#search-box {
    padding: 8px 40px 8px 24px;
    width: 100%;
    border-radius: 20px;
    border: none;
    background-color: #DFE7EB;
    color: black;
}

#search-icon-container {
    position: absolute;
    top: 50%;
    right: 13px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-icon {
    width: 24px;
    height: 24px;
}


#searchIconX {
  display: none;
}

#searchIconX, #searchIconMagnify {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
}


#input-group-container-disabled {
    padding: 20px;
    text-align: center;
}

#input-group-container-disabled span {
    font-size: 14pt;
    font-weight: bold;
    color: #666;
}


.ref-link {
    position: relative;
    display: inline-block;
}

.in-text-entity {
    position: relative;
    display: inline-block;
}

.ref-link:hover .hover-menu {
    display: flex;
}

.in-text-entity:hover .hover-menu {
    display: flex;
}

.hover-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    color: white;
    /* transform: translateX(-50%); */
    background: #2B4B87;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    text-wrap: pretty;
    z-index: 1000;
}

.hover-menu a {
    margin: 0 5px;
    text-decoration: none;
    color: white;
    text-wrap: nowrap;
}

.hover-menu a:hover {
    text-decoration: underline;
}

.hover-menu hr {
    width: 100%;
    border: 1px solid #ddd; /* Style the <hr> element */
    margin: 10px 0; /* Add spacing around the <hr> element */
}

.ref-link, .in-text-entity {

    color: #2B4B87;
    font-weight: 800;
    text-decoration: none;

}

.ref-link:hover, .in-text-entity:hover {
    text-decoration: none;
    color: #2B4B87;

}


.icon-svg {
    margin-right: 4px; /* Adjust this value to add space between the icon and the text */
    vertical-align: middle;
}


.sort-dropdown {
  padding: 5px;
  border: 1px solid #2B4B87;
  border-radius: 4px;
  color: #2B4B87;
}



#in-context-container, #all-documents-container.active {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: white;
  min-height: 0;
}


#in-context-header, #all-documents-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px;
  background-color: #f5f5f5;
  border-bottom: 1px solid #ddd;
}


#all-documents-container {
  overflow-y: hidden;
}

/* Document Containers */
#all-documents,
#in-context-documents {
    border: 1px solid #e0e0e0;
    box-shadow: 0px 1px 3px rgba(43, 75, 135, 0.15);
    background-color: #d8e2f2;
    padding: 10px;
    transition: all 0.3s ease;
}

/* Add these properties to #all-documents to enable scrolling */
#all-documents {
    flex: 1;
    width: 100%;
    min-height: 0; /* Important for Firefox */
    overflow-y: auto;
}

/* These properties already exist for in-context-documents */
#in-context-documents {
    flex: 1;
    width: 100%;
    min-height: 0;
    overflow-y: auto;
}



.list-view .document-item {
  height: 50px;
  display: grid;
  grid-template-columns: auto minmax(200px, 2fr) minmax(100px, 1fr) minmax(80px, 1fr) minmax(100px, 1fr) auto;
  gap: 10px;
  padding: 0 10px;
  align-items: center;
  background: white;
  border: 1px solid rgba(43, 75, 135, 0.25);
  border-radius: 5px;
  min-width: 0;
}

/* List View */
#in-context-documents.list-view, #all-documents.list-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Document Items Shared Styles */
.document-item .doc-title,
.document-item .doc-authors,
.document-item .doc-year {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Icon and action button alignments for both views */
.document-item svg {
  display: flex;
  align-items: center;
  height: 100%;
}

.document-item span[data-document-id] {
  display: flex;
  align-items: center;
}

.document-item .doc-actions {
  display: flex;
  align-items: center;
  height: 100%;
}

/* List view specific alignments */
.list-view .document-item > * {
  line-height: 50px;
  margin: 0;
}


/* Middle Section - Flexible height with scroll */
.side-bar-panel-content {
  min-height: 0; /* Important for Firefox */
  position: relative;
  border-bottom: 1px solid rgba(43, 75, 135, 0.25);
}

.side-bar-panel {
  height: 100%;
  padding: 20px;
  overflow-y: auto;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}



.being-dragged {
  opacity: 0.5;
}

.remove-indicator {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  color: #ff4444;
  font-size: 24px;
}
.remove-indicator i {
  filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.3));
}
#in-context-documents .document-item {
  transition: none; /* Prevent sliding animation */
}


/* List view styles - shared */
.list-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-view li {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  margin: 0;
  gap: 10px;
}

.list-view .document-icon {
  flex-shrink: 0;
  width: 22px;
  height: 40px;
}

.list-view label, 
.list-view .truncated-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  padding: 0;
}

.list-view .document-actions {
  flex-shrink: 0;
  margin-left: auto;
}





/* Grid Container Styles */
#in-context-documents.grid-view,
#all-documents.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 15px;
}

/* Grid Item Styles */
.grid-view .document-item {
  height: 220px; /* Increased to accommodate all content */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  background: white;
  border: 1px solid rgba(43, 75, 135, 0.25);
  border-radius: 5px;
  position: relative;
}

/* Document Icon */
.grid-view .document-item svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

/* Title Styles */
.grid-view .document-item .doc-title {
  width: 100%;
  font-weight: 500;
  font-size: 0.95em;
  line-height: 1.2;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  max-height: 2.4em; /* 2 lines of text */
}

/* Author Styles */
.grid-view .document-item .doc-author {
  width: 100%;
  color: #666;
  font-size: 0.9em;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* Year Styles */
.grid-view .document-item .doc-year {
  width: 100%;
  color: #666;
  font-size: 0.9em;
  margin-bottom: 6px;
  text-align: center;
}

/* Ellipsis Button Styles */
.grid-view .document-item span[data-document-id] {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #2B4B87;
  font-size: 24px;
}

/* Ensure proper spacing between items */
.grid-view .document-item > * {
  margin: 0;
  padding: 0;
}

/* Remove any list styles if grid items are in a list */
.grid-view li {
  list-style: none;
}

/* Hover effect for items */
.grid-view .document-item:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-color: rgba(43, 75, 135, 0.4);
}


.doc-metadata {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9em;
  color: #666;
}

.doc-metadata span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 10px;
  padding: 10px;
  align-items: center;
  border-bottom: 1px solid #eee;
}
/* 
.grid-item {
  display: flex;
  flex-direction: column;
  padding: 15px;
  gap: 8px;
  border: 1px solid #eee;
  border-radius: 5px;
  margin: 5px;
  min-width: 200px;
  max-width: 250px;
} */




.doc-authors, .doc-year {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #666;
  font-size: 0.9em;
}

.remove-doc {
  background: none;
  border: none;
  color: #ff4444;
  cursor: pointer;
  padding: 5px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.remove-doc:hover {
  opacity: 1;
}





.side-bar-panel::-webkit-scrollbar,
.in-context-container::-webkit-scrollbar {
  width: 6px;
}

.side-bar-panel::-webkit-scrollbar-thumb,
.in-context-container::-webkit-scrollbar-thumb {
  background-color: rgba(43, 75, 135, 0.25);
  border-radius: 3px;
}

.side-bar-panel::-webkit-scrollbar-track,
.in-context-container::-webkit-scrollbar-track {
  background-color: transparent;
}

/* Document container base styles */
#documentsContainer {
  padding: 10px;
}

/* List view specific styles */
#documentsContainer.list-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#documentsContainer.list-view li {
  height: 40px; /* Fixed height for list items */
  display: flex;
  align-items: center;
  padding: 0 15px;
  margin: 0;
  gap: 10px; /* Space between elements */
}

#documentsContainer.list-view .document-icon {
  flex-shrink: 0; /* Prevent icon from shrinking */
  width: 22px;
  height: 40px;
}

#documentsContainer.list-view label {
  flex: 1; /* Take up remaining space */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  padding: 0;
}

#documentsContainer.list-view .document-actions {
  flex-shrink: 0; /* Prevent actions from shrinking */
  margin-left: auto;
}

.document-menu-trigger {
  font-size: 24px;
  cursor: pointer;
  color: #2B4B87;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.truncated-title {
  color: #2B4B87;
  font-weight: 700;
}

/* Documents header styling */
.documents-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 15px;
  padding: 0 5px;
}










.view-button {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #666;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-button svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.view-button.active {
  background: #f0f0f0;
  color: #000;
}

.view-button.active svg {
  opacity: 1;
}

/* Drag and Drop */
.being-dragged {
  opacity: 0.5;
}

.remove-indicator {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  color: #ff4444;
  font-size: 24px;
}

.remove-indicator i {
  filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.3));
}

/* Scrollbar Styling */
.side-bar-panel::-webkit-scrollbar,
.in-context-container::-webkit-scrollbar {
  width: 6px;
}

.side-bar-panel::-webkit-scrollbar-thumb,
.in-context-container::-webkit-scrollbar-thumb {
  background-color: rgba(43, 75, 135, 0.25);
  border-radius: 3px;
}

.side-bar-panel::-webkit-scrollbar-track,
.in-context-container::-webkit-scrollbar-track {
  background-color: transparent;
}



.view-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.view-toggle {
  display: flex;
  gap: 5px;
}

.view-button {
  background: none;
  border: 1px solid #2B4B87;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  color: #2B4B87;
  transition: all 0.2s ease;
}

.view-button:hover {
  background: rgba(43, 75, 135, 0.1);
}

.view-button.active {
  background: #2B4B87;
  color: white;
}




.view-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.view-toggle {
  display: flex;
  gap: 8px;
}

.view-button {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #666;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}


.view-button.active {
  background: #f0f0f0;
  color: #000;
}

.view-button.active svg {
  opacity: 1;
}


.sort-controls {
  display: flex;
  gap: 12px;
}

.sort-button {
  background: none;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
}

.sort-button:hover {
  background: #f0f0f0;
}

.sort-button i {
  font-size: 12px;
}


/* 

.grid-item {
  min-width: 150px;
  max-width: 200px;
}

.grid-item .doc-title, .grid-item .doc-authors, .grid-item .doc-year {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

 */








/* Toggle Switch */
.toggle-container {
  display: flex;
  align-items: center;
  margin-right: 20px;
}

.toggle-switch {
  position: relative;
  width: 200px;
  height: 40px;
  background-color: #DFE7EB;
  border-radius: 20px;
  padding: 4px;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  box-shadow: inset 0 5px 10px rgba(0, 0, 50, 0.1);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.toggle-switch::before,
.toggle-switch::after {
  position: absolute;
  line-height: 32px;
  width: 50%;
  text-align: center;
  z-index: 1;
}

.toggle-switch::before {
  content: "INCLUDE";
  left: 0;
}

.toggle-switch::after {
  content: "EXCLUDE";
  right: 0;
}

.toggle-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1), inset 0 -3px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.toggle-switch.exclude .toggle-slider {
  transform: translateX(100%);
}

.toggle-switch:hover {
  box-shadow: inset 0 6px 12px rgba(0, 0, 50, 0.15);
}