 :root {
     --color-black: rgb(0, 0, 1);
     --color-red: rgb(242, 51, 51);
     --color-purple: rgb(180, 29, 216);
     --color-blue-violet: rgb(116, 99, 214);
     --color-blue: #0155a9;
     --color-olive: rgb(124, 160, 11);
     --color-orange: #ff9900;
     --color-yellow: rgb(255, 204, 0);
     --color-white: rgb(255, 255, 255);
     --color-black-ligth: #212529
 }

 .chat-container {
     position: fixed;
     bottom: 20px;
     right: 20px;
     z-index: 1000;
 }

 .chat-button {
     margin-bottom: 10px;
 }

 #chat-toggle {
     width: 60px;
     height: 60px;
     border-radius: 50%;
     background-color: #0155a9;
     color: white;
     border: none;
     font-size: 24px;
     cursor: pointer;
     box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
     transition: all 0.5s ease;
 }

 #chat-toggle:hover {
     background-color: var(--color-orange);
     transform: scale(1.1);
 }

 .chat-box {
     display: flex;
     /* Cambiado de 'block' a 'flex' */
     flex-direction: column;
     width: 300px;

     /* Altura fija para la animación */
     background-color: white;
     border-radius: 10px;
     overflow: hidden;
     transition: all 0.3s ease;
     opacity: 1;
     transform: translateY(0);
     position: absolute;
     bottom: 80px;
     /* Ajusta según sea necesario */
     right: 0;
 }

 .chat-box.hidden {
     opacity: 0;
     transform: translateY(20px);
     pointer-events: none;
 }

 .chat-header {
     background-color: #0155a9;
     color: white;
     padding: 10px;
     display: flex;
     justify-content: space-between;
     align-items: center;
     flex-shrink: 0;
     /* Evita que el encabezado se encoja */
 }

 .chat-header h3 {
     margin: 0;
 }

 #close-chat {
     background: none;
     border: none;
     color: white;
     font-size: 30px;
     cursor: pointer;
 }

 .chat-messages {
     flex-grow: 1;
     overflow-y: auto;
     padding: 10px;
     height: 300px;
 }

 .section-chat {
     display: flex;
     flex-direction: column;
     justify-content: center;
 }

 .chat-input {
     display: flex;
     padding: 10px;
     border-top: 1px solid #e0e0e0;
     background-color: #f8f8f8;
     align-items: flex-end;
 }

 .content-human {
     padding: 10px;
     text-align: center;
 }

 .btn-human {
     width: 100%;
     text-align: center;
     font-weight: 600;
     color: var(--color-orange);
     background-color: var(--color-white);
     border: 1px solid var(--color-orange);
     margin-right: 10px;
     border-radius: 20px;
     -webkit-transition: .3s all ease;
     -o-transition: .3s all ease;
     transition: .3s all ease;
     padding: 0.4rem
 }

 .btn-human:hover {
     background: var(--color-orange);
     border: 1px solid var(--color-white);
     color: var(--color-white);
 }

 #chat-input {
     flex-grow: 1;
     min-height: 38px;
     max-height: 100px;
     padding: 5px;
     border-radius: 5px;
     resize: none;
     overflow-y: auto;
     border: 1px solid var(--color-orange);
 }

 #chat-input:focus,
 #chat-input:active {
     outline: none;
     border: 2px solid var(--color-orange);
     box-shadow: 0 0 5px var(--color-orange);

 }

 #chat-input:hover {
     border: 1px solid var(--color-orange);
 }

 #sendButton {
     background-color: var(--color-orange);
     color: #fff;
     border: none;
     padding: 5px 10px;
     margin-left: 5px;
     border-radius: 5px;
     cursor: pointer;
     height: 38px;
 }

 .content-user {
     margin-bottom: 1rem;
     display: flex;
     justify-content: end;
 }

 .message-user {
     display: inline-block;
     background: var(--color-yellow);
     color: var(--color-white);
     border-radius: 20px;
     padding: 1rem 1rem;
     max-width: 700px;
     width: auto;
 }

 .typing-indicator {
     background-color: #e6e6e6;
     border-radius: 50px;
     padding: 10px;
     margin-bottom: 10px;
 }

 .dot {
     display: inline-block;
     width: 8px;
     height: 8px;
     border-radius: 50%;
     background-color: #3b5998;
     animation: wave 1.3s linear infinite;
     margin-right: 3px;
 }

 .dot:nth-child(2) {
     animation-delay: -1.1s;
 }

 .dot:nth-child(3) {
     animation-delay: -0.9s;
 }

 @keyframes wave {

     0%,
     60%,
     100% {
         transform: initial;
     }

     30% {
         transform: translateY(-10px);
     }
 }

 .message-user {
     display: inline-block;
     background: var(--color-yellow);
     color: var(--color-white);
     border-radius: 20px;
     padding: 1rem 1rem;
     max-width: 700px;
     width: auto;
 }

 .code-container {
     width: 280px;
 }
