 
html {
    scroll-behavior: smooth;
}

 
html {
    scroll-padding-top: 80px;  
}

 
@media screen and (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

div#chat-actions-dropdown {
    display: none;
}
.desktop-menus {
    display: flex;
}       
 
 button#plan-status-btn:hover {
    background: rgb(37, 211, 102)!important;
}
 

 


 
/* WhatsApp Dashboard CSS - Modern & Responsive */
:root {
    --whatsapp-green: #25D366;
    --whatsapp-green-dark: #128C7E;
    --whatsapp-teal: #075E54;
    --whatsapp-light: #DCF8C6;
    --bg-primary: #f0f2f5;
    --bg-sidebar: #ffffff;
    --text-primary: #111b21;
    --text-secondary: #667781;
    --border-color: #e9ecef;
    --hover-bg: #f5f6f6;
    --active-bg: #e9f0eb;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 2px 5px rgba(0,0,0,0.1);
    --delete-red: #dc3545;
    --delete-red-dark: #c82333;
    --warning-orange: #ff9800;
    --create-green: #28a745;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
button:hover {
    background: #a8a8a8 !important;
}
 
body.page-template footer#site-footer {
    display: none;
}

body {
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.d-outer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

.business-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
    .button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.inline-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.inline-btn:hover:not(:disabled) {
    background: #128C7E;
    transform: scale(1.02);
}

.inline-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #95a5a6;
}

.multi-text {
    margin-bottom: 8px;
}

.multi-buttons-section {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.multi-buttons-title {
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 13px;
}
/* Takeover Button */
.takeover-btn {
    padding: 8px 18px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: none;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}
.takeover-btn.bot-active {
    background: #ff9800;
    color: #fff;
}
.takeover-btn.agent-active {
    background: #dc3545;
    color: #fff;
}
.takeover-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.takeover-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Status Pill */
.agent-status-pill {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.agent-status-pill.bot { background: #e8f5e9; color: #2e7d32; }
.agent-status-pill.agent { background: #fce4ec; color: #c62828; }

/* Disabled input */
.message-input-wrapper textarea:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    color: #aaa;
}
.send-btn:disabled {
    background: #ccc !important;
    cursor: not-allowed;
}
/* rows */
.msg-row { display: flex; margin: 6px 16px; }
.msg-left  { justify-content: flex-start; }
.msg-right { justify-content: flex-end; }

/* bubbles */
.msg-bubble {
    max-width: 62%;
    padding: 8px 12px 6px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.5;
    word-break: break-word;
}

/* user — left, white */
.bubble-user {
    background: #ffffff;
    border: 0.5px solid #e0e0e0;
    border-radius: 2px 12px 12px 12px;
}

/* bot — right, light green */
.bubble-bot {
    background: #e8f5e9;
    border: 0.5px solid #c8e6c9;
    border-radius: 12px 2px 12px 12px;
}
.bot-btn {
    padding: 10px;
    background: #ffffff52;
    text-align: center;
    border-bottom: 1px solid #80808063;
}
/* partner/agent — right, WhatsApp green */
.bubble-partner {
    background: #dcf8c6;
    border: 0.5px solid #b2dfdb;
    border-radius: 12px 2px 12px 12px;
}

/* badges */
.msg-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 20px;
    margin-bottom: 5px;
    letter-spacing: 0.02em;
}
.badge-user    { background: #e3f2fd; color: #1565c0; }
.badge-bot     { background: #f3e5f5; color: #6a1b9a; }
.badge-partner { background: #fff9c4; color: #e65100; }

/* timestamp + delete */
.msg-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}
.msg-text { color: #111; }
.delete-message-btn {
    background: none; border: none;
    color: #ddd; cursor: pointer;
    padding: 0; font-size: 11px;
    margin-left: auto;
}
.delete-message-btn:hover { color: #e53935; }

/* system pill */
.msg-system-row { text-align: center; margin: 10px 0; }
.msg-system-pill {
    font-size: 11.5px; color: #777;
    background: #f0f0f0;
    padding: 3px 12px;
    border-radius: 20px;
    display: inline-block;
}

.whatsapp-dashboard-container {
    width: 100%;
    height: 100vh;
    background: var(--bg-primary);
}

/* Loading Screen */
.dashboard-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: 20px;
    background: var(--bg-primary);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: var(--whatsapp-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 14px;
}

.api-info {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
    text-align: center;
    padding: 0 20px;
}

/* Main Layout */
.whatsapp-layout {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* Sidebar */
.whatsapp-sidebar {
    width: 380px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 20px 16px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.business-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.status-badge {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--whatsapp-green);
    color: white;
    font-weight: 500;
    display: inline-block;
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.create-user-btn {
    background: linear-gradient(135deg, var(--whatsapp-green) 0%, var(--whatsapp-teal) 100%);
    border: none;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 24px;
    transition: all 0.2s;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    width: 100%;
    justify-content: center;
}

.create-user-btn:hover {
    background: #218838;
    transform: scale(1.02);
}

.refresh-users-btn, .action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.refresh-users-btn:hover, .action-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* Search Bar */
.search-bar {
    padding: 12px 16px;
    background: var(--bg-sidebar);
}

.search-bar input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: var(--bg-primary);
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.search-bar input:focus {
    background: #e8eaed;
}

/* Users List */
.users-list {
    flex: 1;
    overflow-y: auto;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
    position: relative;
}

.user-item:hover {
    background: var(--hover-bg);
}

.user-item.active {
    background: var(--active-bg);
}

.user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--whatsapp-green) 0%, var(--whatsapp-teal) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 15px;
}

.user-phone {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.last-message {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-time {
    font-size: 10px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.no-users, .no-messages {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Chat Area */
.whatsapp-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #efeae2;
    height: 100%;
    min-width: 0;
    position: relative;
}

.chat-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}
.create-user-btn i{
    color: #fff!important;
}
.placeholder-content {
    text-align: center;
    color: var(--text-secondary);
}

.placeholder-content i {
    font-size: 18px;
    margin-bottom: 0px;
    color: #8696a0;
}

.placeholder-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.placeholder-content p {
    font-size: 14px;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.chat-header {
    padding: 12px 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chat-header .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.chat-header .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--whatsapp-green) 0%, var(--whatsapp-teal) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.user-details h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.user-details span {
    font-size: 12px;
    color: var(--text-secondary);
}

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

.chat-actions .action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.chat-actions .action-btn.delete-chat {
    color: var(--warning-orange);
}

.chat-actions .action-btn.delete-user {
    color: var(--delete-red);
}

.chat-actions .action-btn.delete-chat:hover {
    background: rgba(255, 152, 0, 0.1);
}

.chat-actions .action-btn.delete-user:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-image: radial-gradient(circle at 10% 20%, rgba(0,0,0,0.02) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Scroll to Bottom Button */
.scroll-to-bottom {
    position: absolute;
    bottom: 216px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--whatsapp-green);
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    z-index: 10;
}

.scroll-to-bottom:hover {
    background: var(--whatsapp-green-dark);
    transform: scale(1.05);
}

.scroll-to-bottom.show {
    display: flex;
    animation: bounceIn 0.3s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.message {
    max-width: 65%;
    padding: 8px 12px;
    border-radius: 12px;
    position: relative;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.message:hover .delete-message-btn {
    display: inline-flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    background: var(--whatsapp-light);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message.partner {
    background: white;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message-text {
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-primary);
}

.message-time {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 4px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.delete-message-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--delete-red);
    font-size: 12px;
    padding: 2px 5px;
    border-radius: 4px;
    transition: all 0.2s;
    display: none;
    align-items: center;
    gap: 4px;
}

.delete-message-btn i {
    font-size: 12px;
    display: none;
}

.delete-message-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    transform: scale(1.1);
}

.loading-messages, .loading-indicator {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 12px;
}

/* Chat Input */
.chat-input-container {
    padding: 12px 20px 70px 12px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.message-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background: white;
    border-radius: 28px;
    padding: 8px 16px;
    box-shadow: var(--shadow-sm);
}

.message-input-wrapper textarea {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-size: 14px;
    font-family: inherit;
    max-height: 100px;
    padding: 8px 0;
    background: transparent;
}

.send-btn {
    background: var(--whatsapp-green);
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: white;
    width: 40px;
    height: 40px;
}

.send-btn:hover {
    background: var(--whatsapp-green-dark);
    transform: scale(1.02);
}

.send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 450px;
    max-width: 90%;
    animation: slideUp 0.3s ease;
    box-shadow: var(--shadow-md);
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.modal-body input, .modal-body textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.modal-body input:focus, .modal-body textarea:focus {
    border-color: var(--whatsapp-green);
}

.modal-body textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-cancel, .btn-save, .btn-danger, .btn-create {
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-cancel:hover {
    background: var(--bg-primary);
}

.btn-save {
    background: var(--whatsapp-green);
    border: none;
    color: white;
}

.btn-save:hover {
    background: var(--whatsapp-green-dark);
}

.btn-create {
    background: var(--create-green);
    border: none;
    color: white;
}

.btn-create:hover {
    background: #218838;
}

.btn-danger {
    background: var(--delete-red);
    border: none;
    color: white;
}

.btn-danger:hover {
    background: var(--delete-red-dark);
}

/* Delete Confirmation Modal */
.delete-modal .modal-header {
    background: var(--delete-red);
    color: white;
}

.delete-modal .modal-header h3 {
    color: white;
}

.delete-modal .modal-close {
    color: white;
}

.delete-modal .modal-close:hover {
    color: #f0f0f0;
}

.warning-text {
    color: var(--delete-red);
    font-weight: 500;
    margin-top: 10px;
    padding: 10px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 8px;
    font-size: 13px;
}

/* Create User Modal */
.create-modal .modal-header {
    background: var(--create-green);
    color: white;
}

.create-modal .modal-header h3 {
    color: white;
}

.create-modal .modal-close {
    color: white;
}

.create-modal .modal-close:hover {
    color: #f0f0f0;
}

.phone-input-wrapper {
    position: relative;
}

.phone-prefix {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
    pointer-events: none;
}

.phone-input-wrapper input {
    padding-left: 35px;
}

.char-counter {
    text-align: right;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.validation-error {
    color: var(--delete-red);
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.validation-error.show {
    display: block;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: 12px;
    z-index: 1001;
    animation: slideInRight 0.3s ease;
    box-shadow: var(--shadow-md);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes slideInRight {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.notification.error {
    background: var(--delete-red);
    color: white;
}

.notification.success {
    background: #28a745;
    color: white;
}

.notification.info {
    background: #17a2b8;
    color: white;
}

.notification.warning {
    background: var(--warning-orange);
    color: white;
}

@media only screen and (max-width:1024px){
    .whatsapp-sidebar {
    width: 300px;
 
}
}

@media (max-width: 768px) {
     button#mobile-menu-btn i {
    color: #667781;
}

div#chat-actions-dropdown button {
    font-size: 14px;
}
button#mobile-clear {
    color:#ff000073
}
button#mobile-delete {
       color:#ff000073
}
button#mobile-takeover {
    color:#ff9800
}
button#mobile-refresh {
    color: #667781;
}
button#mobile-edit {
    color: #667781;
}
    .d-outer {
        display: none;
    padding: 0px!important;
}
       .chat-input-container {
    padding: 12px 20px 100px 12px;
   
}
.scroll-to-bottom {
    position: absolute;
    bottom: 220px;
    
}
    .whatsapp-sidebar {
        width: 100%;
        position: absolute;
     
        transition: left 0.3s ease;
        z-index: 10;
        box-shadow: var(--shadow-md);
    }
    
    .whatsapp-sidebar.open {
        left: 0;
    }
    
    .message {
        max-width: 85%;
    }
    
    .sidebar-header {
        padding: 12px 16px;
    }
    
    .create-user-btn span {
        display: none;
    }
    
    .create-user-btn {
        padding: 8px 12px;
    }
        .desktop-menus {
    display: none;
}
    .mobile-menu-btn {
        display: flex !important;
        background: none;
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 20px;
    }
    div#chat-actions-dropdown.show {
    display: block;
}
    
    .chat-actions-dropdown {
        position: absolute;
        top: 60px;
        right: 10px;
        background: white;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        z-index: 100;
        display: none;
        min-width: 180px;
        overflow: hidden;
    }
    
    .chat-actions-dropdown.show {
        display: block;
    }
    
    .chat-actions-dropdown button {
        display: flex !important;
        width: 100%;
        padding: 10px;
        border: none;
        background: white;
        text-align: left;
        gap: 10px;
        align-items: center;
        cursor: pointer;
        border-bottom: 1px solid #eee;
    }
    
    .chat-actions-dropdown button:last-child {
        border-bottom: none;
    }
    
    .chat-actions-dropdown button:hover {
        background: #f5f5f5;
    }
    .msg-row {
    display: flex;
    margin: 0px;
}
 
  
    .whatsapp-layout {
        position: relative;
        overflow: hidden;
    }
    
    
    .whatsapp-sidebar {
        width: 100%;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10;
        background: var(--bg-sidebar);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateX(0);
        box-shadow: var(--shadow-md);
    }
    
   
    
   
    .whatsapp-chat-area {
        width: 100%;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 5;
        background: #efeae2;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateX(100%);
    }
    
  
    .whatsapp-layout.chat-active .whatsapp-chat-area {
        transform: translateX(0);
        z-index: 20;
    }
    
   
    .chat-placeholder {
        height: 100%;
    }
    
   
    .mobile-back-btn {
        display: flex !important;
        background: none;
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: var(--text-primary);
        font-size: 20px;
        transition: all 0.2s;
        margin-right: 8px;
        flex-shrink: 0;
    }
    
    .mobile-back-btn:hover {
        background: rgba(0, 0, 0, 0.08);
    }
    
    .mobile-back-btn:active {
        transform: scale(0.95);
    }
    
  
    .chat-header .user-info {
        flex: 1;
        min-width: 0;
    }
    
    .chat-header .user-details {
        flex: 1;
        min-width: 0;
    }
    
    .chat-header .user-details h4 {
        font-size: 15px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .chat-header .user-details span {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }
    
    /* Smaller avatar on mobile */
    .chat-header .avatar {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    /* Compact chat actions */
    .chat-actions .action-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    /* Adjust takeover button */
    .takeover-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .agent-status-pill {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    /* Messages */
    .msg-bubble {
        max-width: 85%;
        font-size: 13px;
    }
    
    .chat-messages {
        padding: 12px;
    }
    
     
    
    .message-input-wrapper {
        padding: 6px 12px;
    }
    
    .send-btn {
        width: 36px;
        height: 36px;
    }
    
 
    
    /* Modal adjustments */
    .modal-content {
        width: 90%;
        margin: 16px;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    /* User list items touch-friendly */
    .user-item {
        padding: 14px 16px;
        min-height: 72px;
    }
    
    .user-avatar {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
    
    .user-name {
        font-size: 15px;
    }
    
    .delete-message-btn {
        display: inline-flex;
    }
.btn-out-bar {
        display: flex;
        justify-content: space-between;
        width: 100%;
        padding: 0px 12px 0px 0px;
    }

}

 
@media (min-width: 769px) {
    .mobile-back-btn {
        display: none !important;
    }
    .whatsapp-sidebar {
        position: relative !important;
        transform: none !important;
    }
    
    .whatsapp-chat-area {
        position: relative !important;
        transform: none !important;
    }
    
    .whatsapp-layout {
        overflow: hidden !important;
    }
}  
 
 
 
@media only screen and (max-width:465px){
    
    .chat-header{
        padding: 8px;
    }
        .scroll-to-bottom {
        position: absolute;
        bottom: 330px;
    }
}


@media only screen and (max-width:390px){
    
     
        .scroll-to-bottom {
        position: absolute;
        bottom: 190px;
    }
    .chat-input-container {
        padding: 12px 20px 70px 12px;
    }
}


 