﻿body {
    height: 100vh;
    display: flex;
    overflow: hidden;
    background-color: #f5f5f5;
}

/* Sidebar */
.sidebar {
    transition: width 0.3s ease;
    height: 100%;
    background-color: #e1e6ec;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: start;
    position: relative;
    padding-left: 10px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

    .sidebar.collapsed {
        width: 50px; /* Compact width for icons only */
    }

    .sidebar.expanded {
        width: 200px; /* Full expanded width */
    }

/* Profile Section */
.profile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    width: 100%;
}

    .profile img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
    }

    .profile span {
        font-size: 1rem;
        font-weight: bold;
        display: none;
    }

.sidebar.expanded .profile span {
    display: inline;
}

/* Divider */
.divider {
    width: 90%;
    height: 1px;
    background-color: #ddd;
    margin: 10px auto;
}

/* Navigation Links */
.nav-link {
    color: #333;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    padding: 10px;
    width: 100%;
    transition: background-color 0.3s ease;
}

    .nav-link:hover {
        background-color: #f0f0f0;
        border-radius: 5px;
    }

.hidden-text {
    display: none;
}

.sidebar.expanded .hidden-text {
    display: inline;
}

/* Toggle Button */
.toggle-btn {
    position: absolute;
    top: 10px;
    right: -20px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: #333;
    transition: background-color 0.3s ease, transform 0.2s;
}

    .toggle-btn:hover {
        background-color: #1abc9c;
        color: #fff;
        transform: scale(1.1);
    }

/* Middle Block */
.middle-block {
    background-color: #f7f9fa;
    width: 30%;
    padding: 20px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    transition: margin-left 0.3s ease;
}

/* Chat Section */
.chat {
    background-color: #ffffff;
    border-radius: 0px;
    padding: 15px;
    color: #333;
    height: 100%;
    width: 70%;
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

    .chat-header img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
    }

    .chat-header h6 {
        font-size: 16px;
        font-weight: bold;
        margin: 0;
    }

    .chat-header i {
        font-size: 20px;
        cursor: pointer;
        transition: color 0.3s ease;
    }

        .chat-header i:hover {
            color: #3498db;
        }

.chat-content {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 10px;
}

.chat-message {
    margin-bottom: 15px;
}

    .chat-message p {
        margin: 0;
        padding: 10px;
        border-radius: 10px;
        background-color: #f0f0f0;
        display: inline-block;
    }

    .chat-message small {
        display: block;
        margin-top: 5px;
        color: #999;
    }

.chat-input {
    border-top: 1px solid #ddd;
    padding: 10px 0;
    display: flex;
    gap: 10px;
}

    .chat-input input {
        flex-grow: 1;
        padding: 8px;
        border-radius: 5px;
        border: 1px solid #ccc;
    }

    .chat-input i {
        font-size: 20px;
        cursor: pointer;
        transition: color 0.3s ease;
    }

        .chat-input i:hover {
            color: #3498db;
        }

/* Emoji Box */
.emoji-box {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
}

    .emoji-box span {
        font-size: 20px;
        cursor: pointer;
        transition: transform 0.2s ease;
    }

        .emoji-box span:hover {
            transform: scale(1.2);
        }

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
}

    .search-bar input {
        flex-grow: 1;
        padding: 8px 12px;
        font-size: 14px;
        border-radius: 5px;
        border: 1px solid #ccc;
        background: url('https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons/icons/search.svg') no-repeat 10px center;
        background-size: 16px;
    }

        .search-bar input::placeholder {
            color: #aaa;
        }

    .search-bar button {
        background-color: #3498db;
        border: none;
        border-radius: 5px;
        padding: 8px 12px;
        color: #fff;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

        .search-bar button:hover {
            background-color: #2980b9;
        }

/* Modal */
.modal-header {
    border-bottom: 1px solid #ccc;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

    .modal-body input {
        padding: 8px 12px;
        font-size: 14px;
        border-radius: 5px;
        border: 1px solid #ccc;
    }

/* Button Group */
.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

    .button-group button {
        display: flex;
        align-items: center;
        gap: 5px;
        padding: 8px 12px;
        font-size: 14px;
        border-radius: 5px;
        border: 1px solid #ccc;
        background-color: #f8f8f8;
        cursor: pointer;
    }

        .button-group button:hover {
            background-color: #e0e0e0;
        }
