﻿#invtChat {
    position: fixed;
    inset-block-end: 24px;
    inset-inline-end: 24px;
    z-index: 200;
    font-family: var(--font-body)
}

.cbubble-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--signal);
    color: #fff;
    padding: 14px 20px 14px 16px;
    box-shadow: 0 14px 34px rgba(214,0,42,.38);
    transition: transform .3s,box-shadow .3s,opacity .3s;
    clip-path: polygon(0 0,100% 0,100% 100%,14px 100%,0 calc(100% - 14px));
}

    .cbubble-btn:hover {
        transform: translateY(-3px)
    }

    .cbubble-btn.hidden {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: scale(.85)
    }

.cbubble-txt {
    font-size: 14.5px;
    font-weight: 700;
    white-space: nowrap
}

.cpanel {
    position: fixed;
    inset-block-end: 24px;
    inset-inline-end: 24px;
    z-index: 210;
    width: min(380px,calc(100vw - 32px));
    height: min(580px,calc(100vh - 48px));
    background: #fff;
    border: 1px solid var(--rule);
    box-shadow: 0 30px 80px rgba(12,20,32,.32);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(.97);
    transition: .28s;
}

    .cpanel.open {
        opacity: 1;
        visibility: visible;
        transform: none
    }

.cpanel-head {
    background: var(--ink);
    color: #fff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0
}

.cpanel-title {
    display: flex;
    align-items: center;
    gap: 10px
}

.cdot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #37D67A;
    box-shadow: 0 0 0 3px rgba(55,214,122,.22)
}

.cpanel-title b {
    display: block;
    font-size: 14.5px;
    font-weight: 700
}

.cpanel-title small {
    display: block;
    font-size: 11.5px;
    color: rgba(255,255,255,.55);
    margin-top: 2px
}

.cpanel-actions {
    display: flex;
    gap: 6px
}

    .cpanel-actions button {
        width: 30px;
        height: 30px;
        display: grid;
        place-items: center;
        color: rgba(255,255,255,.75);
        border: 1px solid rgba(255,255,255,.18);
        transition: .2s;
        font-size: 14px
    }

        .cpanel-actions button:hover {
            background: rgba(255,255,255,.1);
            color: #fff
        }

.cpanel-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--paper)
}

.cmsg {
    display: flex
}

    .cmsg.me {
        justify-content: flex-end
    }

.cbubble {
    max-width: 86%;
    padding: 11px 15px;
    font-size: 14px;
    line-height: 1.85;
    border: 1px solid var(--rule);
    background: #fff
}

.cmsg.me .cbubble {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink)
}

.ctyping {
    display: flex;
    gap: 5px;
    padding: 14px 16px
}

    .ctyping span {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--muted);
        display: block;
        animation: ctb 1.2s infinite ease-in-out
    }

        .ctyping span:nth-child(2) {
            animation-delay: .15s
        }

        .ctyping span:nth-child(3) {
            animation-delay: .3s
        }

@keyframes ctb {
    0%,60%,100% {
        opacity: .3;
        transform: translateY(0)
    }

    30% {
        opacity: 1;
        transform: translateY(-3px)
    }
}

.ccards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 92%
}

.ccard {
    display: flex;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--rule);
    padding: 12px;
    transition: .25s
}

    .ccard:hover {
        border-color: var(--ink);
        box-shadow: 0 14px 30px rgba(12,20,32,.12)
    }

.ccard-img {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    background: var(--paper);
    overflow: hidden
}

    .ccard-img img {
    height: 100%;
    object-fit: fill;
    padding: 6px
}

.ccard-body h5 {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 4px
}

.ccard-go {
    font-size: 12px;
    font-weight: 700;
    color: var(--signal)
}

.cchips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 18px 12px;
    flex-shrink: 0
}

.cchip {
    font-size: 12px;
    padding: 8px 12px;
    border: 1px solid var(--rule);
    color: var(--muted);
    background: #fff;
    transition: .2s
}

    .cchip:hover {
        border-color: var(--signal);
        color: var(--signal)
    }

.cpanel-input {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--rule);
    background: #fff;
    flex-shrink: 0
}

    .cpanel-input textarea {
        flex: 1;
        resize: none;
        border: 1px solid var(--rule);
        padding: 11px 14px;
        font: inherit;
        font-size: 14px;
        max-height: 96px;
        background: #FAFBFC
    }

        .cpanel-input textarea:focus {
            outline: none;
            border-color: var(--signal);
            background: #fff
        }

    .cpanel-input button {
        width: 42px;
        height: 42px;
        flex-shrink: 0;
        background: var(--signal);
        color: #fff;
        font-size: 16px;
        display: grid;
        place-items: center;
        transition: .25s
    }

        .cpanel-input button:hover:not(:disabled) {
            background: var(--signal-hot)
        }

        .cpanel-input button:disabled {
            opacity: .5
        }

@media(max-width:480px) {
    #invtChat {
        inset-block-end: 16px;
        inset-inline-end: 16px
    }

    .cpanel {
        inset: 12px;
        width: auto;
        height: auto
    }

    .cbubble-txt {
        display: none
    }

    .cbubble-btn {
        padding: 14px;
        clip-path: none;
        border-radius: 50%
    }
}
