﻿/* v202: badges AJAX de mensajes */
html body.am-body .am-pill-inbox.has-unread,
html body.am-body .am-nav-inbox.has-unread,
html body.am-body .am-bottom-inbox.has-unread{
    position:relative;
}
html body.am-body .am-inbox-nav-badge{
    min-width:18px;
    height:18px;
    padding:0 5px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-left:5px;
    background:linear-gradient(135deg,#ff49bb,#53d2ff);
    color:#fff;
    font-size:10px;
    line-height:1;
    font-weight:950;
    box-shadow:0 6px 16px rgba(255,73,187,.22);
    vertical-align:middle;
}
html body.am-body .am-bottom-inbox .am-inbox-nav-badge{
    position:absolute;
    top:-8px;
    right:-10px;
    margin:0;
    min-width:17px;
    height:17px;
    font-size:9px;
}
html body.am-body .am-pill-inbox.has-unread{
    border-color:rgba(83,210,255,.34) !important;
    box-shadow:0 0 0 1px rgba(83,210,255,.10) inset,0 10px 24px rgba(83,210,255,.12) !important;
}


/* v203: toast discreto para mensajes nuevos */
html body.am-body .am-live-message-toast{
    position:fixed;
    right:18px;
    bottom:calc(18px + env(safe-area-inset-bottom,0px));
    z-index:9999;
    width:min(360px,calc(100vw - 28px));
    min-height:62px;
    display:grid;
    grid-template-columns:42px minmax(0,1fr) auto;
    align-items:center;
    gap:10px;
    padding:10px 12px;
    border-radius:20px;
    border:1px solid rgba(255,255,255,.12);
    color:#fff;
    text-decoration:none;
    background:linear-gradient(145deg,rgba(18,21,39,.98),rgba(9,11,23,.98));
    box-shadow:0 24px 60px rgba(0,0,0,.34),0 0 0 1px rgba(83,210,255,.07) inset;
    transform:translateY(18px) scale(.98);
    opacity:0;
    pointer-events:none;
    transition:opacity .18s ease,transform .18s ease,border-color .18s ease;
}
html body.am-body .am-live-message-toast.is-visible{
    opacity:1;
    transform:translateY(0) scale(1);
    pointer-events:auto;
}
html body.am-body .am-live-message-toast__icon{
    width:42px;
    height:42px;
    border-radius:16px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,#ff49bb,#53d2ff);
    color:#fff;
    font-size:18px;
    font-weight:950;
    box-shadow:0 12px 28px rgba(255,73,187,.20);
}
html body.am-body .am-live-message-toast__copy{
    display:grid;
    gap:2px;
    min-width:0;
}
html body.am-body .am-live-message-toast__copy strong{
    color:#fff;
    font-size:14px;
    line-height:1.05;
    font-weight:950;
    letter-spacing:-.02em;
}
html body.am-body .am-live-message-toast__copy em{
    color:rgba(255,255,255,.62);
    font-style:normal;
    font-size:12px;
    line-height:1.2;
    font-weight:750;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
html body.am-body .am-live-message-toast__go{
    min-height:30px;
    padding:0 11px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.10);
    font-size:11px;
    font-weight:950;
}
@media(max-width:760px){
    html body.am-body .am-live-message-toast{
        left:12px;
        right:12px;
        bottom:calc(82px + env(safe-area-inset-bottom,0px));
        width:auto;
        border-radius:18px;
    }
}


/* v204: pulso visual suave cuando llega un mensaje nuevo */
html body.am-body .am-live-badge-pulse .am-inbox-nav-badge{
    animation:amInboxBadgePulse 1.25s ease-out 1;
}
html body.am-body .am-live-badge-pulse.am-pill-inbox,
html body.am-body .am-live-badge-pulse.am-nav-inbox,
html body.am-body .am-live-badge-pulse.am-bottom-inbox{
    filter:brightness(1.06);
}
@keyframes amInboxBadgePulse{
    0%{transform:scale(1);box-shadow:0 0 0 0 rgba(83,210,255,.34),0 6px 16px rgba(255,73,187,.22);}
    38%{transform:scale(1.18);box-shadow:0 0 0 8px rgba(83,210,255,.14),0 10px 24px rgba(255,73,187,.30);}
    100%{transform:scale(1);box-shadow:0 0 0 0 rgba(83,210,255,0),0 6px 16px rgba(255,73,187,.22);}
}
@media(prefers-reduced-motion:reduce){
    html body.am-body .am-live-badge-pulse .am-inbox-nav-badge{animation:none!important;}
}
