/* Asistente virtual Bike & Roll — estilos del widget de chat */
#bnr-chat-launcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1040;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: #0d6efd;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, background 0.2s ease;
}
#bnr-chat-launcher:hover { transform: scale(1.08); background: #0b5ed7; }

#bnr-chat-window {
    position: fixed;
    bottom: 92px;
    right: 20px;
    z-index: 1041;
    width: 360px;
    max-width: calc(100vw - 32px);
    height: 480px;
    max-height: calc(100vh - 120px);
    display: none;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    font-family: inherit;
}
#bnr-chat-window.open { display: flex; }

#bnr-chat-header {
    background: #0d6efd;
    color: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#bnr-chat-header strong { font-size: 0.95rem; }
#bnr-chat-header small { display: block; opacity: 0.85; font-size: 0.75rem; }
#bnr-chat-close {
    background: none; border: none; color: #fff;
    font-size: 20px; cursor: pointer; line-height: 1; padding: 4px;
}
#bnr-chat-header-btns { display: flex; align-items: center; gap: 6px; }
#bnr-chat-whatsapp {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: #25d366; color: #fff; padding: 5px;
    transition: transform 0.15s ease;
}
#bnr-chat-whatsapp:hover { transform: scale(1.1); }

#bnr-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f6f8fa;
}
.bnr-msg {
    max-width: 82%;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}
.bnr-msg.user {
    align-self: flex-end;
    background: #0d6efd;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.bnr-msg.assistant {
    align-self: flex-start;
    background: #fff;
    color: #212529;
    border: 1px solid #e2e6ea;
    border-bottom-left-radius: 4px;
}
.bnr-msg.error {
    align-self: flex-start;
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}
.bnr-msg.assistant a { color: #0d6efd; font-weight: 600; word-break: break-all; }
.bnr-msg.assistant a:hover { text-decoration: underline; }
.bnr-typing { align-self: flex-start; color: #6c757d; font-style: italic; font-size: 0.85rem; }

#bnr-chat-form {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #e2e6ea;
    background: #fff;
}
#bnr-chat-input {
    flex: 1;
    border: 1px solid #ced4da;
    border-radius: 20px;
    padding: 9px 14px;
    font-size: 0.9rem;
    outline: none;
}
#bnr-chat-input:focus { border-color: #0d6efd; }
#bnr-chat-send {
    border: none;
    background: #0d6efd;
    color: #fff;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    cursor: pointer;
    font-size: 17px;
    flex-shrink: 0;
}
#bnr-chat-send:disabled { background: #9ec5fe; cursor: default; }

#bnr-chat-privacy {
    padding: 6px 12px;
    font-size: 0.7rem;
    color: #6c757d;
    background: #fff;
    text-align: center;
}
#bnr-chat-privacy a { color: #0d6efd; }

@media (max-width: 480px) {
    #bnr-chat-window {
        bottom: 0; right: 0;
        width: 100vw; max-width: 100vw;
        height: 100dvh; max-height: 100dvh;
        border-radius: 0;
    }
}
