﻿.chat-container {
    display: flex;
    height: calc(100vh - 45px);
    background-color: #f0f2f5;
    top: 45px;
    left: 50px;
    right: 0;
    bottom: 0;
}

.chat-window {
    flex: 1;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.conversations-panel {
    width: 360px;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease;
}

.conversations-header {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    display: none;
}

.mobile-header {
    display: none;
    align-items: center;
    gap: 12px;
}

.menu-button {
    display: none;
}

.back-button, .menu-button {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    color: #5f6368;
    cursor: pointer;
    font-size: 20px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
}

    .search-box i {
        position: absolute;
        left: 12px;
        color: #5f6368;
    }

    .search-box input {
        padding: 8px 12px 8px 40px;
        border-radius: 24px;
        border: 1px solid #e0e0e0;
        background-color: #f1f3f4;
        font-size: 14px;
        width: 100%;
    }

.conversations-list {
    flex: 1;
    overflow-y: auto;
    height: 100%;
}

.conversation-item {
    display: flex;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .conversation-item:hover {
        background-color: #f5f5f5;
    }

    .conversation-item.active {
        background-color: #e8f0fe;
    }

.conversation-avatar {
    margin-right: 12px;
    flex-shrink: 0;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #1a73e8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.conversation-content {
    flex: 1;
    min-width: 0;
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.conversation-name {
    font-weight: 500;
    color: #202124;
}

.conversation-time {
    font-size: 12px;
    color: #5f6368;
}

.conversation-preview {
    font-size: 13px;
    color: #5f6368;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .chat-container {
        left: 0;
    }

    .conversations-panel {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 100%;
        transform: translateX(-100%);
        z-index: 1000;
    }

    .chat-container.show-conversations .conversations-panel {
        transform: translateX(0);
    }

    .conversations-header {
        display: block;
    }

    .mobile-header {
        display: flex;
    }

    .back-button, .menu-button {
        display: block;
    }

    .chat-window {
        width: 100%;
    }
}
