/* ─────────────────────────────────────────
   NOVASOFTMEDIA CHATBOT PREMIUM UI
───────────────────────────────────────── */

#nsm-chat-wrapper{
    position:fixed;
    bottom:25px;
    right:25px;
    z-index:999999;
    font-family:Inter,sans-serif;
}

/* ─────────────────────────
   BOTÓN FLOTANTE
───────────────────────── */

#nsm-chat-toggle{
    width:72px;
    height:72px;
    border:none;
    border-radius:50%;
    cursor:pointer;
    background:linear-gradient(135deg,#0b5cff,#2d8cff);
    box-shadow:
        0 10px 30px rgba(11,92,255,.35),
        inset 0 2px 10px rgba(255,255,255,.25);
    display:flex;
    align-items:center;
    justify-content:center;
    transition:.3s;
    overflow:hidden;
}

#nsm-chat-toggle:hover{
    transform:translateY(-4px) scale(1.05);
    box-shadow:
        0 15px 40px rgba(11,92,255,.45),
        inset 0 2px 12px rgba(255,255,255,.3);
}

#nsm-chat-toggle img{
    width:42px;
    height:42px;
    object-fit:contain;
}

#nsm-fallback-icon{
    font-size:30px;
    color:white;
}

/* ─────────────────────────
   CHAT BOX
───────────────────────── */

#nsm-chat-box{
    position:absolute;
    bottom:95px;
    right:0;
    width:390px;
    max-height:720px;
    background:white;
    border-radius:28px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    box-shadow:
        0 25px 80px rgba(0,0,0,.18),
        0 10px 30px rgba(11,92,255,.15);

    opacity:0;
    visibility:hidden;
    transform:translateY(30px) scale(.96);
    transition:.35s ease;
}

#nsm-chat-box.active{
    opacity:1;
    visibility:visible;
    transform:translateY(0) scale(1);
}

/* ─────────────────────────
   HEADER
───────────────────────── */

#nsm-chat-header{
    background:linear-gradient(135deg,#0b5cff,#2f8dff);
    color:white;
    padding:18px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

#nsm-chat-header-left{
    display:flex;
    align-items:center;
    gap:14px;
}

#nsm-chat-avatar{
    width:54px;
    height:54px;
    border-radius:50%;
    background:white;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    box-shadow:0 5px 15px rgba(0,0,0,.15);
}

#nsm-chat-avatar img{
    width:36px;
    height:36px;
}

#nsm-chat-title{
    font-size:18px;
    font-weight:700;
    display:block;
}

#nsm-chat-subtitle{
    font-size:13px;
    opacity:.9;
    display:flex;
    align-items:center;
    gap:7px;
    margin-top:3px;
}

.nsm-dot{
    width:8px;
    height:8px;
    background:#00ff8c;
    border-radius:50%;
    animation:pulse 1.5s infinite;
}

@keyframes pulse{
    0%{transform:scale(1);}
    50%{transform:scale(1.3);}
    100%{transform:scale(1);}
}

#nsm-chat-close-btn{
    background:rgba(255,255,255,.15);
    border:none;
    width:38px;
    height:38px;
    border-radius:12px;
    color:white;
    cursor:pointer;
    font-size:18px;
    transition:.25s;
}

#nsm-chat-close-btn:hover{
    background:rgba(255,255,255,.25);
}

/* ─────────────────────────
   MENSAJES
───────────────────────── */

#nsm-chat-messages{
    flex:1;
    padding:20px;
    overflow-y:auto;
    background:#f5f9ff;
}

.nsm-message{
    margin-bottom:16px;
    max-width:85%;
    padding:14px 18px;
    border-radius:20px;
    line-height:1.5;
    font-size:14px;
    animation:fadeIn .25s ease;
}

.nsm-bot{
    background:white;
    color:#222;
    border-top-left-radius:6px;
    box-shadow:0 5px 15px rgba(0,0,0,.05);
}

.nsm-user{
    background:linear-gradient(135deg,#0b5cff,#2d8cff);
    color:white;
    margin-left:auto;
    border-top-right-radius:6px;
    box-shadow:0 5px 15px rgba(11,92,255,.2);
}

@keyframes fadeIn{
    from{
        opacity:0;
        transform:translateY(10px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

/* ─────────────────────────
   BOTONES SUGERIDOS
───────────────────────── */

#nsm-chat-suggestions{
    padding:16px;
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    background:white;
    border-top:1px solid #eef3ff;
}

.nsm-suggestion{
    border:none;
    background:#edf4ff;
    color:#0b5cff;
    padding:11px 16px;
    border-radius:14px;
    cursor:pointer;
    font-weight:600;
    transition:.25s;
    font-size:13px;
}

.nsm-suggestion:hover{
    background:#0b5cff;
    color:white;
    transform:translateY(-2px);
}

/* ─────────────────────────
   INPUT
───────────────────────── */

#nsm-chat-input-area{
    padding:16px;
    background:white;
    display:flex;
    gap:12px;
    align-items:center;
    border-top:1px solid #eef3ff;
}

#nsm-chat-input{
    flex:1;
    border:none;
    background:#f3f7ff;
    border-radius:16px;
    padding:14px 16px;
    font-size:14px;
    outline:none;
}

#nsm-chat-input:focus{
    box-shadow:0 0 0 3px rgba(11,92,255,.15);
}

#nsm-chat-send{
    width:52px;
    height:52px;
    border:none;
    border-radius:16px;
    background:linear-gradient(135deg,#0b5cff,#2d8cff);
    color:white;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:.25s;
    box-shadow:0 8px 20px rgba(11,92,255,.25);
}

#nsm-chat-send:hover{
    transform:scale(1.06);
}

#nsm-chat-send svg{
    width:22px;
    height:22px;
}

/* ─────────────────────────
   FOOTER
───────────────────────── */

#nsm-chat-footer{
    padding:12px;
    text-align:center;
    background:white;
    border-top:1px solid #eef3ff;
}

#nsm-chat-footer a{
    color:#0b5cff;
    text-decoration:none;
    font-size:13px;
    font-weight:600;
}

/* ─────────────────────────
   MOBILE
───────────────────────── */

@media(max-width:480px){

    #nsm-chat-wrapper{
        right:15px;
        bottom:15px;
    }

    #nsm-chat-box{
        width:calc(100vw - 30px);
        right:0;
        bottom:90px;
        max-height:85vh;
    }

}