.ursa-messenger-widget{
    position:fixed;
    left:28px;
    bottom:28px;
    z-index:800;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
}

.ursa-messenger-toggle{
    width:46px;
    height:46px;
    border:none;
    border-radius:50%;
    background:var(--accent, #2b3795);
    color:#fff;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:0;
    transition:opacity .3s, transform .3s, background var(--tr, .3s ease);
    box-shadow:0 4px 18px rgba(var(--accent-rgb, 43,55,149), .35);
    -webkit-tap-highlight-color:transparent;
}

.ursa-messenger-toggle:hover{
    transform:translateY(-2px);
}

.ursa-messenger-toggle svg{
    width:20px;
    height:20px;
    fill:#fff;
}

.ursa-messenger-card{
    width:320px;
    max-width:calc(100vw - 32px);
    background:#fff;
    border-radius:18px;
    box-shadow:0 18px 50px rgba(0,0,0,.18);
    overflow:hidden;
    opacity:0;
    visibility:hidden;
    transform:translateY(10px);
    transition:all .22s ease;
    pointer-events:none;
    position:relative;
}

.ursa-messenger-widget.open .ursa-messenger-card{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
    pointer-events:auto;
}

.ursa-messenger-close{
    position:absolute;
    top:10px;
    right:10px;
    width:34px;
    height:34px;
    border:none;
    border-radius:50%;
    background:rgba(255,255,255,.18);
    color:#fff;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:24px;
    line-height:1;
    padding:0;
}

.ursa-messenger-card-head{
    background:#0084ff;
    color:#fff;
    padding:18px 16px;
    display:flex;
    align-items:center;
    gap:12px;
}

.ursa-messenger-avatar-wrap{
    width:46px;
    height:46px;
    border-radius:50%;
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 46px;
}

.ursa-messenger-avatar-icon{
    width:26px;
    height:26px;
    fill:#0084ff;
}

.ursa-messenger-head-text{
    display:flex;
    flex-direction:column;
    gap:2px;
    line-height:1.3;
}

.ursa-messenger-head-text strong{
    font-size:18px;
    font-weight:700;
    color:#fff;
}

.ursa-messenger-head-text span{
    font-size:14px;
    opacity:.95;
    color:#fff;
}

.ursa-messenger-card-body{
    padding:18px 16px 12px;
    font-size:15px;
    line-height:1.6;
    color:#1f2937;
    margin:0;
}

.ursa-messenger-send{
    display:block;
    margin:0 16px 16px;
    padding:14px 18px;
    border-radius:999px;
    background:#0084ff;
    color:#fff !important;
    text-align:center;
    text-decoration:none;
    font-weight:700;
    transition:opacity .2s ease, transform .2s ease;
}

.ursa-messenger-send:hover{
    opacity:.92;
    transform:translateY(-1px);
    color:#fff !important;
}

@media (max-width: 767px){
    .ursa-messenger-widget{
        left:28px;
        bottom:28px;
    }

    .ursa-messenger-toggle{
        width:46px;
        height:46px;
    }

    .ursa-messenger-toggle svg{
        width:20px;
        height:20px;
    }

    .ursa-messenger-card{
        width:min(300px, calc(100vw - 36px));
    }
}
