body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-color: #f4f4f9;
}


.chat-header {
    background-color: #7357C1;
    color: white;
    padding: 10px 1px 90px 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    position: relative;
    z-index: 1;
  }

  .tittleHeader {
    font-size: 25px; /* <-- Tamaño base */
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
  }

.logo img {
    vertical-align: middle;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: white;
    border-radius: 10px;
    padding: 5px;
    margin: -85px 20px 10px 20px; /* ← Este margen negativo sube la tarjeta */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 2;
  }


.fontSize {
    width: 33px;
    height: 32px;
    font-size: 12px;
    margin: 5px;
    cursor: pointer;
    border: none;
    border-radius: 50%;
    background-color: #9e94f1;
    color: white;
    transition: background-color 0.3s ease;
}

.fontSize:hover {
    background-color: #eee3f5;
}

.fontSizeMin {
    width: 30px;
    height: 30px;
    font-size: 12px;
    margin: 5px;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    background-color: #9e94f1;
    color: white;
    transition: background-color 0.3s ease;
}

.fontSizeMin:hover {
    background-color: #eee3f5;
}


.textAdd {
    font-size: 16px;
}


.message {
    margin: 5px 0;
    padding: 8px 12px;   
    max-width: 80%;
    word-wrap: break-word;
    opacity: 1;
    transform: translateX(0);

}

/* .message.bot {
    align-self: flex-start;
    background-color: #f1f1f1;
    color: #333;
    animation: slideInFromLeft 0.5s ease forwards;        
} */

.message.bot.new {
    opacity: 0;    
    transform: translateX(-100%); 
    animation: slideInFromLeft 0.5s ease forwards;
   
}




@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
        /* Empieza desde la izquierda */
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}


.message.user {
    opacity: 1;
    transform: translateX(0);  
}

.message.user.new {
    opacity: 0;
    transform: translateX(100%);   
    animation: slideInFromRight 0.5s ease forwards;
   
}


@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#chat-container {
    width: 100vw; /* Que ocupe todo el ancho del viewport del iframe */
    height: 100vh; /* Que ocupe todo el alto del viewport del iframe */
    max-width: 430px; /* Ajuste máximo si lo necesitas */
    max-height: 648px;
    display: flex;
    flex-direction: column;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: fixed; 
    bottom: 0;  
    z-index: 9999;
}

/* 
@media (max-width: 1200px) {
    #chat-container {
        width: 330px;
        height: 500px;
    }
  } */


#messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-self: flex-end;
    border-top-left-radius: 18px;
    border-top-right-radius: 0px; 
    border-bottom-left-radius: 18px; 
    border-bottom-right-radius: 18px; 
    background-color: #7357C1;
    color: white;
}

.message.bot {
    align-self: flex-start;
    background-color: #ededed;
    border-top-left-radius: 0px;
    border-top-right-radius: 18px; 
    border-bottom-left-radius: 18px; 
    border-bottom-right-radius: 18px; 
    color: #333;
}

.chat-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 12px;
    color: gray;
    margin-top: 5px;
}


.message-footer-user {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 12px;
    color: rgb(212, 212, 212);
    margin-top: 5px;
    width: 100%;
}

.timestamp {
    margin-left: auto; /* Empuja la hora a la derecha */
}

li {
    line-height: 1.2;
    /* Ajusta este valor según lo necesites */
}

ul,
li {
    margin: 0;
    padding: 0;
}

#input-area {
  border-top: 2px solid #7357C1;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #f6f6f6;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

#user-input {
    flex: 1;
    padding: 10px 15px;
    border-radius: 20px;
    border: none;
    font-size: 14px;
    outline: none;
    background-color: white;
    box-shadow: 0 0 0 1px #e0e0e0;
  }

#send-btn {
    margin-left: 10px;
    padding: 10px 16px;
    background-color: #FF8300;
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
}

#send-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #7357C1;
    font-size: 20px;
  }

#send-btn:hover {
    background-color: #58419b;
}

#opciones {
    margin: 2px 0;    
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;    
    padding: 5px;    
    position: relative;    
}


#opciones button {
    background-color: #7c54e4;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    flex: 1;
    box-shadow: 9px 9px 20px rgba(58, 58, 58, 0.83);
    -webkit-box-shadow: 6px 6px 18px 0px rgba(99, 99, 99, 0.83);
    -moz-box-shadow: 6px 6px 18px 0px rgba(99, 99, 99, 0.83);
}

#opciones button:hover {
    background-color: #5c4692;
}



/* Loader base */
.message.loader {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 5px 0;
}

/* Animación de los puntos */
.loader-dots {
    display: inline-block;
    width: 40px;
    text-align: center;
}

.loader-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #6f56bb;
    /* Color del loader */
    border-radius: 50%;
    animation: loaderBounce 1.4s infinite ease-in-out both;
}

.loader-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loader-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.loader-dots span:nth-child(3) {
    animation-delay: 0;
}

@keyframes loaderBounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}


  
  