.chat-container {
  flex: 1;
  padding: 20px 20px 0 20px;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 90%;
  overflow-y: auto;
  overflow-x: hidden;
  align-items: center;
}

.underline {
  text-decoration: underline;
  text-decoration-color: rgb(1.18% 60.8% 89.8%);
  text-decoration-style: dotted;
  text-decoration-thickness:3px;
  cursor: pointer;
}

.chat-box {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  padding: 15px 0;
  overflow-wrap: break-word;
  margin: 0 auto;
  padding: 0px;
  padding-bottom: 30px;
  border-radius: 5px;
  width: min(100%, 1000px);
  display: flex;
  align-self: stretch; 
  flex-direction: column;
  height: auto;
  min-height: 0;
  flex-grow: 1;
}


.user-message {
  display: flex;
  justify-content: flex-end;
  margin: 10px 0; 
}

.user-message .bubble {
  background: rgb(1.18% 60.8% 89.8%);
  color: white;
  padding: 10px 15px;
  border-radius: 15px;
  max-width: 70%;
  text-align: left;
}

.bot-bubble {
  overflow: hidden;
  /* transition: height 0.5s ease; */
}

.bot-message .bubble .Text {
  transition: none !important;
}

.bot-bubble.expanding {
  min-height: 500px;
}

.bot-message {
  display: flex;
  justify-content: flex-start;
  margin: 10px 0; 
}

.bot-message .bubble {
  background-color: white;
  color: black;
  padding: 10px 15px;
  border-radius: 15px;
  max-width: 100%;
  text-align: left;
  width: 100%;
}

.colapse_div_button {
  display: flex;
  justify-content: space-between;
  width: 10.7rem;
  min-width: fit-content;
  background-color: #8c8c8c; 
  height: fit-content; 
  margin-right: 8px; 
  top: 0; 
  margin-bottom: 0.5rem; 
  border-radius:0.5rem; 
  color:white; 
  font-size: 0.8rem; 
  text-align: center; 
  padding-left: 0.6rem; 
  padding-right: 0.6rem; 
  padding-bottom: 0.3rem; 
  padding-top:0.3rem;
  cursor: pointer;
}

.fa-chevron-up {
  font-size: 0.5rem;
  margin-left: 0.5rem;
}

.fa-chevron-down {
  font-size: 0.5rem;
  margin-left: 0.5rem;
}

#first-botmessage {
  display: none;
}


#chatForm {
  display: flex;
  flex-direction: column;
  position: fixed;
  bottom: 5px;
  margin: 0;
  background-color: transparent;
  padding: 0.8rem;
  display: flex;
  align-items: center;
  border: none;
  z-index: 0;
  max-width: 700px;
  width: min(100%, 700px);
  font-size: 0.9rem;
}

.chat-input {
  height: auto;
  min-height: 6rem;
  min-width:300px;
  width: 100%;
  resize: none;
  background-color: #f1f1f1; 
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  padding: 0;
  display: flex;
  justify-content: center;
  border-radius: 24px;
  border: none;
 
}

#queryInput {
  top: 0;
  border: none;
  background-color: transparent;
  color: black;
  padding: 0;
  padding: 20px;
  outline: none;
  position: relative;
  font-family: inherit;
  margin-right: 10px;
  margin-left: 10px;
  width: 100%;
  height: auto;
  margin-bottom: 20px;
}


#queryInputButton {
  border-radius: 100%;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: none;
  background-color: linear-gradient(#3cabff, #4063f0) #3d84f7;
  bottom: 0;
  position: relative;
  align-self: end;
  justify-content: center;
  aspect-ratio: 1 / 1;
  align-items: center;
  margin-bottom: 10px;
  margin-right: 10px;
  color: white;
  cursor: pointer;
  transition: background 0.15s ease-in-out;
}

.colapse_div {
  color: #707070; 
  display: flex; 
  align-items: center; 
}

#queryInputButton:hover {
  background-color: #3a56e4;
}


.woogle-avatar-gpt {
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(50%, 300px);
  max-width: 300px;
}

.woogle-avatar {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  margin: 0;
  padding-top: 1%;
}



#queryInputButton {
  background-color: rgb(1.18% 60.8% 89.8%);
}

#queryInputButton:hover {
  background-color: #5f5f5f;
}

.main-container {
  display: flex;
  width: 100%;
  height: 80vh;
}

.pdf-viewer {
  position: fixed;
  top: 0;
  right: 0;
  width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: white;
  box-shadow: -3px 0 10px rgba(0, 0, 0, 0.3);
  background: transparent;

}

.pdf-content {
  display: flex;
  flex: 1;
  position: relative;
  flex-direction: row;
  height: 100%;
  width: 100%;
  background: transparent;
}

.pdf-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(238, 238, 238, 0.5);
  width: 100%;
  height: 100vh;
  z-index: 1;
}

.loading-overlay {
  position: relative;
  aspect-ratio: 595 / 842;
  margin: auto;
  margin-top: 20px;

  background: linear-gradient(75deg, 
              rgb(255, 255, 255) 25%,
              rgb(230, 230, 230) 50%,
              rgb(255, 255, 255) 75%);
  background-size: 200% 200%;
  width: 80%;
  animation: slideRight 1.5s linear infinite;
  z-index: 2;
}

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

#pdfContainer {
  width: 100%;
  height: calc(100% - 2.5rem);
  box-sizing: border-box;
  overflow-y: auto;
  background-color: rgb(238, 238, 238);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#pageNumber {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  height: 2rem;
  width: 2rem;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: 0.8rem;
  transition: background 0.15s ease-in-out;
}

.pageCanvas {
  display: block;
  margin: 10px auto;
  border: 1px solid #ccc;
}

.close-pdf-viewer-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem; 
  height: 2rem;
  width: 2rem;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease-in-out;
}

.pdf-link-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  height: 2rem;
  width: 2rem;
  cursor: pointer;
  padding: 0; 
  margin-left: 0.4rem;
  border-radius: 50%;
  transition: background 0.15s ease-in-out;
}

.pdf-link-btn:hover {
  background: #5f5f5f;
}

#zoomIn {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  height: 2rem;
  width: 2rem;
  cursor: pointer;
  padding: 0; 
  margin-left: 0.4rem;
  border-radius: 50%;
  transition: background 0.15s ease-in-out;
}

#zoomOut {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  height: 2rem;
  width: 2rem;
  cursor: pointer;
  padding: 0; 
  margin-left: 0.4rem;
  border-radius: 50%;
  transition: background 0.15s ease-in-out;
}

#zoomIn:hover {
  background: #5f5f5f;
}

#zoomOut:hover {
  background: #5f5f5f;
}

.woogle-link-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  height: 2rem;
  width: 2rem;
  cursor: pointer;
  padding: 0; 
  margin-left: 0.4rem;
  border-radius: 50%;
  transition: background 0.15s ease-in-out;
}

.woogle-link-btn:hover {
  background: #5f5f5f;
}

.close-pdf-viewer-btn:hover {
  background: #5f5f5f;
}

.pdf-banner {
  display: flex;
  background: #3498db;
  height: 2.5rem;
  flex-shrink: 0;
  color: white;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  align-items: center;
  padding-left: 0.2rem;
  z-index: 7;
}

.scroll-to-bottom-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  height: 1.8rem;
  width: 1.8rem;
  border-radius: 50%;
  aspect-ratio: 1/1;
  border: none;
  cursor: pointer;
  padding: 0;
  background-color: white;
  transition: background 0.15s ease-in-out, opacity 0.3s ease, visibility 0.3s ease;
  border: rgb(170, 170, 170);
  color: rgb(50, 54, 57);
  border-width: 1px;
  border-style: solid;

  margin-bottom: 0.6rem;
  visibility: hidden;
  opacity: 0;
}


.close-pdf-viewer-btn i {
  margin: 0;
  padding: 0;
  font-size: inherit;
}

.open-pdf-viewer-btn {
  position: relative;
  display: inline-block;
  line-height: 1.3rem;
  cursor: pointer;
  pointer-events: auto;
  color: white;
  background-color: #3498db;
  /* margin-right: 0.08em; */
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
  aspect-ratio: 1 / 1.2;
  font-size: 0.9rem;
  width: 1rem;
  /* height: 1.3rem; */
  vertical-align:text-bottom;
  top: -0.15em;  
  border-width: 1px;
  border-style: solid;
}

/* .open-pdf-viewer-btn:visited {
  color: purple;
}

.open-pdf-viewer-btn:hover {
  color: #c2c2c2;
} */



.fa-chevron-left {
  font-size: auto;
  flex-grow: 1;
}

.slider {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 0.8rem;
  flex-grow: 1;
  height: 100%;
  background: #ffffff;
  overflow: hidden;
  cursor:ew-resize;
  z-index: 2;
}


.textLayer {
  position: absolute;
  text-align: initial;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  line-height: 1.0;
  /* opacity: 0.4; */
  user-select: text;
  pointer-events: auto;
}

.textLayer span, .textLayer br {
  color: transparent;
  position: absolute;
  white-space: pre;
  cursor: text;
  transform-origin: 0% 0%;
}

.textLayer .highlight {
  margin: -1px;
  padding: 1px;
  background-color: rgba(180, 0, 170, 0.2);
  border-radius: 4px;
}

.textLayer ::selection { 
  background: rgba(0, 0, 255, 0.3); 
}

.pageDiv {
  position: relative;
  margin: 0 auto 10px auto;
  display: flex;
  justify-content: center;
}

.zoom-level {
  user-select: none;
}

#pdfContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
}


.hover-preview-tooltip {
  position: absolute;
  z-index: 2000;
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
  padding: 20px 10px 10px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-width: 20rem;
  width: max-content;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  pointer-events: auto;
  visibility: hidden;
  opacity: 0;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
}

.hover-preview-tooltip.shift-left {
  left: auto;
  right: 0;
  transform: translateX(2%);
  z-index: 10;
}

.hover-preview-tooltip.shift-left::after {
  left: auto;
  transform: translateX(2%);
  right: 10px;  
}

.hover-preview-tooltip.shift-left::before {
  left: auto;
  transform: translateX(2%);
  right: 10px;  
}

.open-pdf-viewer-btn:hover .hover-area,
.hover-area:hover {
  visibility: visible;
  opacity: 1;
}

.hover-preview-tooltip::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #fff;
}

.open-pdf-viewer-btn:hover .hover-preview-tooltip, .hover-area,
.hover-area:hover {
  visibility: visible;
  opacity: 1;
}

.reference-item {
  position: relative !important;
  transition: all 0.5s ease-in-out !important;
}

.highlight-ref::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(200, 200, 200, 0.7), rgba(160, 160, 160, 0.5));
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.highlight-ref.active::after {
  opacity: 1;
}

.fade-in-token {
  opacity: 0;
  animation: fadeIn 0.7s ease-out forwards;
}
@keyframes fadeIn {
  to { opacity: 1; }
}

.a-header {
  color: black;
  text-decoration: none;

}

.a-header:hover {
  color: rgb(1.18% 60.8% 89.8%);
}

[data-tooltip] {
  position: relative;
  cursor: pointer;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(255, 255, 255, 1);
  border: 1px solid #ccc;
  color: #000;
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.15s ease-in-out;
}

[data-tooltip]::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid rgba(255, 255, 255, 1);
  margin-top: 1px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
  z-index: 10000;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}


.llm-tooltip::after {
  position: absolute;
  font-weight: 500;
  font-size: 1.2em;
  background: rgba(255, 255, 255, 1) !important;
  color: #000 !important;
  top: 100%;
  left: 50%;
  transform: translateX(0%) translateY(0.7rem);
  opacity: 0;
  transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
}

.llm-tooltip::before {
  opacity: 0;
}

.llm-tooltip:hover::after {
  opacity: 1;
  transform: translateX(0) translateY(0.7rem);
}

.llm-tooltip:hover::before {
  opacity: 1;
  transform: translateX(50%) translateY(0.4rem);
}

.references {
  max-width: fit-content;
}

.references-title {
  font-size: 0.9rem;
  font-weight: 600; 
  margin-top: 0.5rem;
  font-family: sans-serif;
}

.reference-item {
  display: flex;
  align-items: flex-start;
  word-break: break-word;
  justify-content: left;
  margin-top: 0.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.3s ease-in-out, background-color 0.3s ease-in-out;
  background-color: white;
  opacity: 0;
  overflow: hidden;
}

.reference-item.show {
  opacity: 1;
  transition: background-color 0.3s ease-in-out;
}

.ref-title {
  font-size: 1rem;
}

.ref-preview {
  height: fit-content;
  /* border-radius: 10px; */
  background-color: white;
    border-radius: 10px;
  border: 2px solid #ccc;
}

.ref-preview iframe {
  height: 100%;
  aspect-ratio: 595 / 842;
  border-radius: 10px;
  border: none;
  background-color: white;
}

.ref-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 16px;
}

.ref-info .ref-title,
.ref-info .ref-page {
  margin: 4px 0;
}

.ref-page {
  font-size: 0.9rem;
}

.open-pdf-viewer-btn-ref {
  display: flex;
  pointer-events: auto;
  color: white;
  background-color: #3498db;
  border-radius: 7px;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
  right: 0;
  top: 0; 
  aspect-ratio: 1 / 1.2;
  font-size: 0.9rem;
  width: 1.2rem;
  border-width: 0px;
  border-style: solid;
  margin-left: 0.4rem;
}
