.communication-page {
    min-height: calc(100vh - 76px);
    padding: 16px;
}

.communication-shell {
    background: #ffffff;
    border: 1px solid #e4eaf2;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(36, 50, 74, .06);
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 260px;
    min-height: calc(100vh - 126px);
    overflow: hidden;
}

.communication-shell.user-directory-shell {
    display: block;
    min-height: auto;
}

.chat-user-directory {
    background: #ffffff;
    min-height: calc(100vh - 126px);
}

.chat-directory-header {
    align-items: center;
    border-bottom: 1px solid #f1e2d6;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
}

.chat-directory-header h4 {
    color: #111111;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
}

.chat-directory-filters {
    background: #fff8f1;
    border-bottom: 1px solid #ffd9bd;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(220px, 320px) minmax(260px, 1fr);
    padding: 18px 22px;
}

.chat-filter-field {
    display: grid;
    gap: 7px;
    margin: 0;
}

.chat-filter-field > span {
    color: #8a3514;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.chat-filter-field select {
    appearance: none;
    background: #ffffff;
    border: 1px solid #f6b98d;
    border-radius: 8px;
    color: #111111;
    font-size: 14px;
    min-height: 42px;
    outline: 0;
    padding: 0 38px 0 12px;
}

.chat-filter-field select:focus,
.chat-search.compact:focus-within {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, .12);
}

.chat-search.compact {
    border-color: #f6b98d;
    margin: 0;
}

.chat-room-list.user-list {
    gap: 10px;
    padding: 20px 22px 24px;
}

.chat-user-card {
    cursor: pointer;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    min-height: 78px;
    padding: 13px 14px;
}

.chat-user-card:hover {
    border-color: #f6b98d;
    box-shadow: 0 10px 22px rgba(249, 115, 22, .08);
    transform: none;
}

.chat-user-info {
    min-width: 0;
}

.chat-user-contact {
    color: #6d625d;
    display: block;
    font-size: 12px;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-user-status {
    align-items: center;
    color: #6d625d;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    gap: 7px;
    white-space: nowrap;
}

.user-directory-shell .chat-live-pill {
    background: #fff3e8;
    border-color: #ffd0ad;
    color: #c2410c;
}

.chat-sidebar,
.chat-context {
    background: #f8fafc;
}

.chat-sidebar {
    border-right: 1px solid #e4eaf2;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-sidebar-header,
.chat-main-header {
    align-items: center;
    border-bottom: 1px solid #e4eaf2;
    display: flex;
    gap: 12px;
    min-height: 74px;
    padding: 14px 16px;
}

.chat-sidebar-header {
    justify-content: space-between;
}

.chat-eyebrow {
    color: #7b8ba0;
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.1;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.chat-sidebar-header h4,
.chat-room-heading h4 {
    color: #24324a;
    font-size: 16px;
    font-weight: 760;
    line-height: 1.2;
    margin: 0;
}

.chat-live-pill {
    align-items: center;
    background: #edf8f4;
    border: 1px solid #ccece0;
    border-radius: 999px;
    color: #c2410c;
    display: inline-flex;
    font-size: 11px;
    font-weight: 750;
    gap: 6px;
    padding: 5px 9px;
    white-space: nowrap;
}

.chat-live-pill.is-offline {
    background: #fff5f6;
    border-color: #ffd6dc;
    color: #be123c;
}

.chat-search {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dfe6f0;
    border-radius: 8px;
    display: flex;
    gap: 8px;
    margin: 14px 14px 10px;
    padding: 0 10px;
}

.chat-search i {
    color: #8ca0b7;
    font-size: 17px;
}

.chat-search input {
    background: transparent;
    border: 0;
    color: #24324a;
    font-size: 13px;
    min-height: 38px;
    outline: 0;
    width: 100%;
}

.chat-tabs {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 14px 12px;
}

.chat-tab {
    background: #ffffff;
    border: 1px solid #dfe6f0;
    border-radius: 7px;
    color: #53677f;
    font-size: 11px;
    font-weight: 760;
    min-height: 32px;
}

.chat-tab.active {
    background: #24324a;
    border-color: #24324a;
    color: #ffffff;
}

.chat-room-list {
    display: grid;
    gap: 8px;
    overflow-y: auto;
    padding: 0 14px 14px;
}

.chat-room-item {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e3e9f1;
    border-radius: 8px;
    color: inherit;
    cursor: pointer;
    display: grid;
    gap: 10px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    min-height: 66px;
    padding: 10px;
    text-align: left;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
    width: 100%;
}

.chat-room-item:hover,
.chat-room-item.active {
    border-color: #94a3b8;
    box-shadow: 0 8px 18px rgba(36, 50, 74, .06);
    transform: translateY(-1px);
}

.chat-room-item.active {
    background: #f6f9ff;
}

.chat-room-icon,
.chat-room-avatar {
    align-items: center;
    background: #fff3e8;
    border-radius: 8px;
    color: #c2410c;
    display: inline-flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.chat-room-icon.global,
.chat-room-avatar.global {
    background: #fff3e8;
    color: #c2410c;
}

.chat-room-icon.direct,
.chat-room-avatar.direct {
    background: #fff7ed;
    color: #c2410c;
}

.chat-room-title {
    color: #24324a;
    display: block;
    font-size: 13px;
    font-weight: 760;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-room-preview {
    color: #7b8ba0;
    display: block;
    font-size: 11px;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-unread-badge {
    align-items: center;
    background: #d64255;
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-size: 10px;
    font-weight: 800;
    height: 20px;
    justify-content: center;
    min-width: 20px;
    padding: 0 6px;
}

.chat-presence {
    align-items: center;
    border: 2px solid #ffffff;
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, .18);
    display: inline-flex;
    height: 11px;
    width: 11px;
}

.chat-presence.online {
    background: #f97316;
}

.chat-presence.offline {
    background: #ef4444;
}

.chat-main {
    background: #ffffff;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-width: 0;
}

.chat-room-heading {
    min-width: 0;
}

.chat-room-heading span {
    color: #7b8ba0;
    display: block;
    font-size: 11px;
    font-weight: 750;
    margin-bottom: 3px;
}

.chat-header-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.chat-icon-button {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dfe6f0;
    border-radius: 8px;
    color: #53677f;
    display: inline-flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
    transition: all .18s ease;
    width: 38px;
}

.chat-icon-button:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #24324a;
}

.chat-mobile-toggle {
    display: none;
}

.chat-messages {
    background:
        linear-gradient(180deg, rgba(248, 250, 252, .92), rgba(255, 255, 255, .96)),
        repeating-linear-gradient(45deg, #f8fafc 0, #f8fafc 12px, #ffffff 12px, #ffffff 24px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding: 18px;
}

.chat-message {
    display: flex;
    gap: 9px;
    max-width: 78%;
}

.chat-message.mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message-bubble {
    background: #ffffff;
    border: 1px solid #e4eaf2;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(36, 50, 74, .045);
    padding: 9px 11px;
}

.chat-message.mine .chat-message-bubble {
    background: #24324a;
    border-color: #24324a;
    color: #ffffff;
}

.chat-message-meta {
    align-items: center;
    color: #7b8ba0;
    display: flex;
    font-size: 10px;
    font-weight: 750;
    gap: 8px;
    margin-bottom: 5px;
}

.chat-message.mine .chat-message-meta {
    color: rgba(255, 255, 255, .72);
}

.chat-message-body {
    color: #24324a;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.chat-message.mine .chat-message-body {
    color: #ffffff;
}

.chat-empty-state {
    align-items: center;
    align-self: center;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #6b7c8f;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: auto;
    min-height: 180px;
    padding: 24px;
    text-align: center;
    width: min(360px, 100%);
}

.chat-empty-state i {
    color: #94a3b8;
    font-size: 30px;
    margin-bottom: 10px;
}

.chat-empty-state strong {
    color: #24324a;
    font-size: 15px;
    margin-bottom: 5px;
}

.chat-composer {
    align-items: flex-end;
    border-top: 1px solid #e4eaf2;
    display: flex;
    gap: 10px;
    padding: 12px;
}

.chat-composer textarea {
    background: #f8fafc;
    border: 1px solid #dfe6f0;
    border-radius: 8px;
    color: #24324a;
    font-size: 13px;
    max-height: 120px;
    min-height: 38px;
    outline: 0;
    padding: 10px 12px;
    resize: none;
    width: 100%;
}

.chat-composer textarea:focus {
    background: #ffffff;
    border-color: #94a3b8;
}

.chat-send-button {
    align-items: center;
    background: #c2410c;
    border: 1px solid #c2410c;
    border-radius: 8px;
    color: #ffffff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 780;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
}

.chat-send-button:hover {
    background: #066b54;
}

.chat-context {
    border-left: 1px solid #e4eaf2;
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 14px;
}

.context-panel {
    background: #ffffff;
    border: 1px solid #e4eaf2;
    border-radius: 8px;
    padding: 14px;
}

.context-panel h5 {
    color: #24324a;
    font-size: 14px;
    font-weight: 760;
    margin: 0 0 6px;
}

.context-panel p {
    color: #6b7c8f;
    font-size: 12px;
    line-height: 1.45;
    margin: 0 0 12px;
}

.context-stat-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.context-stat {
    background: #f8fafc;
    border: 1px solid #e4eaf2;
    border-radius: 8px;
    padding: 10px;
}

.context-stat strong {
    color: #24324a;
    display: block;
    font-size: 18px;
    line-height: 1;
}

.context-stat span {
    color: #7b8ba0;
    font-size: 10px;
    font-weight: 780;
    text-transform: uppercase;
}

.context-action {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dfe6f0;
    border-radius: 8px;
    color: #43546b;
    display: flex;
    font-size: 12px;
    font-weight: 750;
    gap: 9px;
    margin-top: 8px;
    min-height: 40px;
    padding: 9px 10px;
    text-align: left;
    width: 100%;
}

.context-action:hover {
    background: #f8fafc;
    color: #24324a;
}

@media (max-width: 1199.98px) {
    .communication-shell {
        grid-template-columns: 280px minmax(0, 1fr);
    }

    .chat-context {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .communication-page {
        padding: 10px;
    }

    .communication-shell {
        grid-template-columns: 1fr;
        min-height: calc(100vh - 112px);
        position: relative;
    }

    .chat-sidebar {
        bottom: 0;
        box-shadow: 12px 0 28px rgba(36, 50, 74, .18);
        left: 0;
        max-width: 330px;
        position: absolute;
        top: 0;
        transform: translateX(-105%);
        transition: transform .2s ease;
        width: 86vw;
        z-index: 20;
    }

    .communication-shell.show-rooms .chat-sidebar {
        transform: translateX(0);
    }

    .chat-mobile-toggle {
        align-items: center;
        background: #ffffff;
        border: 1px solid #dfe6f0;
        border-radius: 8px;
        color: #53677f;
        display: inline-flex;
        flex: 0 0 38px;
        height: 38px;
        justify-content: center;
        width: 38px;
    }

    .chat-message {
        max-width: 92%;
    }

    .chat-send-button span {
        display: none;
    }
}

.chat-widget {
    bottom: 18px;
    position: fixed;
    right: 18px;
    z-index: 1060;
}

.chat-widget-launcher {
    align-items: center;
    background: #f97316;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    box-shadow: 0 14px 30px rgba(104, 66, 245, .28);
    color: #ffffff;
    display: inline-flex;
    height: 54px;
    justify-content: center;
    position: relative;
    width: 54px;
}

.chat-widget-launcher i {
    font-size: 24px;
}

.chat-widget-launcher-badge {
    align-items: center;
    background: #d64255;
    border: 2px solid #ffffff;
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-size: 10px;
    font-weight: 800;
    height: 20px;
    justify-content: center;
    min-width: 20px;
    padding: 0 5px;
    position: absolute;
    right: -2px;
    top: -3px;
}

.chat-widget-panel {
    background: #ffffff;
    border: 1px solid #dfe6f0;
    border-radius: 8px;
    bottom: 0;
    box-shadow: 0 22px 52px rgba(15, 23, 42, .22);
    display: none;
    flex-direction: column;
    height: min(620px, calc(100vh - 120px));
    min-height: 420px;
    min-width: 360px;
    overflow: hidden;
    position: absolute;
    resize: both;
    right: 0;
    width: 460px;
}

.chat-widget.open .chat-widget-panel {
    display: flex;
}

.chat-widget.open .chat-widget-launcher {
    display: none;
}

.chat-widget.maximized {
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
}

.chat-widget.maximized .chat-widget-panel {
    border-radius: 0;
    height: 100vh;
    max-height: none;
    min-height: 0;
    min-width: 0;
    position: fixed;
    resize: none;
    width: 100vw;
}

.chat-widget-header {
    align-items: center;
    background: #f97316;
    color: #ffffff;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-height: 52px;
    padding: 10px 12px;
}

.chat-widget-title {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.chat-widget-title span {
    color: rgba(255, 255, 255, .72);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1;
    text-transform: uppercase;
}

.chat-widget-title strong {
    display: block;
    font-size: 14px;
    font-weight: 760;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-widget-actions {
    display: flex;
    gap: 6px;
}

.chat-widget-actions button,
.chat-widget-tool,
.chat-widget-send {
    align-items: center;
    border-radius: 7px;
    display: inline-flex;
    justify-content: center;
}

.chat-widget-actions button {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #ffffff;
    height: 32px;
    width: 32px;
}

.chat-widget-body {
    display: grid;
    flex: 1;
    grid-template-columns: 200px minmax(0, 1fr);
    min-height: 0;
}

.chat-widget.maximized .chat-widget-body {
    grid-template-columns: 320px minmax(0, 1fr);
}

.chat-widget-rooms {
    background: linear-gradient(180deg, #f8fafc 0%, #f3f6fb 100%);
    border-right: 1px solid #e4eaf2;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-widget-type {
    display: grid;
    gap: 6px;
    margin: 10px 10px 8px;
}

.chat-widget-type label {
    color: #7b8ba0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0;
}

.chat-widget-select {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dfe6f0;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(36, 50, 74, .05);
    display: flex;
    gap: 7px;
    min-width: 0;
    padding: 0 8px;
}

.chat-widget-select i {
    color: #f97316;
    font-size: 16px;
}

.chat-widget-select select {
    appearance: none;
    background: transparent;
    border: 0;
    color: #24324a;
    cursor: pointer;
    flex: 1;
    font-size: 12px;
    font-weight: 800;
    min-height: 34px;
    min-width: 0;
    outline: 0;
}

.chat-widget-search {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dfe6f0;
    border-radius: 7px;
    display: flex;
    gap: 6px;
    margin: 10px;
    padding: 0 8px;
}

.chat-widget-search i {
    color: #8ca0b7;
    font-size: 15px;
}

.chat-widget-search input {
    background: transparent;
    border: 0;
    color: #24324a;
    font-size: 12px;
    min-height: 32px;
    outline: 0;
    width: 100%;
}

.chat-widget-room-list {
    align-content: start;
    display: grid;
    flex: 1;
    gap: 7px;
    grid-auto-rows: max-content;
    min-height: 0;
    overscroll-behavior: contain;
    overflow-y: auto;
    padding: 0 10px 10px;
}

.chat-widget-room {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e4eaf2;
    border-radius: 8px;
    color: #24324a;
    cursor: pointer;
    display: flex;
    gap: 8px;
    min-height: 62px;
    padding: 9px 10px;
    text-align: left;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.chat-widget-room.unread {
    background: #fff8f3;
    border-color: #fcd9b8;
}

.chat-widget-room-info {
    display: grid;
    flex: 1;
    gap: 3px;
    min-width: 0;
}

.chat-widget-room-badge {
    align-items: center;
    background: #d64255;
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 800;
    height: 20px;
    justify-content: center;
    min-width: 20px;
    padding: 0 5px;
}

.chat-widget-room:hover {
    border-color: #b8c6d9;
    box-shadow: 0 10px 22px rgba(36, 50, 74, .08);
    transform: translateY(-1px);
}

.chat-widget-room.active {
    border-color: #f97316;
    box-shadow: 0 8px 16px rgba(104, 66, 245, .12);
}

.chat-widget-room strong {
    align-items: center;
    display: flex;
    font-size: 12px;
    gap: 6px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-widget-room strong > i {
    align-items: center;
    background: #eef4ff;
    border-radius: 7px;
    color: #f97316;
    display: inline-flex;
    flex: 0 0 24px;
    font-size: 14px;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.chat-widget-room-info span {
    color: #7b8ba0;
    display: block;
    font-size: 10px;
    line-height: 1.35;
    overflow: hidden;
    padding-left: 30px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-widget-room .chat-widget-presence {
    border: 2px solid #ffffff;
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, .18);
    display: inline-flex;
    flex: 0 0 auto;
    height: 11px;
    margin-left: auto;
    padding-left: 0;
    width: 11px;
}

.chat-widget-room .chat-widget-presence.online {
    background: #f97316;
}

.chat-widget-room .chat-widget-presence.offline {
    background: #ef4444;
}

.chat-widget-conversation {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-width: 0;
}

.chat-widget-messages {
    background: #fbfcff;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding: 12px;
}

.chat-widget-empty {
    align-items: center;
    color: #6b7c8f;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    padding: 16px;
    text-align: center;
}

.chat-widget-empty i {
    color: #94a3b8;
    font-size: 28px;
    margin-bottom: 8px;
}

.chat-widget-empty strong {
    color: #24324a;
    font-size: 14px;
}

.chat-widget-empty span {
    font-size: 12px;
}

.chat-widget-message {
    display: flex;
    max-width: 88%;
}

.chat-widget-message.mine {
    align-self: flex-end;
}

.chat-widget-bubble {
    background: #ffffff;
    border: 1px solid #e4eaf2;
    border-radius: 8px;
    box-shadow: 0 5px 14px rgba(36, 50, 74, .045);
    color: #24324a;
    padding: 8px 10px;
}

.chat-widget-message.mine .chat-widget-bubble {
    background: #f97316;
    border-color: #f97316;
    color: #ffffff;
}

.chat-widget-meta {
    color: #7b8ba0;
    display: flex;
    font-size: 10px;
    font-weight: 760;
    gap: 7px;
    margin-bottom: 4px;
}

.chat-widget-message.mine .chat-widget-meta {
    color: rgba(255, 255, 255, .76);
}

.chat-widget-text {
    font-size: 13px;
    line-height: 1.42;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.chat-widget-attachment {
    border-radius: 7px;
    display: block;
    margin-top: 7px;
    max-width: 100%;
    overflow: hidden;
}

.chat-widget-attachment img,
.chat-widget-attachment video {
    border-radius: 7px;
    display: block;
    max-height: 220px;
    max-width: 100%;
}

.chat-widget-file {
    align-items: center;
    background: rgba(148, 163, 184, .12);
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 7px;
    color: inherit;
    display: flex;
    gap: 8px;
    padding: 8px;
    text-decoration: none;
}

.chat-widget-composer {
    align-items: flex-end;
    border-top: 1px solid #e4eaf2;
    display: flex;
    gap: 8px;
    padding: 9px;
}

.chat-widget-tool,
.chat-widget-send {
    flex: 0 0 36px;
    height: 36px;
    width: 36px;
}

.chat-widget-tool {
    background: #ffffff;
    border: 1px solid #dfe6f0;
    color: #53677f;
}

.chat-widget-send {
    background: #f97316;
    border: 1px solid #f97316;
    color: #ffffff;
}

.chat-widget-input-wrap {
    display: grid;
    gap: 6px;
    width: 100%;
}

.chat-widget-composer textarea {
    background: #f8fafc;
    border: 1px solid #dfe6f0;
    border-radius: 8px;
    color: #24324a;
    font-size: 13px;
    max-height: 98px;
    min-height: 36px;
    outline: 0;
    padding: 8px 10px;
    resize: none;
    width: 100%;
}

.chat-widget-attachment-preview {
    align-items: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #53677f;
    display: flex;
    font-size: 11px;
    font-weight: 700;
    gap: 7px;
    min-height: 30px;
    padding: 5px 8px;
}

.chat-widget-attachment-preview button {
    background: transparent;
    border: 0;
    color: #be123c;
    margin-left: auto;
}

.chat-widget-window {
    background: #ffffff;
    border: 1px solid #dfe6f0;
    border-radius: 8px;
    bottom: 0;
    box-shadow: 0 22px 52px rgba(15, 23, 42, .22);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: min(560px, calc(100vh - 120px));
    min-height: 360px;
    min-width: 340px;
    overflow: hidden;
    position: absolute;
    resize: both;
    width: 390px;
}

.chat-widget-window-header {
    align-items: center;
    background: #f97316;
    color: #ffffff;
    cursor: default;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-height: 50px;
    padding: 9px 11px;
}

.chat-widget-window-header div:first-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.chat-widget-window-header strong {
    display: block;
    font-size: 14px;
    font-weight: 760;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-widget-window-status {
    color: rgba(255, 255, 255, .72);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1;
    text-transform: uppercase;
}

.chat-widget-window-body {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
}

.chat-widget-window.minimized {
    height: 50px !important;
    min-height: 50px;
    resize: none;
}

.chat-widget-window.minimized .chat-widget-window-body {
    display: none;
}

.chat-widget-window.maximized {
    border-radius: 0;
    bottom: 0;
    height: 100vh !important;
    left: 0;
    min-height: 0;
    min-width: 0;
    position: fixed;
    resize: none;
    right: auto !important;
    top: 0;
    width: 100vw !important;
}

.chat-widget-window.maximized .chat-widget-messages {
    padding: 18px;
}

@media (max-width: 575.98px) {
    .chat-widget {
        bottom: 12px;
        right: 12px;
    }

    .chat-widget-panel {
        height: calc(100vh - 24px);
        min-height: 0;
        min-width: 0;
        width: calc(100vw - 24px);
    }

    .chat-widget-body {
        grid-template-columns: 1fr;
    }

    .chat-widget-rooms {
        display: none;
    }

    .chat-widget.show-rooms .chat-widget-rooms {
        bottom: 0;
        display: flex;
        left: 0;
        max-width: 310px;
        position: absolute;
        top: 52px;
        width: 82vw;
        z-index: 3;
    }

    .chat-widget-window {
        bottom: 0;
        height: calc(100vh - 24px);
        min-height: 0;
        min-width: 0;
        right: 0 !important;
        width: calc(100vw - 24px);
    }
}
