.staffChatCard {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 80;
    width: 300px;
    margin: 0;
    padding: 10px;
    border: 2px solid rgba(0,120,157,.22) !important;
    border-radius: 16px !important;
    background: rgba(255,250,245,.98) !important;
    box-shadow: 0 14px 38px rgba(0,0,0,.18) !important;
    backdrop-filter: blur(8px);
}

.staffChatHead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.staffChatTitle {
    min-width: 0;
}

.staffChatHead h2 {
    margin: 1px 0 0 !important;
    color: #00789d !important;
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 15px !important;
    line-height: 1.05;
    text-transform: uppercase;
    white-space: nowrap;
}

.staffChatEyebrow {
    display: block;
    color: #f6a30a;
    font-size: 7px;
    font-weight: 950;
    letter-spacing: .12em;
}

.staffChatHeadActions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.staffChatUnread {
    min-width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #b42318;
    color: #fff;
    font-size: 9px;
    font-weight: 950;
}

.staffChatUnread.hide {
    display: none;
}

.staffChatLive {
    flex: 0 0 auto;
    padding: 5px 7px;
    border-radius: 999px;
    background: #e8f7ee;
    color: #176b3a;
    font-size: 8px;
    font-weight: 950;
}

.staffChatToggle {
    min-width: 31px;
    height: 29px;
    padding: 0 8px;
    border: 0;
    border-radius: 8px;
    background: #00789d;
    color: #fff;
    font-size: 10px;
    font-weight: 950;
}

.staffChatBody {
    margin-top: 8px;
}

.staffChatMessages {
    height: 128px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 7px;
    border: 1px solid #e8ded4;
    border-radius: 10px;
    background: #fff;
}

.staffChatMessage {
    width: 90%;
    margin: 0 0 7px;
}

.staffChatMessage.mine {
    margin-left: auto;
}

.staffChatMeta {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin: 0 4px 3px;
    color: #6b7280;
    font-size: 7px;
}

.staffChatMeta b {
    color: #334155;
    font-size: 8px;
}

.staffChatMessage.mine .staffChatMeta {
    justify-content: flex-end;
}

.staffChatBubble {
    padding: 7px 9px;
    border-radius: 11px 11px 11px 4px;
    background: #eef8fb;
    color: #163642;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.staffChatMessage.mine .staffChatBubble {
    border-radius: 11px 11px 4px 11px;
    background: #fff0d5;
    color: #563600;
}

.staffChatMessage.role-kitchen:not(.mine) .staffChatBubble {
    border-left: 3px solid #00789d;
}

.staffChatMessage.role-cashier:not(.mine) .staffChatBubble {
    border-left: 3px solid #f6a30a;
}

.staffChatForm {
    display: grid;
    grid-template-columns: minmax(0,1fr) 66px;
    gap: 6px;
    margin-top: 7px;
}

.staffChatInput {
    min-height: 40px;
    max-height: 75px;
    resize: none;
    padding: 8px 9px;
    border: 1px solid #d6d3d1;
    border-radius: 9px;
    background: #fff;
    font-size: 11px;
}

.staffChatSend {
    min-width: 0;
    min-height: 40px !important;
    padding: 7px !important;
    align-self: stretch;
    border-radius: 9px !important;
    font-size: 9px;
}

.staffChatEmpty {
    display: grid;
    min-height: 110px;
    place-items: center;
    color: #8a7a6d;
    text-align: center;
    font-size: 10px;
    font-weight: 750;
}

.staffChatNotice {
    margin-top: 6px;
    font-size: 9px;
}

.staffChatCard.collapsed {
    width: 202px;
    padding: 8px 9px;
}

.staffChatCard.collapsed .staffChatBody,
.staffChatCard.collapsed .staffChatLive,
.staffChatCard.collapsed .staffChatEyebrow {
    display: none;
}

.staffChatCard.collapsed .staffChatHead h2 {
    font-size: 13px !important;
}

@media (max-width: 680px) {
    .staffChatCard {
        right: 8px;
        bottom: 8px;
        width: min(282px, calc(100vw - 16px));
    }

    .staffChatCard.collapsed {
        width: 190px;
    }

    .staffChatMessages {
        height: 118px;
    }
}
