/* =====================================================
   TPVNET - ESTILOS DEL CHATBOT
   Archivo: css/chatbot.css
   ===================================================== */


/* =====================================================
   BOTÓN FLOTANTE
   ===================================================== */

#tpvnet-chatbot {
    font-family: Arial, Helvetica, sans-serif;
}

#tpvnet-chatbot .tpvnet-chat-toggle {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 9999;

    padding: 14px 22px;

    border: none;
    border-radius: 30px;

    background-color: #ffe600;
    color: #202020;

    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: bold;

    cursor: pointer;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.20);

    transition: transform 0.2s ease;
}

#tpvnet-chatbot .tpvnet-chat-toggle:hover {
    transform: translateY(-3px);
}


/* =====================================================
   VENTANA DEL CHATBOT
   ===================================================== */

#tpvnet-chatbot .tpvnet-chat-window {
    display: none;

    position: fixed;
    right: 25px;
    bottom: 90px;

    width: 360px;
    max-width: calc(100vw - 30px);

    height: 500px;
    max-height: calc(100vh - 120px);

    background-color: #ffffff;

    border: 1px solid #e5e5e5;
    border-radius: 16px;

    overflow: hidden;

    z-index: 10000;

    font-family: Arial, sans-serif;

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.20);
}


/* Mostrar ventana al abrir el chat */

#tpvnet-chatbot .tpvnet-chat-window.is-open {
    display: flex;
    flex-direction: column;
}


/* =====================================================
   ENCABEZADO
   ===================================================== */

#tpvnet-chatbot .tpvnet-chat-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 16px;

    background-color: #202020;
    color: #ffffff;
}

#tpvnet-chatbot .tpvnet-chat-header strong {
    font-size: 16px;
}

#tpvnet-chatbot .tpvnet-chat-header small {
    display: block;

    margin-top: 3px;

    color: #dddddd;
    font-size: 12px;
}


/* Botón para minimizar */

#tpvnet-chatbot .tpvnet-chat-minimize {
    border: none;

    background: transparent;
    color: #ffffff;

    font-size: 24px;

    cursor: pointer;
}


/* =====================================================
   ÁREA DE MENSAJES
   ===================================================== */

#tpvnet-chatbot .tpvnet-chat-messages {
    display: flex;
    flex-direction: column;

    gap: 10px;

    flex: 1;
    min-height: 0;

    padding: 16px;

    overflow-y: auto;

    background-color: #f5f5f5;
}


/* =====================================================
   BURBUJAS DE MENSAJES
   ===================================================== */

#tpvnet-chatbot .tpvnet-chat-message {
    max-width: 92%;

    padding: 11px 13px;

    border-radius: 12px;

    background-color: #ffffff;
    color: #333333;

    font-size: 14px;
    line-height: 1.45;

    overflow-wrap: anywhere;

    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}


/* Mensajes del visitante */

#tpvnet-chatbot .tpvnet-chat-message-user {
    align-self: flex-end;

    background-color: #e5f4e8;
}


/* Mensajes del chatbot */

#tpvnet-chatbot .tpvnet-chat-message-bot {
    align-self: flex-start;
}


/* =====================================================
   CONTENEDOR DE OPCIONES
   ===================================================== */

#tpvnet-chatbot .tpvnet-chat-options {
    display: flex;
    flex-direction: column;

    gap: 8px;

    padding: 12px 16px;

    background-color: #ffffff;

    border-top: 1px solid #e5e5e5;
}


/* =====================================================
   BOTONES DE RESPUESTA
   ===================================================== */

#tpvnet-chatbot .tpvnet-chat-option {
    width: 100%;

    padding: 11px 14px;

    border: 1px solid #202020;
    border-radius: 8px;

    background-color: #ffffff;
    color: #202020;

    font-family: Arial, sans-serif;
    font-size: 14px;

    text-align: center;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

#tpvnet-chatbot .tpvnet-chat-option:hover {
    background-color: #f5f5f5;
    transform: translateY(-1px);
}


/* Opción principal */

#tpvnet-chatbot .tpvnet-chat-option-primary {
    background-color: #ffe600;
    border-color: #ffe600;

    font-weight: bold;
}

#tpvnet-chatbot .tpvnet-chat-option-primary:hover {
    background-color: #f0d900;
}


/* =====================================================
   ADAPTACIÓN PARA TELÉFONOS
   ===================================================== */

@media (max-width: 480px) {

    #tpvnet-chatbot .tpvnet-chat-toggle {
        right: 15px;
        bottom: 15px;
    }

    #tpvnet-chatbot .tpvnet-chat-window {
        right: 10px;
        bottom: 75px;

        width: calc(100vw - 20px);
        max-width: none;

        height: 70vh;
        max-height: 600px;
    }

}