@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&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;
    position: relative;
    background: linear-gradient(135deg, #e0e7ef 0%, #f8fafc 100%); /* Fondo azul muy suave y neutro */
    /* background-image: url('bgg.jpg'); */
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: cover;
}

/* Usar un pseudo-elemento para el color de fondo semi-transparente */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1); /* Ajustar la opacidad aquí */
    z-index: 1;
    pointer-events: none; /* Asegura que el pseudo-elemento no interfiera con los eventos del ratón */
}

/* Asegurarse de que el contenido del body esté por encima del pseudo-elemento */
body > * {
    position: relative;
    z-index: 2;
}
.wrapper {
    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;
    display: flex;
    flex-direction: column;
}

.wrapper .title {
    background: #60a5fa; /* Azul más suave y neutro */
    color: white;
    line-height: 2.5;
    border-radius: 1px 1px 0 0;
    text-align: center;
    font-size: 20px;
    flex: 0 0 auto;
}

.wrapper .box {
    border: 1px solid #efefef;
    padding: 10px 15px;
    flex: 1 1 auto;
    overflow-y: auto;
}

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

.wrapper .box .item .icon {
    background: url('bot5.png') no-repeat center #60a5fa; /* Azul más suave y neutro */
    color: white;
    width: 50px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
}

.wrapper .box .item .msg {
    background: #efefef;
    color: #333;
    border-radius: 10px;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    word-break: break-word;
    box-sizing: border-box;
    padding: 0;
}

.wrapper .box .item .msg p {
    padding: 16px 20px;
    margin: 0;
    box-sizing: border-box;
}

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

.wrapper .box .item.right .msg {
    background: #60a5fa;
    border: 1px solid #60a5fa;
    color: white;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    word-break: break-word;
    box-sizing: border-box;
    padding: 0;
}

.wrapper .typing-area {
    width: 100%;
    background: #efefef;
    height: 90px;
    /* Increased height */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    flex: 0 0 auto;
}

.wrapper .typing-area .input-field {
    width: 100%;
    position: relative;
    height: 100%;
    /* Ensure input field takes full height */
}

.wrapper .typing-area .input-field input {
    width: 100%;
    height: 100%;
    /* Ensure input field takes full height */
    padding: 15px;
    /* Adjust padding for better appearance */
    border: 1px solid transparent;
    border-radius: 3px;
    outline: none;
    padding-right: 100px;
    /* Adjusted for button width */
    font-family: 'Poppins', sans-serif;
    transition: 0.3s all ease;
}

.wrapper .typing-area .input-field input:focus {
    border-color: #60a5fa;
}

.wrapper .typing-area .input-field button {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid #60a5fa;
    padding: 15px 20px;
    /* Increased padding for larger button */
    border-radius: 3px;
    color: #60a5fa;
    outline: none;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s all ease;
}

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

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

@media screen and (max-width: 1024px) {
    .wrapper {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }

    .wrapper .box {
        min-height: calc(100% - 120px);
        /* Adjusted for increased height */
        max-height: calc(100% - 120px);
    }
}