* {
    box-sizing: border-box;
}


body {

    margin: 0;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

}


/* =========================================
   BOTÓN CHAT
========================================= */

.chat-button {

    position: fixed;

    right: 25px;

    bottom: 25px;

    width: 60px;

    height: 60px;

    border: none;

    border-radius: 50%;

    background: #111827;

    color: white;

    font-size: 26px;

    cursor: pointer;

    box-shadow:
        0 5px 20px
        rgba(0,0,0,.25);

    z-index: 9999;

}


/* =========================================
   VENTANA
========================================= */

.chat-window {

    position: fixed;

    right: 25px;

    bottom: 95px;

    width: 380px;

    height: 550px;

    background: white;

    border-radius: 15px;

    box-shadow:
        0 10px 40px
        rgba(0,0,0,.25);

    display: none;

    flex-direction: column;

    overflow: hidden;

    z-index: 9998;

}


/* =========================================
   HEADER
========================================= */

.chat-header {

    background: #111827;

    color: white;

    padding: 18px;

    display: flex;

    justify-content: space-between;

    align-items: center;

}


.online {

    color: #86efac;

    font-size: 12px;

    margin-top: 4px;

}


.close-button {

    border: none;

    background: transparent;

    color: white;

    font-size: 26px;

    cursor: pointer;

}


/* =========================================
   MENSAJES
========================================= */

.chat-messages {

    flex: 1;

    padding: 15px;

    overflow-y: auto;

    background: #f3f4f6;

}


.message {

    max-width: 90%;

    padding: 12px 15px;

    margin-bottom: 12px;

    border-radius: 12px;

    line-height: 1.5;

    font-size: 14px;

}


.message.user {

    margin-left: auto;

    background: #111827;

    color: white;

}


.message.assistant {

    margin-right: auto;

    background: white;

    color: #111827;

    box-shadow:
        0 1px 4px
        rgba(0,0,0,.10);

}


/* =========================================
   MENÚ
========================================= */

.menu-buttons {

    display: flex;

    flex-direction: column;

    gap: 8px;

    margin-top: 15px;

}


.menu-buttons button {

    width: 100%;

    padding: 12px;

    background: white;

    border: 1px solid #d1d5db;

    border-radius: 8px;

    cursor: pointer;

    text-align: left;

    font-size: 14px;

}


.menu-buttons button:hover {

    background: #f3f4f6;

}


/* =========================================
   PDF
========================================= */

.pdf-button {

    display: inline-block;

    margin-top: 10px;

    padding: 10px 15px;

    background: #111827;

    color: white;

    text-decoration: none;

    border-radius: 8px;

}


.pdf-button:hover {

    opacity: .85;

}


/* =========================================
   VOLVER
========================================= */

.back-menu {

    margin-top: 5px;

}


.back-menu button {

    border: none;

    background: transparent;

    color: #374151;

    cursor: pointer;

    font-size: 13px;

}


/* =========================================
   INPUT
========================================= */

.chat-input {

    display: none;

    padding: 10px;

    border-top: 1px solid #ddd;

    background: white;

}


.chat-input input {

    flex: 1;

    border: none;

    outline: none;

    padding: 12px;

    font-size: 14px;

}


.chat-input button {

    width: 45px;

    border: none;

    border-radius: 10px;

    background: #111827;

    color: white;

    font-size: 18px;

    cursor: pointer;

}


.chat-input button:disabled {

    opacity: .5;

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 500px) {

    .chat-window {

        right: 0;

        bottom: 0;

        width: 100%;

        height: 100%;

        border-radius: 0;

    }


    .chat-button {

        right: 20px;

        bottom: 20px;

    }

}