/* public/css/chatbot-responsive.css */

/* Contenedor principal */
.chatbot-container {
    width: 100%;
    max-width: 800px; /* Aumentado para mejor visualización en desktop */
    margin: 0 auto !important;
    float: none !important;
    border: 1px solid #ccc;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    background: #fff;
}

.test-content-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto !important;
    float: none !important;
    padding-left: 15px;
    padding-right: 15px;
}

.chatbot-header {
    background: #000;
    color: white;
    padding: 15px;
    text-align: center;
}

.chatbot-body {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Área de escribir (Corregido para que no se aplaste) */
.chatbot-footer {
    display: flex;
    align-items: stretch; /* Hace que el input y el botón tengan el mismo alto */
    border-top: 1px solid #ccc;
    width: 100%;
}

.chatbot-input {
    flex: 1; /* Esto le dice: "ocupa todo el espacio sobrante" */
    min-width: 0; /* Previene que el input desaparezca en pantallas muy pequeñas */
    padding: 15px;
    border: none;
    outline: none;
    font-size: 16px;
}

.chatbot-btn {
    flex-shrink: 0; /* Prohíbe que el botón se encoja */
    width: auto !important; /* Fuerza a que NO ocupe el 100% de la pantalla (evita conflictos con Bootstrap) */
    padding: 0 25px;
    background: #e3000f;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    white-space: nowrap; /* Evita que el texto "Enviar" salte a la siguiente línea */
}

/* =========================================================
   MEDIA QUERY PARA TABLETS
   ========================================================= */
@media screen and (max-width: 1024px) {
    .chatbot-container, .test-content-container {
        max-width: 90% !important;
    }
}

/* =========================================================
   MEDIA QUERY PARA CELULARES (Pantallas de 768px a 360px) 
   ========================================================= */
@media screen and (max-width: 768px) {
     .chatbot-container, .test-content-container {
        max-width: 95% !important;
    }
    .chatbot-body {
        height: 350px;
        padding: 15px 10px;
    }
}

@media screen and (max-width: 520px) {
    .chatbot-container, .test-content-container {
        max-width: 100% !important;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .chatbot-body {
        height: 320px; /* Reducimos la altura para que el teclado del celular no tape la pantalla */
        padding: 15px 10px;
    }

    .chatbot-input {
        padding: 12px 10px;
        font-size: 14px;
    }

    .chatbot-btn {
        padding: 0 15px;
        font-size: 14px;
    }
}