html,
body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100%;
    width: 100%;
    font-family: sans-serif;
    touch-action: none;
    /* evita zoom y desplazamiento accidental */
    -webkit-user-select: none;
    user-select: none;
}


#chat-container {
    z-index: 999;
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    width: 350px;
    max-height: 70vh;
    background: black;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

#asistente-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 5000;
}

#abrirChat {
    background: black;
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 15px;
    cursor: pointer;
    display: block;
}

#abrirChat:hover {
    background: #5e35b1;
}

#resultado {
    overflow-y: auto;
    max-height: 200px;
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 8px;
    border-radius: 6px;
    background: black;
    font-size: 0.95rem;
    white-space: pre-wrap;
    line-height: 1.4;
}

#entrada {
    flex: 1;
    padding: 5px;
}

.chat-controles input {
    flex: 1 1 100%;
    min-width: 0;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.chat-controles button {
    min-width: 0;
    font-size: 14px;

}

#chat-header button {
    background: none;
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding-left: 80px;
}

.chat-controles {
    display: flex;
    gap: 5px;
}

.chat-controles input {
    flex: 1;
    padding: 6px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

footer {
    position: fixed;
    bottom: 0;
    left: 10%;
    width: 100%;
    color: white;
    text-align: center;
    font-size: 0.75rem;
    padding: 6px;
    z-index: 10;
    opacity: 0.8;
}

@media screen and (max-width: 768px) {
    footer {
        font-size: 0.3rem;
        padding: 2px;
        left: 0;
        bottom: 0;
    }
}

@media screen and (max-width: 900px) and (orientation: portrait) {
    #resultado {
        max-height: 150px;
    }
    #chat-container {
        width: 90%;
        left: 5%;
        font-size: 0.9rem;
        padding-bottom: 50px;
    }
    #chat-header button {
        padding-left: 50px;
    }
    #info-panel {
        width: 90vw;
        /* si tienes uno externo */
    }
}

@media screen and (max-width: 600px) {
    .chat-controles {
        flex-direction: column;
    }

    .chat-controles input,
    .chat-controles button {
        width: 100%;
    }
}


@media only screen and (max-width: 768px) {
    #chat-container {
        width: 90%;
        left: 5%;
        font-size: 0.9rem;
        padding-bottom: 50px;
    }

    #chat-header button {
        padding-left: 50px;
    }

    #info-panel {
        width: 90vw;
        /* si tienes uno externo */
    }
}