       .chatbox-main-container {
            display: flex;
            gap: 20px;
            max-width: 1300px;
            margin: 30px auto;
               font-family: "xm-yekan";
            align-items: stretch;
        }
        
        .chatbox-main-column {
            flex: 3;
            min-width: 300px;
            display: flex;
            flex-direction: column;
        }
       
        .chatbox-wrapper {
            background: #fff;
            border-radius: 12px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        
        .chatbox-header {
            background: #117886;
            color: #fff;
            padding: 12px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-shrink: 0;
            direction: rtl;
        }
        
        .chatbox-messages {
            padding: 20px;
            background: #EDFFFF;
            direction: rtl;
            overflow-y: auto;
           
            scroll-behavior: smooth;
        }
        
        .chatbox-form {
            padding: 20px;
            background: #117886;
            border-top: 1px solid #e5e7eb;
            flex-shrink: 0;
            direction: rtl;
        }
        
        .chatbox-sidebar {
            flex: 1;
            min-width: 280px;
            display: flex;
            flex-direction: column;
            gap: 20px;
            direction: rtl;
            height: fit-content;
            align-self: flex-start;
        }
        
        .chatbox-sidebar-box {
            background: #fff;
            border-radius: 12px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            overflow: hidden;
        }
        
        .sidebar-box-header {
            background: #117886;
            color: #fff;
            padding: 12px 15px;
            font-weight: 2px !important;
                justify-content: flex-start;
    display: flex;
    align-items: center;
    gap: 5px;
        }
        
        .sidebar-box-content {
            padding: 15px;
            background-color: #EDFFFF;
        }
        
        .chatbox-sidebar-box:first-child .sidebar-box-content {
            max-height: 250px;
            overflow-y: auto;
        }
        
        .sidebar-box-content::-webkit-scrollbar {
            width: 4px;
        }
        .sidebar-box-content::-webkit-scrollbar-track {
            background: #e0e0e0;
            border-radius: 10px;
        }
        .sidebar-box-content::-webkit-scrollbar-thumb {
            background: #117886;
            border-radius: 10px;
        }
        
        .chatbox-messages::-webkit-scrollbar {
            width: 6px;
        }
        .chatbox-messages::-webkit-scrollbar-track {
            background: #e0e0e0;
            border-radius: 10px;
        }
        .chatbox-messages::-webkit-scrollbar-thumb {
            background: #117886;
            border-radius: 10px;
        }
        
        .chatbox-header-right {
            display: flex;
            align-items: center;
        }
        .chatbox-group-info {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .chatbox-group-avatar img {
            width: 78px;
            height: 78px !important;
            border-radius: 100% !important;
            object-fit: cover;
            border: 2px solid #fff;
            background: #fff;
        }
        .chatbox-group-details{
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .chatbox-group-details h2 {
            margin: 0;
            font-size: 1.2rem;
        }
        .chatbox-member-count {
            font-size: 0.75rem;
            opacity: 0.9;
            display: block;
            margin-top: 2px;
                display: flex;
    justify-content: flex-start;
    gap: 5px;
        }
        .chatbox-header-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .chatbox-icon-btn {
            background: rgba(255,255,255,0.2);
            border: none;
            color: #fff;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }
        .chatbox-icon-btn:hover {
            background: rgba(255,255,255,0.4);
            transform: scale(1.05);
        }
        
        .chatbox-options-dropdown {
            position: relative;
        }
        .dropdown-menu {
            display: none ;
            position: absolute;
            top: 45px;
            left: 0;
            background: #fff;
            min-width: 180px;
            border-radius: 10px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.15);
            z-index: 1000;
            overflow: hidden;
            padding: 18px;
            margin: 10px;


           
           
            
            
            
        }
        .dropdown-menu.show {
            display: flex;
            flex-direction: column;
            gap: 5px;
            
        }
        .dropdown-item {
            display: block;
            padding: 10px 15px;
            text-decoration: none;
            color: #000000;
            font-size: 0.85rem;
            border: none;
            background: none;
            width: 100%;
            text-align: right;
            cursor: pointer;
            transition: background 0.2s;
            
        }
        .dropdown-item:hover {
            background: #000000;
        }
        .dropdown-item.danger {
            color: #000000;
        }
        .dropdown-item.danger:hover {
            background:#117886;
        }
        
        .search-results {
            max-height: 400px;
            overflow-y: auto;
        }
        .search-result-item {
            padding: 12px;
            border-bottom: 1px solid #eee;
            cursor: pointer;
            transition: background 0.2s;
        }
        .search-result-item:hover {
            background: #f5f5f5;
        }
        .search-result-user {
            font-weight: bold;
            color: #0073aa;
            font-size: 0.8rem;
        }
        .search-result-text {
            margin-top: 4px;
            color: #555;
        }
        .search-result-date {
            font-size: 0.7rem;
            color: #999;
            margin-top: 4px;
        }
        .search-highlight {
            background: #ffeb3b;
            padding: 0 2px;
            border-radius: 3px;
            font-weight: bold;
        }
        .search-input {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 8px;
            margin-bottom: 15px;
            font-size: 14px;
        }
        
        /* دکمه رفتن به آخرین پیام */
        .go-to-last-btn {
            position: sticky;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 100;
            background: #FF6165;
            color: white;
            border: none;
            border-radius: 50px;
            padding: 8px 20px;
            cursor: pointer;
            box-shadow: 0 2px 15px rgba(0,0,0,0.2);
            font-size: 13px;
            font-weight: 500;
            transition: all 0.3s ease;
            display: none;
            align-items: center;
            gap: 8px;
            margin-bottom: 10px;
            width: 160px;
        }
        
        .go-to-last-btn:hover {
            background: #005a87;
            transform: translateX(-50%) scale(1.02);
        }
        
        .go-to-last-btn:active {
            transform: translateX(-50%) scale(0.98);
        }
        
        .chatbox-message {
            margin-bottom: 20px;
            padding: 10px;
            padding-bottom: 15px;
            background-color: #ffffff;
            border-bottom: 1px solid #fffffff8;
            border-radius: 10px;
            box-shadow: 0px 0px 1px black;
            transition: background-color 0.3s ease;
        }
        .chatbox-message:last-child {
            margin-bottom: 0;
        }
        .chatbox-message-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 8px;
        }
        .chatbox-message-avatar img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
        }
        .chatbox-message-author {
            font-weight: bold;
            color: #2c3e50;
        }
        .chatbox-message-date {
            font-size: 0.75rem;
            color: #95a5a6;
            margin-left: auto;
        }
        .delete-message-btn {
            background: #117886;
            color: #fff;
            border: none;
            border-radius: 5px;
            padding: 3px 10px;
            cursor: pointer;
            font-size: 11px;
            margin-right: 10px;
            transition: all 0.2s;
        }
        .delete-message-btn:hover {
            background: #c82333;
        }
        .chatbox-message-text {
            margin-left: 50px;
            color: #34495e;
            line-height: 1.5;
        }
        .chatbox-message-file {
            margin-left: 50px;
            margin-top: 8px;
        }
        .chatbox-message-file img {
            max-width: 200px;
            max-height: 150px;
            border-radius: 8px;
        }
        
        .chatbox-form textarea {
            width: 100%;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 8px;
            resize: vertical;
            font-family: inherit;
        }
        .chatbox-toolbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 10px;
            gap: 10px;
        }
        .chatbox-file-label {
            background:#EDFFFF;
            padding: 8px 15px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.9rem;
            padding: 13px;
            color:black ;
           
        }
    
        .chatbox-empty {
            text-align: center;
            padding: 40px;
            color: #95a5a6;
        }
      
        .member-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 0;
            border-bottom: 1px solid #f0f0f0;
        }
        .member-item:last-child {
            border-bottom: none;
        }
        .member-avatar img {
            width: 40px;
            height: 40px;
            border-radius: 100% !important;
        }
        .member-name {
            font-weight: 600;
            font-size: 0.9rem;
            color: #2c3e50;
        }
        
        .dis{
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }
        .dis-description{
            text-align: justify;
            width: 242px;
            line-break: anywhere;
        }
        .desc-image {
            width: 100%;
            border-radius: 8px;
            margin-bottom: 10px;
        }
        
        .quick-action-btn {
            display: block;
            width: 100%;
            padding: 10px 12px;
            margin-bottom: 10px;
            background: #ffffff;
            border: none;
            border-radius: 8px;
            text-align: center;
            text-decoration: none;
            color: #000000;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 0.9rem;
            box-shadow: 5px 5px 10px 3px rgba(0,0,0,0.3);
        }
        .quick-action-btn:last-child {
            margin-bottom: 0;
        }
        .quick-action-btn:hover {
            background: #ffffff;
            transform: translateY(-2px);
            color: #000000;
        }
        .quick-action-btn.danger {
            background: #dc3545;
            color: #fff;
        }
        .quick-action-btn.primary {
            background:#ffffff;
            color: #000000;
        }
        
        .chatbox-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            backdrop-filter: blur(5px);
            z-index: 100000;
            align-items: center;
            justify-content: center;
        }
        .chatbox-modal-content {
            background: #fff;
            border-radius: 16px;
            width: 90%;
            max-width: 500px;
            max-height: 80vh;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            animation: modalFadeIn 0.3s ease;
            direction: rtl;
        }
        @keyframes modalFadeIn {
            from { opacity: 0; transform: translateY(-30px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .chatbox-modal-header {
            background: #117886;
            color: #fff;
            padding: 15px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .copy-link-btn{
            display: flex;
            justify-content: center;
            align-items: center;
            gap:2px;
            background-color: #117886;
        }
        .chatbox-modal-header h3 {
            margin: 0;
            font-size: 1.2rem;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 5px;
        }
        .chatbox-modal-close {
            background: none;
            border: none;
            color: #fff;
            font-size: 24px;
            cursor: pointer;
            padding: 0;
            line-height: 1;
        }
        .chatbox-modal-body {
            padding: 20px;
            max-height: 60vh;
            overflow-y: auto;
        }
        
        .chatbox-tabs {
            display: flex;
            border-bottom: 1px solid #ddd;
            margin-bottom: 15px;
        }
        .chatbox-tab {
            padding: 10px 15px;
            cursor: pointer;
            background: none;
            border: none;
            font-size: 0.9rem;
            transition: all 0.2s;
        }
        .chatbox-tab.active {
            color: #0073aa;
            border-bottom: 2px solid #0073aa;
        }
        .chatbox-tab-content {
            display: none;
        }
        .chatbox-tab-content.active {
            display: block;
        }
        
        .media-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
        }
        .media-item {
            background: #f0f0f0;
            border-radius: 8px;
            overflow: hidden;
            cursor: pointer;
        }
        .media-item img, .media-item video {
            width: 100%;
            height: 100px;
            object-fit: cover;
        }
        .link-item {
            padding: 10px;
            background: #f8f9fa;
            border-radius: 8px;
            margin-bottom: 10px;
            word-break: break-all;
        }
        
        .settings-item {
            padding: 12px;
            border-bottom: 1px solid #f0f0f0;
        }
        .settings-item:last-child {
            border-bottom: none;
        }
        
        .copy-link-container {
            display: flex;
            gap: 10px;
            background: #f5f5f5;
            padding: 12px;
            border-radius: 8px;
            margin-bottom: 15px;
        }
        .copy-link-input {
            flex: 1;
            background: transparent;
            border: none;
            direction: ltr;
            font-size: 12px;
            color: #333;
        }
     
        .copy-link-btn {
           
            color: #fff;
            border: none;
            padding: 6px 15px;
            border-radius: 5px;
            cursor: pointer;
        }
       
        .copy-message {
            display: none;
            background: #d4edda;
            color: #155724;
            padding: 10px;
            border-radius: 5px;
            text-align: center;
            font-size: 14px;
        }
        .sendMessageBtn {
            display: flex;
            justify-content: center;
            align-items: center;
        }
        
        @media (max-width: 768px) {
            .chatbox-main-container {
                flex-direction: column;
                margin: 15px;
            }
            .chatbox-sidebar {
                min-width: 100%;
            }
            .media-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            .go-to-last-btn {
                bottom: 70px;
                padding: 6px 16px;
                font-size: 12px;
            }
        }

        li{
            text-align: justify;
        }
        
        .dark-theme .chatbox-wrapper,
        .dark-theme .chatbox-sidebar-box {
            background: #1a202c;
        }
        .dark-theme .chatbox-messages {
            background: #2d3748;
        }
        .dark-theme .chatbox-message-author,
        .dark-theme .member-name {
            color: #f7fafc;
        }
        .dark-theme .chatbox-message-text {
            color: #cbd5e0;
        }
        .dark-theme .sidebar-box-header {
            background: #1a202c;
            border-bottom: 1px solid #4a5568;
        }
        .dark-theme .quick-action-btn {
            background: #2d3748;
            color: #cbd5e0;
        }
        .dark-theme .chatbox-modal-content {
            background: #1a202c;
            color: #f7fafc;
        }
        .dark-theme .go-to-last-btn {
            background: #2d6a4f;
        }
        .dark-theme .go-to-last-btn:hover {
            background: #1a472a;
        }

        .sending-status {
    text-align: center;
    padding: 10px;
    background: #e3f2fd;
    border-radius: 8px;
    margin-top: 10px;
    color: #1976d2;
    font-size: 14px;
    direction: rtl;
}

.sending-status .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #1976d2;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* استایل پیش‌نمایش فایل‌ها در فوتر */
.selected-files-preview {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #bbdef5;
}

.preview-title {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #1976d2;
}

.preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: 150px;
    overflow-y: auto;
}

.preview-item {
    background: white;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    min-width: 80px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.preview-image {
    position: relative;
    width: 70px;
    height: 70px;
    margin: 0 auto;
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.preview-video {
    position: relative;
    width: 70px;
    height: 70px;
    background: #1a1a2e;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.preview-audio {
    position: relative;
    width: 70px;
    height: 70px;
    background: #2d6a4f;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.video-icon, .audio-icon {
    font-size: 35px;
}

.remove-file-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-file-btn:hover {
    background: #c82333;
}

.preview-name {
    font-size: 10px;
    margin-top: 5px;
    word-break: break-all;
    max-width: 80px;
}

.preview-size {
    font-size: 9px;
    color: #666;
}

        .chatbox-message-files {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 10px;
            margin-right: 50px;
        }
        .selected-files-preview {
            background: #e3f2fd;
            border-radius: 8px;
            padding: 10px;
            margin-top: 10px;
        }
        .preview-title {
            font-size: 12px;
            font-weight: bold;
            margin-bottom: 8px;
            color: #1976d2;
        }
        .preview-container {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            max-height: 200px;
            overflow-y: auto;
        }
        .preview-item {
            background: white;
            border-radius: 8px;
            padding: 8px;
            text-align: center;
            min-width: 80px;
            position: relative;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }
        .preview-image {
            position: relative;
            width: 80px;
            height: 80px;
            margin: 0 auto;
        }
        .preview-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 6px;
        }
        .preview-video {
            position: relative;
            width: 80px;
            height: 80px;
            background: #1a1a2e;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto;
        }
        .video-icon {
            font-size: 40px;
        }
        .remove-file-btn {
            position: absolute;
            top: -8px;
            right: -8px;
            background: #dc3545;
            color: white;
            border: none;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            font-size: 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .remove-file-btn:hover {
            background: #c82333;
        }
        .preview-name {
            font-size: 10px;
            margin-top: 5px;
            word-break: break-all;
            max-width: 90px;
        }
        .preview-size {
            font-size: 9px;
            color: #666;
        }
        .media-preview {
            max-width: 250px;
            max-height: 180px;
            border-radius: 8px;
        }


.quick-action-btn {
    display:flex ;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 4px;
}