@charset "utf-8";
/* Чат система */
#eve-chat-system {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 900px;
    height: 650px;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    animation: chatSlideIn 0.3s ease;
}

@keyframes chatSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 8px 25px rgba(0,124,186,0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,124,186,0.4);
}

.chat-icon {
    font-size: 18px;
}

.chat-badge {
    background: #ff4757;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

.chat-container {
    display: flex;
    height: 100%;
}

/* Контакти панел */
.chat-contacts {
    width: 320px;
    background: #f8f9fa;
    border-right: 1px solid #e1e5e9;
    display: flex;
    flex-direction: column;
}

.contacts-header {
    padding: 12px;
    background: white;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contacts-title h3 {
    margin: 0;
    font-size: 18px;
    color: #1a1a1a;
    font-weight: 600;
}

.connection-status {
    margin-top: 4px;
}

#chat-connection-status {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f1f3f4;
}

.status-online {
    color: #00b894;
    background: #e8f8f4 !important;
}

.status-offline {
    color: #636e72;
    background: #f1f3f4 !important;
}

.add-contact-btn {
    background: #007cba;
    color: white;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-contact-btn:hover {
    background: #005a87;
    transform: scale(1.05);
}

.contacts-search {
    padding: 7px 10px;
    border-bottom: 1px solid #e1e5e9;
}

#contacts-search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

#contacts-search-input:focus {
    border-color: #007cba;
}

.contacts-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.contact-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f4;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.contact-item:hover {
    background: #edf2f7;
}

.contact-item.active {
    background: #e3f2fd;
    border-right: 3px solid #007cba;
}

.contact-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #007cba, #00a8ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    font-weight: 600;
}

.contact-info {
    flex: 1;
    min-width: 0;
}

.contact-name {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
    font-size: 14px;
}

.contact-preview {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.contact-time {
    font-size: 11px;
    color: #999;
}

.contact-unread {
    background: #ff4757;
    color: white;
    border-radius: 8px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

.no-contacts {
    padding: 60px 20px;
    text-align: center;
    color: #666;
}

.no-contents-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-contacts p {
    margin: 0 0 16px 0;
    font-size: 14px;
}

.add-first-contact {
    background: #007cba;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.add-first-contact:hover {
    background: #005a87;
}

/* Чат прозорец */
.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.chat-header {
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #007cba, #00a8ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.chat-user-info {
    display: flex;
    flex-direction: column;
}

.chat-user-name {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 15px;
}

.chat-user-status {
    font-size: 12px;
    color: #00b894;
}

.chat-header-actions {
    display: flex;
    gap: 8px;
}

.header-btn {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.header-btn:hover {
    background: #f1f3f4;
    color: #333;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
	scrollbar-width: thin;
}

.welcome-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.welcome-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.welcome-message h3 {
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 600;
}

.welcome-message p {
    margin: 0;
    font-size: 14px;
}

.chat-message {
    margin: 8px 0;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 95%;
    position: relative;
    animation: messageAppear 0.3s ease;
    line-height: 1.4;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message-outgoing {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 6px;
}

.message-incoming {
    background: white;
    color: #333;
    margin-right: auto;
    border-bottom-left-radius: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message-content {
    word-wrap: break-word;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

.message-incoming .message-time {
    text-align: left;
    color: #999;
}

.message-outgoing .message-time {
    color: rgba(255,255,255,0.8);
}

.chat-typing-indicator {
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 12px;
    font-style: italic;
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.chat-eveinput-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e1e5e9;
	width: 98%;
}

.evechat-input {
    display: flex;
    gap: 12px;
    align-items: flex-end;
	flex: 1;
}

.input-wrapper {
    flex: 1;
    border: 1px solid #e1e5e9;
    border-radius: 24px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    transition: border-color 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: #007cba;
    background: white;
}

#chat-message-input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    padding: 4px 8px;
    resize: none;
    max-height: 100px;
}

#chat-message-input:disabled {
    color: #999;
}

.input-actions {
    display: flex;
    gap: 4px;
}

.emoji-btn, .attach-btn {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    font-size: 16px;
    transition: background 0.2s ease;
}

.emoji-btn:hover, .attach-btn:hover {
    background: #e9ecef;
}

.send-btn {
    background: linear-gradient(135deg, #007cba, #00a8ff);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.send-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #007cba, #00a8ff);
    transform: scale(1.05);
}

.send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Модален прозорец */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 400px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: #f1f3f4;
}

.modal-body {
    padding: 24px;
}

.modal-body input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
    outline: none;
    transition: border-color 0.2s ease;
}

.modal-body input:focus {
    border-color: #007cba;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-primary {
    background: #007cba;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-primary:hover {
    background: #005a87;
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-secondary:hover {
    background: #e9ecef;
}

/* Responsive */
@media (max-width: 768px) {
    #eve-chat-system {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    
    .chat-contacts {
        width: 100%;
    }
    
    .chat-window {
        display: none;
    }
    
    .chat-window.active {
        display: flex;
    }
}

/* Скролбар */
.contacts-list::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.contacts-list::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track {
    background: #f1f3f4;
}

.contacts-list::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c7d0;
    border-radius: 3px;
}

.contacts-list::-webkit-scrollbar-thumb:hover,
.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a7aeb8;
}
/* Chat AI Styles */
.chat-ai-controls {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.ai-toggle-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.ai-toggle-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.ai-toggle-btn:hover {
    background: #f0f0f0;
}

.ai-toggle-btn.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.smart-replies-container {
    padding: 10px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.smart-reply {
    display: inline-block;
    margin: 5px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 15px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.smart-reply:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
}
/* Voice Call Modal */
.voice-call-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
}

.voice-call-modal.active {
    display: flex;
}

.call-modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: callModalAppear 0.3s ease;
    min-width: 300px;
}

@keyframes callModalAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.call-avatar {
    margin-bottom: 20px;
}

.call-avatar-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #007cba, #00a8ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto;
    color: white;
}

.call-avatar-icon.active {
    background: linear-gradient(135deg, #00b894, #00a8ff);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.call-info {
    margin-bottom: 30px;
}

.call-contact-name {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.call-status {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
}

.call-timer {
    font-size: 14px;
    color: #007cba;
    font-weight: 500;
}

.call-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.call-control-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.call-control-btn.success {
    background: #00b894;
}

.call-control-btn.danger {
    background: #ff4757;
}

.call-control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Voice call buttons */
.voice-call-btn {
    background: #00b894;
    color: white;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.voice-call-btn:hover {
    background: #00a885;
    transform: scale(1.05);
}

/* Voice call button in chat header */
.voice-call-header-btn {
    background: #00b894;
    color: white;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.voice-call-header-btn:hover {
    background: #00a885;
    transform: scale(1.05);
}

/* Voice call button in input area */
.voice-call-input-btn {
    background: linear-gradient(135deg, #007cba, #00b894);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.voice-call-input-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #007cba, #00b894);
    transform: scale(1.05);
}

.voice-call-input-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Notifications */
.voice-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 20001;
    border-left: 4px solid #007cba;
}

.voice-notification-error {
    border-left-color: #ff4757;
}

.voice-notification-info {
    border-left-color: #007cba;
}

.notification-message {
    font-size: 14px;
    color: #333;
}

/* File Upload Modal Styles - Integrated with Chat Design */
.chat-file-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: 10001;
    animation: modalAppear 0.3s ease;
}

.chat-file-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.chat-file-modal-header {
    padding: 20px 24px;
    background: white;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-file-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1a1a1a;
    font-weight: 600;
}

.eve_chat_file_modal_close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.eve_chat_file_modal_close:hover {
    background: #f1f3f4;
}

.chat-file-modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    background: #f8f9fa;
}

.chat-file-dropzone {
    border: 2px dashed #c1c7d0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.chat-file-dropzone:hover {
    border-color: #007cba;
    background: #f8f9fa;
}

.chat-file-dropzone.dragover {
    border-color: #007cba;
    background: #e3f2fd;
}

.dropzone-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.7;
}

.dropzone-content p {
    margin: 8px 0 16px 0;
    color: #666;
    font-size: 14px;
}

.eve_chat_browse_files_btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.eve_chat_browse_files_btn:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.chat-file-preview {
    margin-top: 20px;
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e1e5e9;
}

.file-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.file-preview-header h4 {
    margin: 0;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 600;
}

.eve_chat_clear_files_btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.eve_chat_clear_files_btn:hover {
    background: #ff3742;
}

.file-preview-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-preview-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    transition: background 0.2s ease;
}

.file-preview-item:hover {
    background: #edf2f7;
}

.file-preview-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.file-preview-info {
    flex: 1;
    min-width: 0;
}

.file-preview-name {
    font-weight: 500;
    margin-bottom: 2px;
    color: #1a1a1a;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-size {
    font-size: 11px;
    color: #666;
}

.file-preview-remove {
    background: none;
    border: none;
    color: #ff4757;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: background 0.2s ease;
    font-size: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-preview-remove:hover {
    background: #ffeaea;
}

.chat-file-modal-footer {
    padding: 20px 24px;
    background: white;
    border-top: 1px solid #e1e5e9;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.eve_chat_cancel_file_btn, .eve_chat_send_file_btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.eve_chat_cancel_file_btn {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e1e5e9;
}

.eve_chat_cancel_file_btn:hover {
    background: #e9ecef;
}

.eve_chat_send_file_btn {
    background: #007cba;
    color: white;
}

.eve_chat_send_file_btn:hover:not(:disabled) {
    background: #005a87;
    transform: translateY(-1px);
}

.eve_chat_send_file_btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* File Upload Progress */
.chat-file-progress {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 10002;
    width: 300px;
    border: 1px solid #e1e5e9;
    animation: chatSlideIn 0.3s ease;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-header span {
    font-weight: 500;
    color: #1a1a1a;
    font-size: 14px;
}

.eve_chat_cancel_upload_btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.eve_chat_cancel_upload_btn:hover {
    background: #ff3742;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e1e5e9;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007cba, #00a8ff);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.progress-text {
    text-align: center;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* File Message Styles in Chat */
.chat-message.file-message {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}

.message-outgoing.file-message {
    background: linear-gradient(135deg, #007cba, #005a87);
    border: none;
}

.file-message-content {
    display: flex;
    align-items: center;
    padding: 12px;
}

.file-message-icon {
    font-size: 24px;
    margin-right: 12px;
    flex-shrink: 0;
}

.message-outgoing .file-message-icon {
    color: rgba(255, 255, 255, 0.9);
}

.file-message-info {
    flex: 1;
    min-width: 0;
}

.file-message-name {
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 13px;
}

.message-outgoing .file-message-name {
    color: white;
}

.message-incoming .file-message-name {
    color: #1a1a1a;
}

.file-message-size {
    font-size: 11px;
    margin-bottom: 6px;
}

.message-outgoing .file-message-size {
    color: rgba(255, 255, 255, 0.8);
}

.message-incoming .file-message-size {
    color: #666;
}

.file-message-actions {
    display: flex;
    gap: 8px;
}

.file-download-btn, .file-preview-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.message-incoming .file-download-btn,
.message-incoming .file-preview-btn {
    background: #007cba;
    color: white;
}

.file-download-btn:hover, .file-preview-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.message-incoming .file-download-btn:hover,
.message-incoming .file-preview-btn:hover {
    background: #005a87;
}

/* File type specific colors */
.file-type-image .file-message-icon { color: #00b894; }
.file-type-audio .file-message-icon { color: #fd79a8; }
.file-type-video .file-message-icon { color: #e17055; }
.file-type-document .file-message-icon { color: #007cba; }
.file-type-file .file-message-icon { color: #636e72; }

.message-outgoing .file-type-image .file-message-icon,
.message-outgoing .file-type-audio .file-message-icon,
.message-outgoing .file-type-video .file-message-icon,
.message-outgoing .file-type-document .file-message-icon,
.message-outgoing .file-type-file .file-message-icon {
    color: rgba(255, 255, 255, 0.9);
}

/* Notification Styles */
.chat-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10003;
    border-left: 4px solid #007cba;
    font-size: 14px;
    color: #333;
}

.chat-notification-success {
    border-left-color: #00b894;
}

.chat-notification-error {
    border-left-color: #ff4757;
}

.chat-notification-info {
    border-left-color: #007cba;
}

/* Animations */
@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes chatSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
/* Attached Files Preview Styles */
.attached-files-preview {
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
    padding: 12px 16px;
    display: none;
}

.attached-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #666;
}

.clear-attached-files-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
}



.attached-file-icon {
    font-size: 16px;
    margin-right: 8px;
    width: 20px;
    text-align: center;
}

.attached-file-info {
    flex: 1;
    min-width: 0;
}

.attached-file-name {
    font-weight: 500;
    font-size: 12px;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attached-file-size {
    font-size: 10px;
    color: #666;
}

.attached-file-remove {
    background: none;
    border: none;
    color: #ff4757;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    font-size: 14px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.attached-file-remove:hover {
    background: #ffeaea;
}
.emoji-picker {
    font-family: Arial, sans-serif;
}
.emoji-header {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    background: #f8f9fa;
}
.emoji-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
}
.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    padding: 10px;
    max-height: 250px;
    overflow-y: auto;
}
.emoji-item {
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    text-align: center;
    border-radius: 5px;
    transition: background 0.2s;
}
.emoji-item:hover {
    background: #f0f0f0;
}
/* Attached Files Preview Styles - UPDATED TO MATCH YOUR DESIGN */
.attached-files-preview {
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
    padding: 16px 20px;
    max-height: 200px;
    overflow-y: auto;
}

.attached-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

.clear-attached-files-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-attached-files-btn:hover {
    background: #ff3742;
    transform: translateY(-1px);
}


.attached-file-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    transition: all 0.2s ease;
	animation: fileAppear 0.3s ease;
	padding:5px;
}
.attached-file-item:hover {
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.1);
}

.attached-file-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.attached-file-remove:hover {
    background: #ff3742;
    transform: scale(1.1);
}

/* Image Preview Styles */
.attached-file-preview-image {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.attached-image-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
    flex-shrink: 0;
}

.attached-file-info-overlay {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.attached-file-name {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attached-file-size {
    font-size: 12px;
    color: #666;
}

/* Video Preview Styles */
.attached-file-preview-video {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.attached-video-icon {
    font-size: 24px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e17055, #ff7675);
    border-radius: 8px;
    color: white;
    flex-shrink: 0;
}

.attached-file-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
	padding:5px;
}

/* Audio Preview Styles */
.attached-file-preview-audio {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.attached-audio-icon {
    font-size: 24px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fd79a8, #e84393);
    border-radius: 8px;
    color: white;
    flex-shrink: 0;
}

/* Document Preview Styles */
.attached-file-preview-document {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.attached-file-icon {
    font-size: 20px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #007cba, #00a8ff);
    border-radius: 8px;
    color: white;
    flex-shrink: 0;
}


/* Scrollbar styling to match your design */
.attached-files-preview::-webkit-scrollbar {
    width: 6px;
}

.attached-files-preview::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 3px;
}

.attached-files-preview::-webkit-scrollbar-thumb {
    background: #c1c7d0;
    border-radius: 3px;
}

.attached-files-preview::-webkit-scrollbar-thumb:hover {
    background: #a7aeb8;
}

/* Responsive design */
@media (max-width: 768px) {
    .attached-files-preview {
        padding: 12px 16px;
        max-height: 150px;
    }
    
    .attached-image-thumbnail,
    .attached-video-icon,
    .attached-audio-icon,
    .attached-file-icon {
        width: 50px;
        height: 50px;
    }
    
    .attached-file-name {
        font-size: 13px;
    }
    
    .attached-file-size {
        font-size: 11px;
    }
}

/* Animation for when files are added */
@keyframes fileAppear {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Media Container Styles */
.chat-media-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.media-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.media-item.image-item {
    cursor: pointer;
    max-width: 300px;
}

.media-item.video-item {
    cursor: pointer;
    max-width: 300px;
}

.media-item.image-item:hover,
.media-item.video-item:hover {
    transform: scale(1.02);
}

.chat-media-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    display: block;
}

.media-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-item:hover .media-overlay {
    opacity: 1;
}

.media-download-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.media-download-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.media-download-btn svg {
    width: 16px;
    height: 16px;
    color: white;
}

/* File item styles */
.media-item.file-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    gap: 12px;
    max-width: 300px;
}

.file-icon {
    font-size: 24px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
}

.file-size {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

/* Fullscreen Preview Styles */
.media-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    cursor: pointer;
}

.media-fullscreen-container {
    background: white;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: default;
}

.media-fullscreen-header {
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.media-filename {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 16px;
}

.media-fullscreen-actions {
    display: flex;
    gap: 8px;
}

.media-download-fullscreen,
.media-fullscreen-close {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.media-download-fullscreen:hover,
.media-fullscreen-close:hover {
    background: #f1f3f4;
    color: #333;
}

.media-download-fullscreen svg,
.media-fullscreen-close svg {
    width: 20px;
    height: 20px;
}

.media-fullscreen-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f8f9fa;
    min-height: 400px;
}

.media-fullscreen-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

/* Видео стилове */
.media-fullscreen-video {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    background: #000;
}

.video-content {
    background: #000;
}

.video-content .media-fullscreen-video {
    width: auto;
    height: auto;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .media-fullscreen-container {
        max-width: 95vw;
        max-height: 95vh;
        margin: 10px;
    }
    
    .media-fullscreen-content {
        padding: 10px;
    }
    
    .media-fullscreen-image,
    .media-fullscreen-video {
        max-height: 60vh;
    }
    
    .media-item.image-item,
    .media-item.video-item,
    .media-item.file-item {
        max-width: 250px;
    }
}

/* Стилове за табовете */
.chat-tabs {
    display: flex;
    border-bottom: 1px solid #e1e5e9;
    background: #f8f9fa;
}

.chat-tab {
    flex: 1;
    padding: 5px 5px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chat-tab:hover {
    color: #495057;
    background: #e9ecef;
}

.chat-tab.active {
    color: #007cba;
    border-bottom-color: #007cba;
    background: white;
}

.tab-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tab-pane {
    display: none;
    height: 100%;
    flex-direction: column;
}

.tab-pane.active {
    display: flex;
}

/* Стилове за групите */
.groups-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.no-groups {
    padding: 60px 20px;
    text-align: center;
    color: #666;
}

.no-groups .no-contents-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-groups p {
    margin: 0 0 16px 0;
    font-size: 14px;
}

.create-first-group {
    background: #007cba;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.create-first-group:hover {
    background: #005a87;
}

.group-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f4;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.group-item:hover {
    background: #edf2f7;
}

.group-item.active {
    background: #e3f2fd;
    border-right: 3px solid #007cba;
}

.group-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #00b894, #00a8ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    font-weight: 600;
}

.group-info {
    flex: 1;
    min-width: 0;
}

.group-name {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
    font-size: 14px;
}

.group-members {
    font-size: 12px;
    color: #666;
}

.group-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.group-time {
    font-size: 11px;
    color: #999;
}

.group-unread {
    background: #ff4757;
    color: white;
    border-radius: 8px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

/* Скролбар за групи */
.groups-list::-webkit-scrollbar {
    width: 6px;
}

.groups-list::-webkit-scrollbar-track {
    background: #f1f3f4;
}

.groups-list::-webkit-scrollbar-thumb {
    background: #c1c7d0;
    border-radius: 3px;
}

.groups-list::-webkit-scrollbar-thumb:hover {
    background: #a7aeb8;
}
/* Create Group Modal Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1a1a1a;
    font-size: 14px;
}

#group-name-input,
#group-members-search {
    width: 100%;
    padding: 12px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

#group-name-input:focus,
#group-members-search:focus {
    border-color: #007cba;
}

.selected-members {
    margin: 16px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.selected-members h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.selected-members-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selected-member {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    gap: 6px;
}

.selected-member-remove {
    background: none;
    border: none;
    color: #ff4757;
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.selected-member-remove:hover {
    background: #ffeaea;
}

.contacts-search-results {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: white;
}

.contact-search-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s ease;
}

.contact-search-item:hover {
    background: #f8f9fa;
}

.contact-search-item:last-child {
    border-bottom: none;
}

.contact-search-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #007cba, #00a8ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    font-weight: 600;
}

.contact-search-info {
    flex: 1;
}

.contact-search-name {
    font-weight: 500;
    font-size: 14px;
    color: #1a1a1a;
}

.contact-search-identity {
    font-size: 12px;
    color: #666;
}

.contact-search-add {
    background: #00b894;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.contact-search-add:hover {
    background: #00a885;
}

.contact-search-added {
    background: #ccc;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: not-allowed;
}
/* Group Info Modal Styles */
.group-info-section {
    margin-bottom: 20px;
}

.group-info-section h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.group-members-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    margin-bottom: 12px;
}

.no-members {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.group-member-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.group-member-item:last-child {
    border-bottom: none;
}

.member-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #007cba, #00a8ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    font-weight: 600;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 500;
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.member-role {
    font-size: 12px;
    color: #666;
    text-transform: capitalize;
}

.remove-member-btn {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.remove-member-btn:hover {
    background: #ff3742;
}

.btn-add-member {
    background: #007cba;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    width: 100%;
}

.btn-add-member:hover {
    background: #005a87;
}

/* Group Welcome Message */
.group-welcome-info {
    margin-top: 20px;
    text-align: left;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.group-welcome-info p {
    margin: 8px 0;
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-welcome-info p:before {
    content: "✓";
    color: #00b894;
    font-weight: bold;
}

/* Fix for modal z-index issues */
#create-group-modal,
#group-info-modal,
#add-members-modal {
    z-index: 10002;
}

/* Ensure proper stacking */
.modal {
    z-index: 10002 !important;
}

.chat-file-modal {
    z-index: 10003 !important;
}

/* Responsive fixes for groups */
@media (max-width: 768px) {
    .group-member-item {
        padding: 10px 12px;
    }
    
    .group-members-list {
        max-height: 150px;
    }
    
    .group-welcome-info {
        max-width: 100%;
        padding: 0 10px;
    }
}

/* Scrollbar for group members */
.group-members-list::-webkit-scrollbar {
    width: 6px;
}

.group-members-list::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 3px;
}

.group-members-list::-webkit-scrollbar-thumb {
    background: #c1c7d0;
    border-radius: 3px;
}

.group-members-list::-webkit-scrollbar-thumb:hover {
    background: #a7aeb8;
}

.group-view {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 10;
}

.group-header {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.back-to-groups-btn {
    background: none;
    border: none;
    padding: 8px;
    margin-right: 10px;
    cursor: pointer;
    border-radius: 50%;
}

.back-to-groups-btn:hover {
    background: #e9ecef;
}

.group-header-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.group-header-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 15px;
}

.group-header-details {
    flex: 1;
}

.group-header-name {
    font-weight: bold;
    font-size: 18px;
}

.group-header-meta {
    color: #666;
    font-size: 14px;
}

.group-members-container {
    padding: 20px;
}

.group-members-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 20px;
}

.group-members-header h4 {
    margin: 0;
    flex: 1;
}

.group-actions-menu {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 8px 0;
    min-width: 180px;
}

.group-action-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.group-action-item:hover {
    background: #f8f9fa;
}

.group-action-item.danger:hover {
    background: #fff5f5;
    color: #dc3545;
}

.group-action-item .action-icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.group-action-divider {
    height: 1px;
    background: #eee;
    margin: 4px 0;
}
.create-group-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.create-group-btn {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.create-group-btn:hover {
    background: #0056b3;
}
/* Group Members Panel Styles */
.group-members-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.group-members-header {
    padding: 15px;
    border-bottom: 1px solid #e1e5e9;
    background: #f8f9fa;
}

.group-name-large {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.back-to-groups-btn {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
}

.back-to-groups-btn:hover {
    background: #5a6268;
}

.group-members-list-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.members-list-header {
    padding: 12px 15px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.members-list-header span {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.add-member-btn {
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
}

.add-member-btn:hover {
    background: #005a87;
}

.members-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.loading-members {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.no-members {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.member-side-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    gap: 12px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
}

.member-side-item:hover {
    background: #f8f9fa;
}

.member-avatar-small {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #007cba, #00a8ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    font-weight: 600;
}

.member-name-small {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
}

/* Scrollbar for members list */
.members-list::-webkit-scrollbar {
    width: 4px;
}

.members-list::-webkit-scrollbar-track {
    background: #f1f3f4;
}

.members-list::-webkit-scrollbar-thumb {
    background: #c1c7d0;
    border-radius: 2px;
}

.members-list::-webkit-scrollbar-thumb:hover {
    background: #a7aeb8;
}

/* Add Members Modal Styles */
.contacts-search-results {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-top: 10px;
}

.contact-search-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f1f3f4;
    gap: 12px;
}

.contact-search-item:last-child {
    border-bottom: none;
}

.contact-search-item:hover {
    background: #f8f9fa;
}

.contact-search-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #007cba, #00a8ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    font-weight: 600;
}

.contact-search-info {
    flex: 1;
}

.contact-search-name {
    font-weight: 500;
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.contact-search-identity {
    font-size: 12px;
    color: #666;
}

.contact-search-add {
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
}

.contact-search-add:hover {
    background: #005a87;
}

.contact-search-added {
    background: #28a745 !important;
}

.no-contacts-found {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}
.member-side-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    gap: 12px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    position: relative;
}

.member-side-item:hover {
    background: #f8f9fa;
}

.member-side-item:hover .member-actions {
    opacity: 1;
}

.member-actions {
    opacity: 0;
    transition: opacity 0.2s ease;
    margin-left: auto;
}

.member-action-btn {
    background: none;
    border: none;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.remove-member-btn:hover {
    background: #ff4757;
    color: white;
}