
   /* chat.css */

#chat-history {
    overflow-y: scroll; /* Permite el desplazamiento vertical */
    scrollbar-width: none; /* Para navegadores que soportan esta propiedad, como Firefox */
    -ms-overflow-style: none; /* Para Internet Explorer 10+ */
}

#chat-history::-webkit-scrollbar {
    display: none; /* Para navegadores basados en WebKit como Chrome y Safari */
}

.edit-mode .text {
    width: 80%; /* O el ancho específico que desees */
    box-sizing: border-box; /* Asegura que el padding y border estén incluidos en el ancho y altura */
}

.edit-mode .edit-input {
    display: block; /* O el display que desees */
    width: 80%; /* Asegura que el campo de texto ocupe todo el ancho disponible */
}

   i.far.fa-trash-alt.delete-message{
all: unset !important;
   }
.edit-controls{
   float: right;
}

.edit-controls {
    display: none;
    /* Resto de tus estilos aquí */
}

.message:hover .edit-controls {
    display: block;
}


#chat-container {
    width: 300px;
    height: 400px;
    border: 1px solid #ccc;
    padding: 10px;
    margin: 0 auto;
}
.double-tick {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.message-delivered .double-tick {
    opacity: 1;
}
.message.loading .message-body p:after {
    content: '.';
    animation: typing 1s steps(5, end) infinite;
    color: #808080; 
    font-style: italic; 
}

.message.loading .message-body{
    color: #808080; 
    font-style: italic;   
}


@keyframes typing {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}


#nightChat-container {
  position: fixed; /* Fixed position to stay at the bottom */
    bottom: 0; /* Align to the bottom */
    left: 0; /* Stretch across the screen */
    right: 0;
    display: flex;
    justify-content: center; /* Center the chat form if it's not full width */
    align-items: center;
    padding: 10px;
    z-index: 1000; /* Ensure it's above other content */
}
#chat-history {
   margin-bottom: 10px; /* Space between chat history and chat bar */
    max-height: calc(100vh - 50px); /* Adjust the 50px to the height of your chat bar */
        width: 100%; /* Full width */

    overflow-y: auto;
        display: flex;
    flex-direction: column; /* Newest messages at the bottom */
}
}

#chat-form {
    position: fixed; /* Stick to the bottom of the screen */
    bottom: 0; /* Align to the bottom */
    left: 0; /* Align to the left */
    right: 0; /* Align to the right */
    display: flex;
    align-items: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 22.5px;
    z-index: 1000; /* Ensure it's above other content */
}

/* Responsive adjustments */
@media (min-width: 320px) {
    /* Adjustments for small devices */
    #chat-form {
        width: 100%; /* Full width on small devices */
    }
}

@media (min-width: 768px) {
    /* Adjustments for medium devices like tablets */
    #chat-form {
        max-width: 600px; /* Max width for medium devices */
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 1024px) {
    /* Adjustments for large devices like desktops */
    #chat-form {
        max-width: 800px; /* Max width for large devices */
    }
}

form#chat-form{
      margin-left: auto;
    margin-right: auto;
    max-width: 800px;
    word-break: break-word;
    overflow-wrap: anywhere;
    padding-top: 1px;  
}

@media (max-width: 768px) {
button#ask-button {
    right: 50px!important;

}
}


@media (max-width: 768px) {
#chat-input {
    width: 62%!important;
}
}

#chat-input {
    height: 45px;
    width: 80%;
    border-radius: 22.5px;
    border: 1px solid rgba(230, 230, 230, 0.5);
    padding: 12px 16px;
    padding-right: 50px; /* Make space for the SVG icon */
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    outline: none;
    transition: all 0.2s;
    color: #000; /* Replace with your color variable */
    background: #fff; /* Replace with your color variable */
    flex-grow: 1;
    border-radius: 22.5px;
    border: none;
    padding: 12px 16px;
    padding-right: 50px; /* space for button */
    font-size: 0.875rem;
    font-weight: 500;
    outline: none;
    transition: all 0.2s;
}
 
.tabs.svelte-710i53 {
    margin-top: 0
}

.py-6 {
    padding-top: 2.5rem
}

  #send-button {
     position: absolute;
     display: inline!important;
    right: 10px;
    border: none;
    background: none;
    cursor: pointer;
    z-index: 999999;
  }

  #chat-input::placeholder {
  color: white; 
  opacity: 0.65;
}

    #send-button svg {
    height: 25px;
    width: 25px; 
    fill: #4d452b;
  }

.small-button {
    min-width: 0 !important;
    max-width: 171px;
    height: 39.594px;
    align-self: end;
}
input#chat-input{
    z-index: 99999;
}
.refresh-button {
    max-width: 4.4em;
    min-width: 2.2em !important;
    height: 39.594px;
    align-self: end;
    line-height: 1em;
    border-radius: 0.5em;
    flex: none;
}

.refresh-button-small {
    max-width: 2.2em;
}

.button_nowrap {
    white-space: nowrap;
}

#slim-column {
    flex: none !important;
    min-width: 0 !important;
}

.slim-dropdown {
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
}

#download-label, #upload-label {
    min-height: 0
}

.dark svg {
    fill: white;
}

.dark a {
    color: white !important;
}

ol li p, ul li p {
    display: inline-block;
}

#chat-tab, #default-tab, #notebook-tab, #parameters, #chat-settings, #lora, #training-tab, #model-tab, #session-tab {
    border: 0;
}

.gradio-container-3-18-0 .prose * h1, h2, h3, h4 {
    color: white;
}

.gradio-container {
    max-width: 100% !important;
    padding-top: 0 !important;
}

#extensions {
    margin-bottom: 35px;
}

.extension-tab {
    border: 0 !important;
}

span.math.inline {
    font-size: 27px;
    vertical-align: baseline !important;
}

div.svelte-15lo0d8 > *, div.svelte-15lo0d8 > .form > * {
    flex-wrap: nowrap;
}

.header_bar {
    background-color: #f7f7f7;
    margin-bottom: 20px;
    display: inline !important;
    overflow-x: scroll;
}

.dark .header_bar {
    border: none !important;
    background-color: #8080802b;
}

.textbox_default textarea {
    height: calc(100vh - 310px);
}

.textbox_default_output textarea {
    height: calc(100vh - 190px);
}

.textbox textarea {
    height: calc(100vh - 241px);
}

.textbox_default textarea, .textbox_default_output textarea, .textbox textarea {
    font-size: 16px !important;
    color: #46464A !important;
}

.dark textarea {
    color: #efefef !important;
}


.file-saver {
  position: fixed !important;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* center horizontally */
  max-width: 500px;
  background-color: var(--input-background-fill);
  border: 2px solid black !important;
  z-index: 1000;
}

.dark .file-saver {
  border: 2px solid white !important;
}

.checkboxgroup-table label {
    background: none !important;
    padding: 0 !important;
    border: 0 !important;
}

.checkboxgroup-table div {
    display: grid !important;
}

.markdown ul ol {
    font-size: 100% !important;
}

.pretty_scrollbar::-webkit-scrollbar {
  width: 10px;
}

.pretty_scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.pretty_scrollbar::-webkit-scrollbar-thumb,
.pretty_scrollbar::-webkit-scrollbar-thumb:hover {
  background: #c5c5d2;
  border-radius: 10px;
}

.dark .pretty_scrollbar::-webkit-scrollbar-thumb,
.dark .pretty_scrollbar::-webkit-scrollbar-thumb:hover {
  background: #374151;
  border-radius: 10px;
}

.pretty_scrollbar::-webkit-resizer {
  background: #c5c5d2;
}

.dark .pretty_scrollbar::-webkit-resizer {
  background: #374151;
}

/*****************************************************/
/*************** Chat UI declarations ****************/
/*****************************************************/

.h-\[40vh\], .wrap.svelte-byatnx.svelte-byatnx.svelte-byatnx {
    height: 66.67vh
}

.gradio-container {
    margin-left: auto !important;
    margin-right: auto !important;
}

.w-screen {
    width: unset
}

div.svelte-362y77>*, div.svelte-362y77>.form>* {
    flex-wrap: nowrap
}

.pending.svelte-1ed2p3z {
    opacity: 1;
}

#gradio-chatbot {
    height: 66.67vh;
}

.wrap.svelte-6roggh.svelte-6roggh {
    max-height: 92.5%;
}

/* This is for the microphone button in the whisper extension */
.sm.svelte-1ipelgc {
    width: 100%;
}

#chat-tab button, #notebook-tab button, #default-tab button {
    min-width: 0 !important;
}

#chat-tab > :first-child, #extensions {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

@media screen and (max-width: 710px) {
    #chat-tab {
        padding: 0px;
    }

    .chat {
        height: calc(100vh - 230px) !important;
    }
}


@media (max-width: 768px) {
 
    #options {
        left: -100px!important;
    }
}


.chat {
    margin-left: auto;
    margin-right: auto;
    max-width: 800px;
    height: calc(100vh - 286px);
    overflow-y: auto;
    word-break: break-word;
    overflow-wrap: anywhere;
    padding-top: 1px;
}

.chat > .messages {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;

}

.message-body li {
    margin-top: 0.5em !important;
    margin-bottom: 0.5em !important;
}

.message-body li > p {
    display: inline !important;
}

.message-body ul, .message-body ol {
    font-size: 15px !important;
}

.message-body ul {
    list-style-type: disc !important;
}

.message-body pre {
    margin-bottom: 1.25em !important;
}

.message-body code {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
}

.message-body :not(pre) > code {
    white-space: normal !important;
}

@media print {
    body {
        visibility: hidden;
    }

    .chat {
        visibility: visible;
        position: absolute;
        left: 0;
        top: 0;
        max-width: none;
        max-height: none;
        width: 100%;
        height: fit-content;
        display: flex;
        flex-direction: column-reverse;
    }
    
    .message {
        break-inside: avoid;
    }
    
    .gradio-container {
        overflow: visible;
    }
    
    .tab-nav {
        display: none !important;
    }
}
/* Align the elements for SD_api_picture extension */
.SDAP #sampler_box {
  padding-top: var(--spacing-sm);
  padding-bottom: var(--spacing-sm);
  border: 0;
}

.SDAP #steps_box {
  border-radius: 0 0 var(--block-radius) var(--block-radius);
}

.SDAP #sampler_col {
  gap: 0;
  padding: 0;
  background-color: transparent;
}

.SDAP #sampler_row {
    border-bottom: 0;
    box-shadow: var(--block-shadow);
    border-width: var(--block-border-width);
    border-color: var(--block-border-color);
    border-radius: var(--block-radius) var(--block-radius) 0 0;
    background: var(--block-background-fill);
    gap: 0;
}

.SDAP #sampler_row .refresh-button {
    margin-bottom: var(--spacing-sm);
    margin-right: var(--spacing-lg);
}

.SDAP #seed_box,
.SDAP #cfg_box {
  padding-top: var(--spacing-md);
}

.SDAP #sampler_box span,
.SDAP #seed_box span,
.SDAP #cfg_box span,
.SDAP #steps_box span {
  margin-bottom: var(--spacing-sm);
}

.SDAP svg.dropdown-arrow {
  flex-shrink: 0 !important;
  margin: 0px !important;
}

.SDAP .hires_opts input[type="number"] {
  width: 6em !important;
}

.message {
    padding-bottom: 25px;
    font-size: 15px;
    font-family: Helvetica, Arial, sans-serif;
    line-height: 1.428571429;
}

.circle-you {
    width: 50px;
    height: 50px;
    background-color: rgb(238, 78, 59);
    border-radius: 50%;
}

.circle-bot {
    width: 50px;
    height: 50px;
    background-color: rgb(59, 78, 244);
    border-radius: 50%;
    float: left;
    margin-right: 10px;
    margin-top: 5px;
}

.circle-bot img,
.circle-you img {
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.circle-you {
    margin-top: 5px;
    float: right;
}

.circle-bot + .text, .circle-you + .text {
    border-radius: 18px;
    padding: 8px 12px;
}

.circle-bot + .text {
background-color: rgb(0 0 0 / 85%);
float: left;
}

.circle-you + .text {
    float: right;
background-color: rgba(201, 60, 76, 0.9);
    margin-right: 10px;
}

.circle-you + .text div, .circle-you + .text *, .dark .circle-you + .text div, .dark .circle-you + .text * {
    color: #FFF !important;
}

.circle-you + .text .username {
    text-align: right;
}
}
.circle-you + .text .username2 {
    text-align: right;
}
}

.dark .circle-bot + .text div, .dark .circle-bot + .text * {
    color: #000;
}


.username {
    font-weight: bold;
    color: black;
}
.username2 {
    font-weight: bold;
    color: white;
    font-size: 18px;
}



.message-body img {
    max-width: 300px;
    max-height: 460px;
    border-radius: 20px;
}
@media (max-width: 767px) {
    message-body img {
        max-height: 320px;
    }
}

.message-body p {
    margin-bottom: 0 !important;
    color: white;
    font-size: 15px !important;
    line-height: 1.428571429 !important;
}

.dark .message-body p em {
    color: rgb(138, 138, 138) !important;
}

.message-body p em {
    color: rgb(110, 110, 110) !important;
}