.cw-wrap {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2147483647;
    font-family: Inter,system-ui,-apple-system,sans-serif
}

.cw-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--brand,#2377F5);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(35,119,245,.4);
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    position: relative
}

.cw-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(35,119,245,.5)
}

.cw-btn .cw-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #00B42A;
    border-radius: 50%;
    border: 2px solid #fff
}

.cw-panel {
    display: none;
    width: 380px;
    height: 520px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,.15);
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 12px;
    animation: cwIn .25s ease
}

.cw-panel.on {
    display: flex
}

@keyframes cwIn {
    from {
        opacity: 0;
        transform: translateY(12px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.cw-head {
    background: #2377F5;
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0
}

.cw-head .cw-av {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    font-size: 18px
}

.cw-head .cw-av img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.cw-head .cw-info {
    flex: 1;
    min-width: 0
}

.cw-head .cw-info .cw-name {
    font-size: 15px;
    font-weight: 600
}

.cw-head .cw-info .cw-status {
    font-size: 11px;
    opacity: .8
}

.cw-head .cw-close {
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all .2s;
    font-size: 18px
}

.cw-head .cw-close:hover {
    background: rgba(255,255,255,.15)
}

.cw-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #F5F6F8;
    display: flex;
    flex-direction: column;
    gap: 10px
}

.cw-msg {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    position: relative
}

.cw-msg img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    margin: 4px 0
}

.cw-lb {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    cursor: pointer
}

.cw-lb img {
    max-width: 92vw;
    max-height: 92vh;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,.3)
}

.cw-msg.u {
    align-self: flex-end;
    background: #2377F5;
    color: #fff;
    border-bottom-right-radius: 4px
}

.cw-msg-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 90%
}

.cw-msg-row.u-row {
    align-self: flex-end;
    flex-direction: row-reverse
}

.cw-msg-row.a-row {
    align-self: flex-start
}

.cw-msg-av {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 14px;
    background: #E5E6EB;
    color: #86909C
}

.cw-msg-av img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.cw-msg.a {
    align-self: auto;
    background: #fff;
    color: #1D2129;
    border: 1px solid #E5E6EB;
    border-bottom-left-radius: 4px;
    flex: 1;
    min-width: 0
}

.cw-msg .t {
    font-size: 10px;
    opacity: .5;
    margin-top: 4px;
    text-align: right
}

.cw-msg.a .t {
    color: #86909C;
    opacity: 1
}

.cw-foot {
    border-top: 1px solid #E5E6EB;
    padding: 10px 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    background: #fff;
    flex-shrink: 0
}

.cw-foot input {
    flex: 1;
    border: 1px solid #E5E6EB;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 14px;
    outline: none;
    background: #F5F7FA;
    transition: all .2s;
    color: #000;
}

.cw-foot input:focus {
    border-color: #2377F5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(35,119,245,.1)
}

.cw-foot .cw-upload {
    cursor: pointer;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #86909C;
    transition: all .2s;
    font-size: 18px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden
}

.cw-foot .cw-upload:hover {
    background: #F5F7FA;
    color: #2377F5
}

.cw-foot .cw-upload input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer
}

.cw-foot .cw-send {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #2377F5;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s
}

.cw-foot .cw-send:hover {
    background: #4096FF
}

.cw-typing {
    font-size: 12px;
    color: #86909C;
    padding: 0 4px;
    display: none
}
