@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    /*align-items: center;*/
    min-height: 100vh;
    margin-top: 1px; 
    background:url('bg.jpg') no-repeat left bottom;
}

.wrapper {
/*    width: 90%;
    max-width: 900px;
*/
/*Agregado */
    position: absolute;
    width: calc(100% - 20px);
    max-width: 1024px;
    height: calc(100% - 20px);
    border-radius: 5px;
    background-color: #fff;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    background-color: #f8f8f8;
    overflow: hidden;
  
}

.wrapper .title {
    background: #396696;
    color: white;
    line-height: 2.5;
    border-radius: 1px 1px 0 0;
    text-align: center;
    font-size: 20px;
}

.wrapper .box {
    border: 1px solid #efefef;
    padding: 10px 15px;
    min-height: 85%;
    overflow-y: auto; 
    max-height: 85%;
}

.wrapper .box .item {
    display: flex;
    float: left;
    margin: 10px 0;
}

.wrapper .box .item .icon {
    /*background: #396696;*/
    background: url('bot5.png') no-repeat center #396696;
    color: white;
    width: 50px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
}

.wrapper .box .item .msg {
    background: #396696;
    color: white;
    border-radius: 10px;
    width: 100%;
    margin-left: 10px;
}

.wrapper .box .item .msg p {
    padding: 10px;
}

.wrapper .box .item.right {
    float: right;
}

.wrapper .box .item.right .msg {
    background: #efefef;
    border:1px solid #CCC;
    color: #333;
}

.wrapper .typing-area {
    width: 100%;
    background: #efefef;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.wrapper .typing-area .input-field {
    width: 100%;
    position: relative;
}

.wrapper .typing-area .input-field input {
    width: 100%;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 3px;
    outline: none;
    padding-right: 70px;
    font-family: 'Poppins', sans-serif;
    transition: 0.3s all ease;
}

.wrapper .typing-area .input-field input:focus {
    border-color: #007bff;
}

.wrapper .typing-area .input-field button {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid #396696;
    padding: 5px 10px;
    border-radius: 3px;
    color: #007bff;
    outline: none;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s all ease;
}

.wrapper .typing-area .input-field button:hover {
    background: #396696;
    color: white;
}

.wrapper .typing-area .input-field input:valid ~ button {
    opacity: 1;
    pointer-events: auto;
}

@media screen and (max-width: 1024px) {
    .wrapper {
        width: 100%; /* Adjust width for smaller screens */
        max-width: none; /* Remove max-width for smaller screens */
    }
}