/* =========================================================================
   AUTHENTIC WHATSAPP LIVE DESK & CHAT STYLING (PERFECTED EDITION)
   ========================================================================= */

/* WhatsApp Wallpaper Background */
.direct-messages-container, 
.chat-messages-container, 
.m-chat-messages-container {
    background-color: #0b141a;
    background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), radial-gradient(rgba(255, 255, 255, 0.035) 1px, #0b141a 1px);
    background-size: 24px 24px;
    background-position: 0 0, 12px 12px;
}

[data-theme="light"] .direct-messages-container,
[data-theme="light"] .chat-messages-container,
[data-theme="light"] .m-chat-messages-container {
    background-color: #efeae2;
    background-image: radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px), radial-gradient(rgba(0, 0, 0, 0.05) 1px, #efeae2 1px);
    background-size: 24px 24px;
    background-position: 0 0, 12px 12px;
}

/* =========================================================================
   ADMIN DESK 2-COLUMN LAYOUT (localhost/ChatSystem/chat)
   ========================================================================= */
.chat-app-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-primary);
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
}

.chat-sidebar {
    width: 380px;
    min-width: 320px;
    max-width: 450px;
    height: 100%;
    background-color: #111b21;
    border-right: 1px solid #222d34;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

[data-theme="light"] .chat-sidebar {
    background-color: #ffffff;
    border-right-color: #d1d7db;
}

.chat-sidebar-header {
    height: 60px;
    background-color: #202c33;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #222d34;
}

[data-theme="light"] .chat-sidebar-header {
    background-color: #f0f2f5;
    border-bottom-color: #d1d7db;
}

.chat-search-box {
    padding: 0.5rem 0.75rem;
    background-color: #111b21;
    border-bottom: 1px solid #222d34;
}

[data-theme="light"] .chat-search-box {
    background-color: #ffffff;
    border-bottom-color: #e9edef;
}

.search-input-wrapper {
    background-color: #202c33;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    gap: 0.6rem;
}

[data-theme="light"] .search-input-wrapper {
    background-color: #f0f2f5;
}

.search-input-wrapper i {
    color: #8696a0;
    font-size: 0.9rem;
}

.search-input-wrapper input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 100%;
}

.customer-list {
    flex: 1;
    overflow-y: auto;
    background-color: #111b21;
}

[data-theme="light"] .customer-list {
    background-color: #ffffff;
}

.customer-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    gap: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}

[data-theme="light"] .customer-item {
    border-bottom-color: #f0f2f5;
}

.customer-item:hover {
    background-color: #202c33;
}

[data-theme="light"] .customer-item:hover {
    background-color: #f5f6f6;
}

.customer-item.active {
    background-color: #2a3942;
}

[data-theme="light"] .customer-item.active {
    background-color: #ebebeb;
}

.cust-avatar-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.cust-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #00a884;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.15rem;
}

.status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #8696a0;
    border: 2px solid #111b21;
}

.status-dot.online {
    background-color: #00a884;
}

.cust-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.cust-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cust-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cust-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.cust-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.cust-last-msg {
    font-size: 0.82rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unread-badge {
    background-color: #00a884;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
}

/* Main Chat Desk Pane */
.chat-main {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #0b141a;
    position: relative;
}

.chat-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.chat-empty-state i {
    font-size: 4rem;
    color: #00a884;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.chat-header {
    height: 60px;
    background-color: #202c33;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #222d34;
    z-index: 10;
}

[data-theme="light"] .chat-header {
    background-color: #f0f2f5;
    border-bottom-color: #d1d7db;
}

.chat-header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-header-name {
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--text-primary);
}

.chat-header-status {
    font-size: 0.78rem;
    color: #00a884;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.icon-btn {
    background: transparent;
    border: none;
    color: #aebac1;
    font-size: 1.15rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #e9edef;
}

[data-theme="light"] .icon-btn {
    color: #54656f;
}

/* Chat Messages Container */
.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Message Bubbles */
.direct-msg-bubble-wrap, .message-bubble-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    max-width: 65%;
}

.direct-msg-bubble-wrap.incoming, .message-bubble-wrapper.incoming {
    align-self: flex-start;
    align-items: flex-start;
}

.direct-msg-bubble-wrap.outgoing, .message-bubble-wrapper.outgoing {
    align-self: flex-end;
    align-items: flex-end;
}

.direct-msg-bubble, .message-bubble {
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    font-size: 0.94rem;
    line-height: 1.45;
    color: #e9edef;
    position: relative;
    word-break: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

[data-theme="light"] .direct-msg-bubble,
[data-theme="light"] .message-bubble {
    color: #111b21;
}

.direct-msg-bubble-wrap.incoming .direct-msg-bubble,
.message-bubble-wrapper.incoming .message-bubble {
    background-color: #202c33;
    border-top-left-radius: 2px;
}

[data-theme="light"] .direct-msg-bubble-wrap.incoming .direct-msg-bubble,
[data-theme="light"] .message-bubble-wrapper.incoming .message-bubble {
    background-color: #ffffff;
}

.direct-msg-bubble-wrap.outgoing .direct-msg-bubble,
.message-bubble-wrapper.outgoing .message-bubble {
    background-color: #005c4b;
    border-top-right-radius: 2px;
}

[data-theme="light"] .direct-msg-bubble-wrap.outgoing .direct-msg-bubble,
[data-theme="light"] .message-bubble-wrapper.outgoing .message-bubble {
    background-color: #d9fdd3;
}

.direct-msg-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: #8696a0;
    float: right;
    margin-left: 0.75rem;
    margin-top: 0.25rem;
}

/* Emoji Reactions floating bar on hover */
.message-reaction-bar {
    position: absolute;
    top: -34px;
    background: #202c33;
    border: 1px solid #2a3942;
    border-radius: 20px;
    padding: 0.2rem 0.4rem;
    display: none;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 50;
    animation: popIn 0.15s ease-out forwards;
}

@keyframes popIn {
    0% { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.direct-msg-bubble-wrap:hover .message-reaction-bar,
.message-bubble-wrapper:hover .message-reaction-bar {
    display: flex;
}

.reaction-emoji-btn {
    background: transparent;
    border: none;
    font-size: 1.15rem;
    cursor: pointer;
    transition: transform 0.15s;
    padding: 0.1rem;
    border-radius: 50%;
}

.reaction-emoji-btn:hover {
    transform: scale(1.35);
}

.message-reaction-badge {
    position: absolute;
    bottom: -10px;
    right: 12px;
    background-color: #202c33;
    border: 1px solid #2a3942;
    border-radius: 12px;
    padding: 0.1rem 0.35rem;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Quick Action Tags Pill Bar */
.quick-tags-bar, .direct-tags-bar {
    padding: 0.5rem 1.25rem;
    background-color: #111b21;
    border-top: 1px solid #222d34;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
}

[data-theme="light"] .quick-tags-bar,
[data-theme="light"] .direct-tags-bar {
    background-color: #f0f2f5;
    border-top-color: #d1d7db;
}

.quick-tag-chip, .direct-tag-chip {
    background-color: #202c33;
    border: 1px solid #2a3942;
    color: #e9edef;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.15s;
    user-select: none;
}

[data-theme="light"] .quick-tag-chip,
[data-theme="light"] .direct-tag-chip {
    background-color: #ffffff;
    border-color: #d1d7db;
    color: #111b21;
}

.quick-tag-chip:hover, .direct-tag-chip:hover {
    background-color: #2a3942;
    border-color: #00a884;
}

.direct-tag-chip.featured-tag {
    background: linear-gradient(135deg, #00a884 0%, #008069 100%);
    color: #ffffff;
    border: none;
}

/* Chat Input Bar */
.chat-input-bar, .direct-input-bar {
    min-height: 62px;
    background-color: #202c33;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    border-top: 1px solid #222d34;
}

[data-theme="light"] .chat-input-bar,
[data-theme="light"] .direct-input-bar {
    background-color: #f0f2f5;
    border-top-color: #d1d7db;
}

.chat-input-field {
    flex: 1;
    background-color: #2a3942;
    border: none;
    outline: none;
    border-radius: 8px;
    color: #e9edef;
    font-size: 0.95rem;
    padding: 0.6rem 0.9rem;
}

[data-theme="light"] .chat-input-field {
    background-color: #ffffff;
    color: #111b21;
}

.send-msg-btn, .mic-send-circle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #00a884;
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s, background-color 0.15s;
}

.send-msg-btn:hover, .mic-send-circle-btn:hover {
    background-color: #06cf9c;
    transform: scale(1.06);
}

/* =========================================================================
   POPUPS: EMOJI PICKER, ATTACHMENT MENU, VOICE RECORDING
   ========================================================================= */

/* Emoji Picker Container */
.emoji-picker-container {
    position: absolute;
    bottom: 70px;
    left: 15px;
    width: 320px;
    height: 290px;
    background-color: #202c33;
    border: 1px solid #2a3942;
    border-radius: 12px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

[data-theme="light"] .emoji-picker-container {
    background-color: #ffffff;
    border-color: #d1d7db;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.emoji-picker-container.show {
    display: flex !important;
}

.emoji-tabs {
    display: flex;
    align-items: center;
    background-color: #111b21;
    border-bottom: 1px solid #2a3942;
    padding: 0.25rem;
}

[data-theme="light"] .emoji-tabs {
    background-color: #f0f2f5;
    border-bottom-color: #e9edef;
}

.emoji-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    padding: 0.4rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
}

.emoji-tab-btn.active {
    background-color: #202c33;
}

[data-theme="light"] .emoji-tab-btn.active {
    background-color: #ffffff;
}

.emoji-grid {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.35rem;
}

.emoji-item {
    background: transparent;
    border: none;
    font-size: 1.35rem;
    cursor: pointer;
    border-radius: 6px;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s, background 0.1s;
}

.emoji-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.2);
}

/* Attachment Menu Popup */
.attachment-menu-popup {
    position: absolute;
    bottom: 70px;
    left: 55px;
    background-color: #202c33;
    border: 1px solid #2a3942;
    border-radius: 12px;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    min-width: 190px;
}

[data-theme="light"] .attachment-menu-popup {
    background-color: #ffffff;
    border-color: #d1d7db;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.attachment-menu-popup.show {
    display: flex !important;
}

.attach-option-btn {
    background: transparent;
    border: none;
    color: #e9edef;
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s;
}

[data-theme="light"] .attach-option-btn {
    color: #111b21;
}

.attach-option-btn:hover {
    background-color: #2a3942;
}

[data-theme="light"] .attach-option-btn:hover {
    background-color: #f5f6f6;
}

.attach-option-btn i {
    width: 20px;
    font-size: 1.1rem;
    text-align: center;
}

/* Voice Recording Overlay */
.voice-recording-overlay {
    position: absolute;
    left: 10px;
    right: 65px;
    height: 48px;
    background-color: #202c33;
    border-radius: 24px;
    padding: 0 1.25rem;
    display: none;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .voice-recording-overlay {
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.voice-recording-overlay.active {
    display: flex !important;
}

.record-pulse {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ea4335;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
}

.record-timer {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e9edef;
    font-family: monospace;
}

[data-theme="light"] .record-timer {
    color: #111b21;
}

/* Custom WhatsApp Voice Note Player */
.voice-note-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 220px;
    padding: 0.3rem 0;
}

.voice-play-trigger {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #00a884;
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.voice-play-trigger:hover {
    transform: scale(1.08);
}

.voice-wave-progress {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.voice-seek-slider {
    width: 100%;
    height: 4px;
    accent-color: #00a884;
    cursor: pointer;
}

.voice-meta-duration {
    font-size: 0.72rem;
    color: #8696a0;
}

/* Location Card */
.location-preview-card {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    background: #182229;
    max-width: 260px;
    text-decoration: none;
    color: inherit;
}

.location-map-placeholder {
    height: 110px;
    background: linear-gradient(135deg, #1e3a8a 0%, #065f46 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 2rem;
}

.location-details {
    padding: 0.5rem 0.75rem;
}

.location-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #e9edef;
}

.location-sub {
    font-size: 0.75rem;
    color: #00a884;
}

/* Canned Responses Autocomplete Popup */
.canned-suggest-popup {
    position: absolute;
    bottom: 70px;
    left: 15px;
    right: 70px;
    max-height: 240px;
    overflow-y: auto;
    background-color: #202c33;
    border: 1px solid #2a3942;
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    z-index: 1000;
}

[data-theme="light"] .canned-suggest-popup {
    background-color: #ffffff;
    border-color: #d1d7db;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.canned-header {
    font-size: 0.78rem;
    font-weight: 700;
    color: #00a884;
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid #2a3942;
    margin-bottom: 0.35rem;
}

[data-theme="light"] .canned-header {
    border-bottom-color: #e9edef;
}

.canned-item {
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 0.2rem;
}

.canned-item:hover {
    background-color: #2a3942;
}

[data-theme="light"] .canned-item:hover {
    background-color: #f5f6f6;
}

.canned-shortcut {
    font-size: 0.85rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-right: 0.5rem;
}

.canned-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e9edef;
}

[data-theme="light"] .canned-title {
    color: #111b21;
}

.canned-preview {
    font-size: 0.75rem;
    color: #8696a0;
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Private Internal Notes Mode */
.chat-input-bar.private-note-mode {
    background-color: #422006 !important;
    border-top-color: #854d0e !important;
}

.chat-input-bar.private-note-mode .chat-input-field {
    background-color: #713f12 !important;
    color: #fef08a !important;
}

.chat-input-bar.private-note-mode .chat-input-field::placeholder {
    color: #ca8a04 !important;
}

.direct-msg-bubble-wrap.private-note {
    align-self: center !important;
    align-items: center !important;
    max-width: 85% !important;
}

.direct-msg-bubble.sticky-private-bubble {
    background-color: #fef9c3 !important;
    border: 1px dashed #ca8a04 !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

/* In-Chat Search Panel (Right Off-Canvas Slide Drawer) */
.chat-search-panel {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    width: 340px;
    height: 100%;
    background-color: #111b21;
    border-left: 1px solid #222d34;
    z-index: 100;
    flex-direction: column;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.6);
}

.chat-search-panel.show {
    display: flex !important;
}

[data-theme="light"] .chat-search-panel {
    background-color: #ffffff;
    border-left-color: #e9edef;
}

.search-panel-header {
    height: 60px;
    padding: 0 1.25rem;
    background-color: #202c33;
    border-bottom: 1px solid #222d34;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #e9edef;
    flex-shrink: 0;
}

[data-theme="light"] .search-panel-header {
    background-color: #f0f2f5;
    border-bottom-color: #e9edef;
    color: #111b21;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 12px;
    color: #8696a0;
    font-size: 0.9rem;
}

.search-input-wrapper input {
    width: 100%;
    background-color: #202c33;
    border: 1px solid #2a3942;
    border-radius: 8px;
    padding: 0.6rem 0.85rem 0.6rem 2.25rem;
    color: #e9edef;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-input-wrapper input:focus {
    border-color: #00a884;
}

[data-theme="light"] .search-input-wrapper input {
    background-color: #f0f2f5;
    border-color: #d1d7db;
    color: #111b21;
}

.search-results-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-result-item {
    background-color: #182229;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #222d34;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.88rem;
    color: #e9edef;
}

.search-result-item:hover {
    border-color: #00a884;
    background-color: #202c33;
}

[data-theme="light"] .search-result-item {
    background-color: #f5f6f6;
    border-color: #e9edef;
    color: #111b21;
}

[data-theme="light"] .search-result-item:hover {
    background-color: #ffffff;
}

/* Responsive Rules */
@media (max-width: 768px) {
    .chat-app-wrapper {
        height: 100vh;
        max-height: 100vh;
        overflow: hidden;
    }
    .chat-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 !important;
        display: flex !important;
    }
    .chat-main {
        display: none !important;
        width: 100% !important;
        flex: 1 !important;
    }
    .chat-app-wrapper.mobile-chat-open .chat-sidebar,
    .chat-app-wrapper.mobile-active-chat .chat-sidebar {
        display: none !important;
    }
    .chat-app-wrapper.mobile-chat-open .chat-main,
    .chat-app-wrapper.mobile-active-chat .chat-main {
        display: flex !important;
        width: 100% !important;
        height: 100% !important;
    }
    .chat-app-wrapper.mobile-chat-open #mobileBackBtn,
    .chat-app-wrapper.mobile-active-chat #mobileBackBtn {
        display: inline-flex !important;
    }
}


