* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.messages-container {
    display: flex;
    flex-direction: row;
    height: 90%;
    width: 80%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
	margin: 0 auto;
	margin-top: 50px;
	margin-bottom: 2px;
}

.messages-sidebar-container {
    width: 25%;
    min-width: 250px;
    background: #fafafa;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 15px;
    border-bottom: 1px solid #ddd;
    background: #f0f0f5;
    text-align: center;
}

.chat-list {
    list-style: none;
    overflow-y: auto;
    flex-grow: 1;
}

.chat-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.chat-item:hover {
    background-color: #e7e7f3;
    color: #007bff;
}

.chat-item.active {
    background-color: #007bff;
    color: #fff;
}

.messages-content-container {
    width: 75%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #fff;
    overflow: auto;
}
.messages-content-container::-webkit-scrollbar {
  display: none;
}
.messages-content-container p{
    margin: auto;
	font-size: 24px;
}
.message-list {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.my-message-container,
.their-message-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    animation: slideIn 0.4s ease-out;
}

.my-message-container {
    align-items: flex-end;
}

.their-message-container {
    align-items: flex-start;
}

.message-username {
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 5px;
    text-align: center;
}

.my-message {
    background-color: #007bff;
    color: #fff;
    padding: 10px 15px;
    border-radius: 15px 15px 0 15px;
    max-width: 70%;
    word-wrap: break-word;
    margin-bottom: 5px;
    opacity: 0;
    animation: fadeIn 0.6s forwards;
}

.their-message {
    background-color: #f0f0f5;
    color: #333;
    padding: 10px 15px;
    border-radius: 15px 15px 15px 0;
    max-width: 70%;
    word-wrap: break-word;
    margin-bottom: 5px;
    opacity: 0;
    animation: fadeIn 0.6s forwards;
}

.message-input-container {
    display: flex;
    padding: 10px 15px;
    background: #fafafa;
    border-top: 1px solid #ddd;
    position: sticky;
    bottom: 0;
    width: 100%;
    background-color: #fff;
    z-index: 10;
}

#message-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
}

#send-message-button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 15px;
    margin-left: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#send-message-button:hover {
    background-color: #0056b3;
}

@keyframes slideIn {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.sidebar-header {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 15px;
    border-bottom: 1px solid #ddd;
    background: #f0f0f5;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#add-chat-btn {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#add-chat-btn:hover {
    background-color: #0056b3;
}

.modal-overlay {
    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 h3 {
    margin-bottom: 20px;
}

.modal-content .user-list {
    padding: 0;
    margin: 0 0 20px 0;
}

.modal-content .user-item {
	list-style: none;
    cursor: pointer;
    padding: 10px;
    border: 1px solid #ddd;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}
.unread-marker {
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 4px 8px;
    font-size: 12px;
    margin-left: 10px;
    font-weight: bold;
}

.chat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
}

.chat-item:hover {
    background-color: #f5f5f5;
}

.chat-item.active {
    background-color: #d9f0ff;
    font-weight: bold;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
	transition: color 0.3s;
}

.close-modal:hover,
.close-modal:focus {
    color: red;
    text-decoration: none;
    cursor: pointer;
}
.button{
	background-color: #fff;
    color: #000;
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.button:hover{
background-color: #D3D3D3;
}