/* Styling for custom scrollbar within .ask-control */
.ask-control::-webkit-scrollbar {
  width: 8px;
  height: 5px;
  cursor: pointer;
}

.ask-control::-webkit-scrollbar-track {
  background-color: rgba(34, 34, 35, 0.36); /* Slightly transparent dark background */
}

.ask-control::-webkit-scrollbar-thumb {
  background-color: #aeaeae; /* Light gray thumb */
  border-radius: 5px;
  cursor: pointer;
}

.ask-control::-webkit-scrollbar-thumb:hover {
  background-color: #d3d3d3; /* Hover color for scrollbar thumb */
}

/* Override to align text to the left */
.text-right {
  text-align: left;
}

/* Styling for the main wrapper element */
.wrapper {
  position: fixed;
  left: 56.5%;
  top: 350px;
  transform: translateX(-50%);
  z-index: 1;
  text-align: center;
  color: #000000;
  font-family: 'Instrument Sans', sans-serif;
  max-width: 1200px;
  margin-bottom: 400px;
  display: flex;
  justify-content: flex-end; /* Push content to the end */
}

/* Adjust wrapper position to move it down */
.wrapper.move-down {
  top: 44rem;
}

/* Styling for form-group when sidebar is active */
.form-group {
  position: relative;
  bottom: 4px; /* Adjusts position to align content */
  margin-left: -10px; /* Offset to position it to the left initially */
  margin-bottom: 10px;
  color: #ededed;
  width: 800px;
  font-family: 'Instrument Sans', sans-serif;
  z-index: 99999;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.2); /* Shadow to create separation */
  transition: left 0.3s ease; /* Smooth transition */
}

.form-group.sidebar-active {
  margin-left: -180px; /* Moves form when sidebar is visible */
  transition: margin-left 0.3s ease;
}

/* Base styling for the expand button */
.expand-button {
  margin-left: 10px;
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
  background-color: #4a4a4a;
  color: #f1f1f1;
  border: none;
  border-radius: 5px;
  transition: margin-left 0.3s ease; /* Smooth transition for the margin */
}


/* Adjust arrow icon size */
.arrows {
  width: 20px;
  height: 20px;
  color: #ffffff;
}

.expand-button:hover {
  background-color: #5a5a5a;
}

.expand-button:hover::before {
  content: "Hape hapsiren e tekstit per pytje";
  display: inline-block;
  position: absolute;
  bottom: 140px;
  right: 200px;
  background-color: #d8d8d8bd;
  color: #000000;
  padding: 3px;
  z-index: 99999;
  border-radius: 4px;
  font-size: 11px;
  width: 140px;
}


/* Expanded textarea styling */
.ask-control.expanded {
  height: 50050px; /* Adjust this value as needed */
  max-height: 1000px;
  overflow-y: auto;
}

/* Base styling for ask-control */
.ask-control {
  width: 100%;
  padding: 10px;
  font-size: 14.5px;
  border: 2px solid #999999;
  padding-right: 50px; /* Adjust this value to match the width of the submit button */
  border-radius: 8px;
  background-color: #232323; /* Dark background */
  color: #f1f1f1; /* Light text color */
  resize: vertical;
  overflow-y: auto;
  min-height: 55px;
  max-height: 70px; /* Default max height for non-expanded state */
  transition: height 0.2s ease;
}

/* Adjusts margin for ask-control to add space between textarea and button */
.ask-control textarea {
  margin-right: 50px;
}


.modalText {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modalText.show {
  display: flex; /* Display modal when .show class is added */
}

.modalText-content::-webkit-scrollbar {
  width: 8px;
  height: 5px;
  cursor: pointer;
}

.modalText-content::-webkit-scrollbar-track {
  background-color: rgba(34, 34, 35, 0.36); /* Slightly transparent dark background */
}

.modalText-content::-webkit-scrollbar-thumb {
  background-color: #aeaeae; /* Light gray thumb */
  border-radius: 5px;
  cursor: pointer;
}

.modalText-content::-webkit-scrollbar-thumb:hover {
  background-color: #d3d3d3; /* Hover color for scrollbar thumb */
}



.modalText-content {
  background-color: #202226;
  padding: 30px;
  border-radius: 10px;
  margin-left: 200px;
  width: 90%; /* Wider modal */
  max-width: 1000px; /* Larger max-width */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow */
}

#modalText-textarea {
  width: 100%;
  height: 620px; /* Taller textarea */
  padding: 10px;
  color: white;
  background-color: #2f3137;
  font-size: 14px; /* Larger font size */
  border: 1px solid #676767;
  border-radius: 6px;
  resize: none;
}

.closeText-modal {
  margin-top: 15px;
  padding: 12px 25px;
  background-color: #3b7b34;
  color: #fff;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}






.answer-logo {
  position: absolute;
  top: 25px;
  left: 10px;
  height: 27px;
  width: 25px;
  margin-top: 10px;
  margin-left: 12px;
  border-radius: 5px;
  box-shadow: 0 5px 5px rgba(49, 49, 49, 0.4);
}

/* Style the generated text within the .answer block */
.answer {
  color: #e2e2e2;
  font-size: 14.5px;
  white-space: pre-wrap;
  font-family: 'Wix Madefor Text', sans-serif;
  overflow-wrap: break-word;
  word-wrap: break-word;
  z-index: 1;
  background-color: transparent;
  padding: 40px 50px 80px 70px;
  user-select: text;
  color: #FFFFFF;
  text-align: left;
  border-radius: 10px;
  height: auto;
  background-color: #232323;
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.479);
}

/* Style the generated text within the .answer-text block */
.answer-text {
  margin: 10px 0; /* Add margin to separate the generated text from other elements */
}


.answer-container {
  width: 56rem;
  margin-left:20rem;
  height:auto;
  border-radius: 10px;
  padding:0;
  margin-bottom:0;
  margin-top: 10px;
}


.code-container {
  background-color: rgba(28, 28, 28, 0.89);
  border-radius: 10px;
  padding: 5px;
  padding-top: 20px;
  padding-left: 30px;
  position: relative;
  margin-bottom: 10px;
}

.answer.loading {
  font-style: italic;
  color: gray;
}


.language-name {
  background-color:transparent; /* Change this to the desired background color */
  padding: 4px 8px;
  margin-bottom:20px;
  padding-left:310px;
  width: 700px;
  border-radius: 5px;
  font-size: 14px;
  color: #f6f6f6c4;
  box-shadow: 0 1px 0 rgba(49, 49, 49, 0.4);
}


.copy-button {
  background-color:transparent;
  color: #f6f6f6c4;
  font-size: 10px;
  cursor: pointer;
  padding: 5px 9px 5px 10px;
  border-radius: 7px;
  border: 0.2px solid #767676;
  box-shadow: 0px 0px 8px #363636;
  position: absolute;
  top:20px;
  right: 25px;
}



.copy-question:hover {
  background-color: #494949;
}

.copy-button.copied, .copy-question.copied {
  background-color: transparent; /* Replace with the desired color */
  color: #58d619;
  font-size: 10px;
}

.copy-question {
  background-color: transparent;
  color: #efefef;
  font-size: 9px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  padding: 2px 6px;
  position: absolute;
  top: 10px;
  right: 5px;
}


.highlighted-code {
  color: #f0f0f0; /* Replace with the desired color */
  background-color: transparent; /* Replace with the desired background color */
  font-size: 14.2px;
}



main::-webkit-scrollbar {
  width: 8px;
  height: 10px;
  cursor: pointer;
}

main::-webkit-scrollbar-track {
  background-color: transparent;
}

main::-webkit-scrollbar-thumb {
  background-color: #aeaeae;
  border-radius: 5px;
  cursor: pointer;
}

main::-webkit-scrollbar-thumb:hover {
  background-color: #d3d3d3;
}

.answer-container.move-down {
  position: relative;
  margin-bottom:-80px;
}

.question-text{
  margin-top: -45px;
  margin-bottom: -70px;
}


.chat-bubble {
  display: inline-block;
  border-radius: 10px;
  font-size: 14.5px;
  width: 50rem;
  margin-left:26rem;
  position: relative;
  white-space: pre-wrap;
  height: auto;
  padding: 100px;
  align-items: center;
}


.question {
  background-color: #232323;
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.479);
  color: #e6e6e6;
  text-align: left;
  padding: 0 60px 0 70px; /* Padding for the whole .question div */
  word-wrap: break-word; /* Allow long words to break and wrap to the next line */
}

.question-logo {
  position: absolute;
  padding: 0;
  top: -20px;
  left: -101px;
  height: 28px;
  width: 26px;
  margin-left: 32px;
  border-radius:6.5px;
  z-index: 1;
  box-shadow: 0 2px 2px rgba(72, 72, 72, 0.4);
}


.question-logo-container {
  position: relative;
  display: inline-block;
  padding: 0;
}


main {
  max-height: 680px;
  overflow-y: auto;
}

/* Styles for conversations */
.conversations {
  position: relative;
  display: flex;
  margin-top:2rem;
  flex-direction: column;
  margin-left: 15px; /* Reset the margin */
  transition: margin-left 0.3s ease; /* Add a transition for smooth movement */
}

/* Move .conversations to the right when the sidebar is active */
.sidebar.active ~ main .conversations {
  margin-left:99px; /* Adjust this value based on the width of the sidebar */
}

/* Media queries for different screen sizes */
@media only screen and (max-width: 1440px) {
  .answer-container {
    width: 55rem;
    margin-left:14rem;
  } 

  /* Move .conversations to the right when the sidebar is active */
.sidebar.active ~ main .conversations {
  margin-left:150px; /* Adjust this value based on the width of the sidebar */
}

.button-resubmit {
  top: 515px;
  left: 1160px;
}


  .wrapper {
    left: 52%;
    top: 250px;
    transform: translateX(-50%);
    z-index: 9999;
    text-align: center;
    max-width: 1200px;
  }

  .form-group.sidebar-active {
    margin-left:-80px;
  }

  .form-group{
    width: 680px;
    margin-left: 200px;
  }

  .answer, #sidebar-conversations li, .question, .ask-control {
    font-size: 14px;
  }


 
  #header {
    margin-left:120px;
  }

  main {
    max-height: 500px;
  }

  .wrapper.move-down {
    top: 520px;
  }

  .chat-bubble{
    width: 55rem;
    margin-left:14rem;
  }


  #excel{ 
    left:720px;
    top: -49px;
  }
  #pdf {
    left: 765px;
    top: -82px;
  }
  #word{
    left: 810px;
    top: -115px;
  }

  .delete-button {
    top: 45px; /* Position it at the top */
    left: 170px; /* Position it at the right */
  }
}

@media (max-width: 1024px) {
  .answer-container {
    width: 40rem;
    margin-left:12rem;
  } 
  .wrapper.move-down {
    top: 580px;
  }
  .chat-bubble{
    width: 40rem;
    margin-left:12rem;
  }

  .form-group{
    width: 600px;
  }
  #excel{ 
    left:480px;
    top: -49px;
  }
  #pdf {
    left: 525px;
    top: -82px;
  }
  #word{
    left: 570px;
    top: -115px;
  }


  .button-resubmit {
    top: 480px;
    left: 700px;
  }
  .delete-button {
display: none;
  }
}

@media only screen and (min-width: 768px) and  (max-width: 900px){
  #excel{ 
    left:210px;
    top: -49px;
  }
  #pdf {
    left:250px;
    top: -82px;
  }
  #word{
    left:290px;
    top: -115px;
  }


  #header {
    top:-150px;
    z-index: -1;
    width: auto;  
  }

  #modalText-textarea {
    width: 100%;
    height: 250px; /* Taller textarea */
    padding: 10px;
    font-size: 18px; /* Larger font size */
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: none;
  }
  



  .sidebar-active .footer-links{
    left:200px;
  }

  .original-footer{
    display: none;
  }


  .logo,
  .title {
    font-size: 39px;
    margin-left:-70px;
    margin-top: 100px;
    width: 5rem;
    white-space: nowrap;
  }

/* Move .conversations to the right when the sidebar is active */
.sidebar.active ~ main .conversations {
  margin-left:10px; /* Adjust this value based on the width of the sidebar */
}
  .button-resubmit {
    top: 60px;
    left: 160px;
  }

  .wrapper{
    width: auto;
    margin-left: 10rem;
    margin-top:70px;
  }

  #footer {
    display: none;
  }

  
  .chat-bubble {
    width: 345px;
    margin-left: 420px;
    padding: 0;
  }

  .language-name {
    padding: 4px 8px;
    margin-bottom:20px;
    padding-left:10px;
    width: 70px;
    font-size: 14px;
  }

  .highlighted-code {
    font-size: 10.5px;
  }
  
  .question {
    padding: 0 0 0 50px;
  }

  .question-logo {
    margin-left:35px;
    margin-right: 0px;
    top:-25px;
  }

  .wrapper.move-down .form-group {
    position: absolute;
    top:-450px;
    margin-left:-200px;
  }

  .wrapper.move-down .form-group.sidebar-active {
    position: absolute;
    top:-150px;
    margin-left:-300px;
  }

  .wrapper.move-down .button-submit {
    top: 10px;
    margin-left:300px;
    padding: 20px;
    position: relative;
  }

  .button-submit {
    right: -15px;
    font-size:0.1rem;
    border-radius: 5px;
    padding:6px;
    margin-bottom:5px;
  }

  .wrapper {
    top:170px
  }
  
  .wrapper.move-down {
    top: 550px; /* Adjust the top position as needed */
  }

  .answer::-webkit-scrollbar {
    width: 4px;
    height: 5px;
    cursor: pointer;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }


  .answer::-webkit-scrollbar-track {
    background-color: #151515dc;
  }
  
  .answer::-webkit-scrollbar-thumb {
    background-color: #8e8e8e;
    border-radius: 5px;
    cursor: pointer;
  }
  
  .answer::-webkit-scrollbar-thumb:hover {
    background-color: #a4a4a4;
  }
  
  .form-group {
    box-shadow: none;
    width: 320px;
    top:-80px;
    left:-282px;
  }

  .besa-logo {
    display: none;
  }

  .form-group.sidebar-active {
    box-shadow: none;
    width: 320px;
    top:-80px;
    left:-20px;
  }

  .answer-container {
    width: 350px;
    margin-left: 420px;
    margin-top:10px;
  }

  .sidebar-toggle {
    left:10px;
  }


  .button-resubmit {
    display: none;
  }
  

  .sidebar-toggle.active {
    left:200px;
  }

  .delete-button {
    top:0px;
    margin-top: 50px;
    margin-left:250px; 
    border-radius: 4px;
    position: absolute;
  }
  
  .button {
    display: none;
    }
    
  .answer-container.move-down {
    position: relative;
    margin-bottom:0;
    height:auto;
  }
  
  .answer-logo {
    height: 28px;
    width: 25px;
    margin-left:-1px;
    margin-top:-5px;
  }

  .question-text{
    margin-top: -50px;
    margin-bottom: -70px;
  }
  
  main {
    overflow-y: auto;
    max-height: 2000px;
  }


  .answer {
    font-size: 15px;
    user-select: text; /* Add this line to enable scrolling */
    padding:30px 30px 70px 45px;
    margin-right:5px;
  }

  .ask-control {
    font-size: 16px;
    margin-right:20px;
    max-height: 100px;
    width: 370px;
  }

  /* Styles for ask-control within conversations */
.wrapper.move-down .ask-control {
  font-size: 16px;
  margin-left:-40px;
  max-height: 100px;
  width: 350px;

}

.wrapper.move-down  .button-submit {
  right:30px;
  top:-50px;
  padding: 5px 5px;
}

  .kopje-button {
    font-size: 2px;
  }
}

/* Common styles for both desktop and Safari */
.dots {
  display: inline-block;
  margin-right: 7px;
  white-space: nowrap; /* Ensure the dots stay on a single line */
  animation-name: dots-move; /* Use the same animation for non-Safari browsers */
  animation-duration: 30.1s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  background-color: transparent;
}

/* Keyframes for desktop (non-Safari browsers) */
@keyframes dots-move {
  0% {
    width: 0; /* Start with no dots */
  }
  50% {
    width: 0.4em; /* Show one dot */
  }
  100% {
    width: 1.2em; /* Show three dots */
  }
}



/* Mobile Styles */
@media (max-width: 768px)  {
  .wrapper{
    width: auto;
    margin-left: 13rem;
    margin-top:-20px;
    z-index: 2;
  }
  

  .dots {
    display: inline-block;
    margin-right: 7px;
    white-space: nowrap; /* Ensure the dots stay on a single line */
    animation-name: dots-move; /* Use the same animation for non-Safari browsers */
    animation-duration: 30.1s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }
  
  /* Keyframes for Safari */
@keyframes dots-move-safari {
  0% {
    width: 0; /* Start with no dots */
  }
  50% {
    width: 0.4em; /* Show one dot */
  }
  100% {
    width: 1.2em; /* Show three dots */
  }
}
  
  .chat-bubble {
    background-color: #1f1f1fe1;
    width: 350px;
    margin-left: 10px;
    font-size: 15px;
    background-color: red;
    margin-bottom: 0;
  }

  .language-name {
    padding: 4px 8px;
    margin-bottom:20px;
    padding-left:10px;
    width: 70px;
    font-size: 14px;
  }

    /* Move .conversations to the right when the sidebar is active */
    .sidebar.active ~ main .conversations {
      margin-left:0px; /* Adjust this value based on the width of the sidebar */
    }

  .highlighted-code {
    font-size: 12px;
  }

  .code-container {
    background-color: rgba(35, 35, 35, 0.89);
  }
  
  .question {
    padding: 0 30px 0 55px;
    background-color: rgb(29, 29, 29);
    box-shadow: 0 3px 3px rgb(29, 29, 29);
  }

  .question-text{
    margin-top: -50px;
    margin-bottom: -70px;
  }

 
  .question-logo {
    margin-left:40px;
    margin-right: 0px;
    top: -28px;
    height: 26px;
    width: 24px;
  }

.wrapper.move-down .form-group {
  width: 280px;
}


.wrapper.move-down .ask-control {
  width: 340px;
  margin-left:-40px;
}

.wrapper.move-down .button-submit {
 right:-5px;
}

  .wrapper.move-down {
    top: 580px; /* Adjust the top position as needed */
  }

  /* Move form-group to the right when the sidebar is active on mobile */
  .form-group.sidebar-active {
    margin-right: 370px;
  }

  /* Default form-group styles for mobile */
  .form-group {
    width: 320px;
    margin-right: 650px;
  }

  .answer-container {
    width: 350px;
    margin-left: 15px;
    margin-top:8px;
  }

  .answer-container.move-down {
    position: relative;
    margin-bottom:-50px;
    height:auto;
  }
  
  .answer-logo {
    height: 28px;
    width: 25px;
    margin-left:0px;
    top:5px;
  }
  
  main {
    max-height: 520px;
    overflow-y: auto;
    margin-top:60px;
    margin-bottom:0;
    padding-bottom: 0;
  }

  .answer {
    font-size: 15px;
    user-select: text; /* Add this line to enable scrolling */
    padding:25px 20px 90px 50px;
    margin-right:5px;
    background-color: rgb(29, 29, 29);
    box-shadow: 0 3px 3px rgb(29, 29, 29);
  }

  .copy-button {
    top:10px;
    right:10px;
    font-size:8px;
  }

  .ask-control {
    font-size: 16px;
    margin-left:-15px;
    width: 370px;
    background-image: linear-gradient(to right, #1e1c1c 0%, rgb(32, 30, 30) 100%);
  }

  .kopje-button {
    font-size: 2px;
  }

  .conversations {
    position: relative;
    display: flex;
    margin-top:0;
    margin-left: 0; /* Reset the margin */
    transition: margin-left 0.3s ease; /* Add a transition for smooth movement */
  }

  #word {
    left: 280px;
    z-index: 1;
    top:-109px;
  }

  #excel {
    left: 200px;
    top:-49px;
    z-index: 1;
  }
  
  #pdf {
    left: 240px;
    top:-79px;
    z-index: 1;
  }

  .delete-button {
display: hide;
  }

  .button-resubmit {
    position: fixed;
    left:0;
    margin-left:352px;
    margin-top: 109px;
    z-index: 99999;
  }
  
}

.code-wrapper {
  position: relative;
}

.kopje-button {
  position: absolute;
  top: 7px;
  right: 7px;
  background-color: transparent;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 2px 7px;
  cursor: pointer;
  font-size:9px;
}

.kopje-button:hover {
  background-color: #494949;
}