.openAIModal .chat-container {
    margin-top: 20px;
    /* padding: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); */

    flex: 1;
    display: flex;
    flex-direction: column;
}

.openAIModal .conversations {
    min-width: 250px;
}

.openAIModal .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.openAIModal .header span.chat-label{
    width: 140px;
}

.openAIModal .online-icon {
    color: #28a745;
    /* Green color for online status */
}

.openAIModal .chat-messages {
    margin-bottom: 20px;
}

.openAIModal .message {
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
}

.openAIModal .user-info {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.openAIModal .user-info i {
    margin-right: 5px;
}

.openAIModal .user-name {
    font-weight: bold;
    margin-right: 10px;
}

.openAIModal .user {
    background-color: #353535;
    color: #fff;
}

.openAIModal .assistant {
    background-color: #f0f0f0;
    color: #000;
}

.openAIModal .chat-input {
    display: flex;
}

.openAIModal .system {
    background-color: darkred;
    color: white;
}

.openAIModal textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 0;
    resize: none;
    overflow-y: auto;
    max-height: 100px;
}

.openAIModal button {
    padding: 10px;
    background-color: #353535;
    color: #fff;
    border: 1px solid #353535;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.openAIModal .btnReset{
    border-radius: 5px 5px 5px 5px;
}

.openAIModal button i {
    margin-right: 5px;
}

.openAIModal pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}


.openAIModal nav {
    text-align: center;
    margin-top: 20px;
}

.openAIModal nav a {
    text-decoration: none;
    color: #333;
    padding: 10px 20px;
    margin: 0 10px;
    border: 1px solid #333;
    background-color: #f5f5f5;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.openAIModal nav a:hover {
    background-color: #ddd;
}

.openAIModal .prices {
    font-size: x-small;
    color: red;
}






.openAIModal  {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
  }

  /* Styles for the modal content */
  .openAIModal .modal-content {
    background: #fff;
    width: 80%; /* Set the width to 50% of the screen */
    max-width: 1500px;
    margin: 20px auto; /* Center the modal vertically with top and bottom margins */
    padding: 20px;
    border-radius: 5px;
    position: relative;
    top: 40px;
  }

  .openAIModal #modalContent{
    display: flex;
    height: 100%;
  }

  /* Style to close the modal */
  .openAIModal .close-modal {
    cursor: pointer;
    color: #333;
    font-size: 18px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 10px;
  }

  .openAIModal .select2{
    min-width: 250px;
  }

  .openAIModal .loader.show{
    background-image: url("https://dev.modulpark.ch/cfc/mp/AI/content/loading.gif");
    width: 50px;
    height: 50px;
    background-size: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    display: block;
  }
  .openAIModal .loader{
    display: none;
  }

  .openAIModal {
    overflow-y: auto;
    z-index: 10001;
  }

  .openAIModal .chat-messages{
    overflow-y: auto;
    /* max-height: 50vh; */
  }

  .openAIModal .images{
    display: flex;
    /* justify-content: space-between;  */
}
.openAIModal .imageContainer{
    max-width: 220px;
    padding: 5px;
}
.openAIModal .imageContainer .image{
    width: 100%;
}

.ai-toolbar-button .cke_button_label{
    display: block;
}

.openAIModal .chat-messages code{
    /*margin: 10px 0 15px 0;*/
    /*white-space: pre;*/
    padding: 5px;
}

.openAIModal .btn-download{
    width: 100%;
    border-radius: 5px;
}

.openAIModal #userInput{
    height: 60px;
}

.fancybox-button {
    display: none !important;
}

.fancybox-button.fancybox-button--close{
    display: inline-block !important;
}

.openAIModal .additional-container {
    flex: 0 0 200px; /* Adjust the width as needed */
    background-color: #f0f0f0; /* Optional: Add background color */
    display: flex;
    flex-direction: column;
  }

  .openAIModal .conversations .header {
    padding: 10px;
    background-color: #ddd; /* Optional: Add background color for the header */
  }

  .openAIModal .scrollable-list {
    flex: 1;
    overflow-y: auto;
  }

  .openAIModal .scrollable-list{
    margin: 0 5px 0 0;
}
.openAIModal .scrollable-list ul{
    list-style-type: none;
    padding-inline-start: 0;

}

.openAIModal .scrollable-list ul li{
    margin: 2px 0 2px 0;
    background-color: lightgrey;
    color: black;
    cursor: pointer;
    height: 30px;
    align-items: center;
    display: flex;
    padding-left: 10px;
}
.conversation-toggle i.fa{
    margin-top: auto;
}

.openAIModal .scrollable-list li.active{
    background-color: #353535;
    color: white;
}

.openAIModal .conversations .header{
    margin: 0 5px 5px 0;
    font-weight: bold;
}

.openAIModal .conversations{
    border-right: 1px solid lightgrey;
    margin-right: 5px;
}

.openAIModal .btnReset{
    height: 20px;
    padding: 0px 2px 0px 2px;
    background: darkgrey;
    border: none;
    border-radius: 2px;
}

.openAIModal .select2-selection--single,
.openAIModal .select2-selection--multiple{
    border-color: #ccc;
    min-height: 32px;
}

.openAIModal .chat-messages,
.openAIModal .chat-input{
    padding: 0 15px 0 15px;
}

.openAIModal .chat-messages{
    min-height: 140px;
}

.openAIModal .conversations-border {
    border-bottom: 1px solid lightgray;
    margin: 0 15px 0 15px;
}

.openAIModal .frmChat{
    margin-block-end: 0;
}

.openAIModal #modalContent{
    max-height: 80vh;
}

.openAIModal .chat-messages {
    height: 100%;
}

.openAIModal .conversations{
    display: flex;
    flex-flow: column;
}

.message.assistant pre code {
  text-align: start;   /* default */
  border: none;
  background: #fbfbfb;
}
.message.assistant pre{
    padding: 0;
}

.message{
    text-align: left;
}


/* General page */
.assistant-message-content body {
  font-family: system-ui, sans-serif;
  line-height: 1.6;
  margin: 20px;
  background: #fafafa;
  color: #333;
}

/* Headers */
.assistant-message-content h1, 
.assistant-message-content h2, 
.assistant-message-content h3 {
  border-bottom: 2px solid #eee;
  padding-bottom: 4px;
  margin-top: 1.4em;
  margin-bottom: 0.6em;
}

.assistant-message-content h1 { font-size: 1.8rem; color: #2c3e50; }
.assistant-message-content h2 { font-size: 1.5rem; color: #34495e; }
.assistant-message-content h3 { font-size: 1.2rem; color: #555; }

/* Paragraphs */
.assistant-message-content p {
  margin: 0.8em 0;
}

/* Tables */
.assistant-message-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
  font-size: 0.95rem;
}

.assistant-message-content th, 
.assistant-message-content td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: left;
}

.assistant-message-content th {
  background: #f2f4f6;
  color: #2c3e50;
  font-weight: 600;
}

.assistant-message-content tr:nth-child(even) td {
  background: #fafafa;
}

.assistant-message-content tr:hover td {
  background: #f0f8ff;
}

/* Code blocks */
.assistant-message-content pre {
  background: #272822;
  color: #f8f8f2;
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
}

.assistant-message-content code {
  font-family: "Fira Code", monospace;
  font-size: 0.9rem;
}



#previews {
  display: flex;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.file-chip {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  /*gap: 8px;
  padding: 8px;
  border: 1px solid #e3e3e7;*/
  border-radius: 10px;
  background: #fafafa;
  
  display: flex;
    flex-direction: column;
    max-width: 100px;
}

.file-thumb {
  /*width: 64px; height: 64px;*/ border-radius: 8px; object-fit: cover;
  background: #f0f0f3;
  display: block;
  
      max-height: 64px;
    width: -webkit-fill-available;
}

.file-icon {
  width: 64px; height: 64px; border-radius: 8px;
  display: grid; place-items: center;
  background: #eef1f6; font-weight: 700; font-size: 12px;
  color: #334; text-transform: uppercase;
}

.file-meta {
  min-width: 0;
  
      overflow-x: hidden;
    max-width: 100px;
    padding-left: 5px;
}
.file-name {
  font-size: 13px; font-weight: 600; color: #222;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  color: #fff;
}
.file-size {
  font-size: 12px; color: #666; margin-top: 2px;
}

.file-remove {
  border: 0; background: transparent; cursor: pointer;
  font-size: 18px; line-height: 1; color: #888; padding: 4px 6px;
  position: absolute;
    margin-left: 80px;
    background-color: transparent !important;
    border: none;
    margin-top: -10px;
    border: none !important;
}
.file-remove:hover { color: #c00; }

.file-progress {
  grid-column: 1 / -1;
  height: 4px; background: #eaeaea; border-radius: 20px; overflow: hidden; margin-top: 6px;
  width: 100px;
}
.file-progress > span {
  display: block; height: 100%; width: 0%;
  background: #6aa3ff; transition: width .2s linear;
}

.chat-input .text-container{
    display: flex;
}

.chat-container .chat-input{
    flex-direction: column;
}

#filePicker{
    display: none;
}

.openAIModal button.btnAddFiles {
    padding: 10px;
    background-color: #353535;
    color: #fff;
    border: 1px solid #353535;
    border-radius: 5px 0 0 5px;
    cursor: pointer;
}

.chat-messages .files-container .upload-file img{
    max-width: 120px;
}

.files-container{
    display: flex;
    gap: 20px;
}

.files-container .file-name{
    max-width: 120px;
}

.files-container .upload-file{
    margin-top: auto;
}