.work-chat-topbar-button {
    gap: .35rem;
    min-width: auto;
    padding-inline: .65rem;
}

.work-chat-topbar-button.has-unread {
    position: relative;
    color: #fff !important;
    background: #0d6efd;
    border-color: #0d6efd;
    box-shadow: 0 0 0 .18rem rgba(13, 110, 253, .25);
    animation: work-chat-attention 1.8s ease-in-out infinite;
}

.work-chat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 .4rem;
    border-radius: 999px;
    background: #b3261e;
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 .18rem rgba(179, 38, 30, .18);
}

.work-chat-topbar-button.has-unread .work-chat-badge {
    background: #ffcc00;
    color: #111827;
    box-shadow: 0 0 0 .2rem rgba(255, 204, 0, .35);
}

@keyframes work-chat-attention {
    0%, 100% {
        box-shadow: 0 0 0 .18rem rgba(13, 110, 253, .25);
    }
    50% {
        box-shadow: 0 0 0 .35rem rgba(13, 110, 253, .08);
    }
}

.work-chat-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1060;
    width: min(46rem, 100vw);
    display: grid;
    grid-template-rows: auto auto auto auto auto auto auto minmax(0, 1fr) auto;
    background: var(--bs-body-bg);
    border-left: 1px solid var(--bs-border-color);
    box-shadow: 0 1.2rem 3rem rgba(15, 23, 42, .22);
    transform: translateX(105%);
    transition: transform .18s ease;
}

.work-chat-drawer.is-open {
    transform: translateX(0);
}

.work-chat-drawer.is-fullscreen {
    width: 100vw;
    left: 0;
    border-left: 0;
}

.work-chat-drawer__header {
    min-height: 3.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.work-chat-drawer__actions {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.work-chat-drawer__title {
    display: grid;
    gap: .1rem;
    min-width: 0;
}

.work-chat-drawer__title strong,
.work-chat-drawer__title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-chat-drawer__title span,
.work-chat-status__hint,
.work-chat-composer__hint {
    color: var(--bs-secondary-color);
    font-size: .78rem;
}

.work-chat-status {
    display: grid;
    gap: .55rem;
    margin: .75rem 1rem .55rem;
    padding: .8rem;
    border: 1px solid rgba(15, 108, 189, .18);
    border-radius: .65rem;
    background: rgba(15, 108, 189, .035);
}

.work-chat-status__line {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .86rem;
}

.work-chat-presence-dot {
    width: .6rem;
    height: .6rem;
    border-radius: 999px;
    background: #94a3b8;
    flex: 0 0 auto;
}

.work-chat-presence-dot.is-online {
    background: #1f8a5b;
}

.work-chat-presence-dot.is-dnd {
    background: #b3261e;
}

.work-chat-dnd {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
}

.work-chat-dnd button {
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    background: var(--bs-body-bg);
    color: var(--bs-secondary-color);
    padding: .25rem .55rem;
    font: inherit;
    font-size: .78rem;
}

.work-chat-dnd button.is-active {
    background: #b3261e;
    border-color: #b3261e;
    color: #fff;
}

.work-chat-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .5rem;
    padding: .55rem 1rem;
}

.work-chat-new {
    display: grid;
    gap: .6rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    background: rgba(148, 163, 184, .08);
}

.work-chat-new__head,
.work-chat-new__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.work-chat-new__mode {
    display: flex;
    gap: 1rem;
    font-size: .86rem;
}

.work-chat-tabs {
    display: flex;
    gap: .35rem;
    padding: .1rem 1rem .55rem;
}

.work-chat-tabs button {
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    background: var(--bs-body-bg);
    color: var(--bs-secondary-color);
    padding: .3rem .7rem;
    font: inherit;
    font-size: .82rem;
}

.work-chat-tabs button.is-active {
    border-color: rgba(15, 108, 189, .35);
    background: rgba(15, 108, 189, .1);
    color: var(--bs-primary);
    font-weight: 700;
}

.work-chat-filters {
    display: flex;
    gap: .45rem;
    padding: 0 1rem .7rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.work-chat-filters button {
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    background: var(--bs-body-bg);
    color: var(--bs-secondary-color);
    padding: .34rem .75rem;
    font: inherit;
    font-size: .82rem;
}

.work-chat-filters button.is-active {
    border-color: rgba(15, 108, 189, .4);
    background: rgba(15, 108, 189, .1);
    color: var(--bs-primary);
    font-weight: 700;
}

.work-chat-member-results {
    display: grid;
    max-height: 10rem;
    overflow: auto;
    border: 1px solid var(--bs-border-color);
    border-radius: .4rem;
    background: var(--bs-body-bg);
}

.work-chat-member-results:empty {
    display: none;
}

.work-chat-member-option {
    display: grid;
    gap: .1rem;
    border: 0;
    border-bottom: 1px solid var(--bs-border-color);
    background: transparent;
    color: inherit;
    padding: .5rem .6rem;
    text-align: left;
}

.work-chat-member-option:hover {
    background: rgba(15, 108, 189, .1);
}

.work-chat-member-option span {
    color: var(--bs-secondary-color);
    font-size: .75rem;
}

.work-chat-selected {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
}

.work-chat-selected-chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    padding: .25rem .55rem;
    background: var(--bs-body-bg);
    font-size: .78rem;
}

.work-chat-selected-chip button {
    border: 0;
    background: transparent;
    color: var(--bs-secondary-color);
    padding: 0;
    font: inherit;
}

.work-chat-content {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(13rem, 16rem) minmax(0, 1fr);
}

.work-chat-list {
    min-height: 0;
    overflow: auto;
    border-right: 1px solid var(--bs-border-color);
    background: #f8fafc;
}

.work-chat-list-item {
    width: 100%;
    display: grid;
    gap: .15rem;
    padding: .72rem .75rem .72rem .65rem;
    border: 0;
    border-bottom: 1px solid var(--bs-border-color);
    background: transparent;
    color: inherit;
    text-align: left;
}

.work-chat-list-item:hover,
.work-chat-list-item.is-active {
    background: rgba(15, 108, 189, .12);
}

.work-chat-list-item.is-active {
    box-shadow: inset .22rem 0 0 #0f6cbd;
}

.work-chat-list-item strong,
.work-chat-list-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-chat-list-item strong {
    font-size: .78rem;
}

.work-chat-list-item__title {
    display: flex;
    align-items: center;
    gap: .35rem;
    min-width: 0;
}

.work-chat-person-item {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .55rem;
}

.work-chat-list-item .work-chat-person-main {
    display: grid;
    gap: .1rem;
    min-width: 0;
}

.work-chat-list-item .work-chat-avatar {
    position: relative;
    width: 2rem;
    height: 2rem;
    overflow: visible;
    color: #fff;
    flex: 0 0 auto;
}

.work-chat-list-item .work-chat-avatar__img,
.work-chat-list-item .work-chat-avatar__initials {
    width: 100%;
    height: 100%;
    border-radius: 999px;
}

.work-chat-list-item .work-chat-avatar__img {
    display: block;
    object-fit: cover;
    background: #e2e8f0;
}

.work-chat-list-item .work-chat-avatar__initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1;
}

.work-chat-person-dot {
    width: .55rem;
    height: .55rem;
    border-radius: 999px;
    background: #94a3b8;
    flex: 0 0 auto;
}

.work-chat-avatar .work-chat-person-dot {
    position: absolute;
    right: -.05rem;
    bottom: -.05rem;
    border: 2px solid #fff;
}

.work-chat-chat-dot {
    width: .55rem;
    height: .55rem;
    border-radius: 999px;
    background: #0f6cbd;
    flex: 0 0 auto;
}

.work-chat-chat-dot.is-group {
    background: #1f8a5b;
}

.work-chat-chat-dot.is-direct {
    background: #b45f06;
}

.work-chat-person-dot.is-online {
    background: #1f8a5b;
}

.work-chat-person-dot.is-away {
    background: #b45f06;
}

.work-chat-person-dot.is-dnd {
    background: #b3261e;
}

.work-chat-list-item span {
    color: var(--bs-secondary-color);
    font-size: .72rem;
}

.work-chat-thread {
    min-height: 0;
    overflow: auto;
    padding: 1rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.work-chat-empty,
.work-chat-thread__empty {
    padding: .85rem;
    color: var(--bs-secondary-color);
    font-size: .86rem;
}

.work-chat-message {
    max-width: min(34rem, 92%);
    display: grid;
    gap: .25rem;
}

.work-chat-message.is-own {
    align-self: flex-end;
}

.work-chat-message__meta {
    display: flex;
    align-items: center;
    gap: .4rem;
    color: var(--bs-secondary-color);
    font-size: .74rem;
}

.work-chat-message__delete {
    border: 0;
    background: transparent;
    color: var(--bs-secondary-color);
    padding: 0;
    font: inherit;
    text-decoration: underline;
}

.work-chat-message__delete:hover {
    color: #b3261e;
}

.work-chat-message__bubble {
    border: 1px solid rgba(15, 108, 189, .22);
    border-radius: .65rem;
    background: #eaf4ff;
    padding: .62rem .75rem;
    white-space: pre-wrap;
}

.work-chat-message.is-own .work-chat-message__bubble {
    border-color: rgba(15, 108, 189, .28);
    background: #eaf4ff;
}

.work-chat-message:not(.is-own) .work-chat-message__bubble {
    border-color: rgba(180, 95, 6, .24);
    background: #fff4dd;
}

.work-chat-message.is-deleted .work-chat-message__bubble {
    color: var(--bs-secondary-color);
    font-style: italic;
}

.work-chat-message__read {
    max-width: 100%;
    overflow: hidden;
    color: var(--bs-secondary-color);
    font-size: .7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-chat-load-older {
    align-self: center;
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    background: var(--bs-body-bg);
    color: var(--bs-primary);
    padding: .35rem .75rem;
    font: inherit;
    font-size: .8rem;
    font-weight: 700;
}

.work-chat-load-older:hover {
    background: rgba(15, 108, 189, .1);
}

.work-chat-attachment {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .45rem;
    padding: .45rem .55rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    color: inherit;
    text-decoration: none;
    background: rgba(255, 255, 255, .65);
}

.work-chat-attachment span {
    font-size: .72rem;
    color: var(--bs-secondary-color);
}

.work-chat-attachment strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-chat-file-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.work-chat-composer {
    display: grid;
    gap: .45rem;
    padding: .75rem 1rem .6rem;
    border-top: 1px solid var(--bs-border-color);
}

.work-chat-composer__row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .5rem;
    align-items: end;
}

.work-chat-composer textarea {
    min-height: 2.35rem;
    max-height: 7rem;
    resize: vertical;
}

.work-chat-toast {
    position: fixed;
    right: min(47rem, calc(100vw - 21rem));
    bottom: 1.25rem;
    z-index: 1065;
    width: min(20rem, calc(100vw - 2rem));
    display: grid;
    gap: .35rem;
    padding: .85rem;
    border: 1px solid var(--bs-border-color);
    border-left: .25rem solid #0f6cbd;
    border-radius: .5rem;
    background: var(--bs-body-bg);
    box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, .2);
}

.work-chat-toast.is-attention {
    border-left-color: #0d6efd;
    box-shadow: 0 1rem 2.75rem rgba(13, 110, 253, .28);
}

.work-chat-toast__title {
    font-weight: 700;
}

.work-chat-toast__body {
    color: var(--bs-secondary-color);
    font-size: .86rem;
}

@media (max-width: 760px) {
    .work-chat-drawer {
        width: 100vw;
    }

    .work-chat-content {
        grid-template-columns: 1fr;
    }

    .work-chat-list {
        max-height: 10rem;
        border-right: 0;
        border-bottom: 1px solid var(--bs-border-color);
    }

    .work-chat-toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}
