﻿.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    margin: auto;
    background-color: #20232a;
    color: var(--sc-primary);
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    color: var(--sc-primary);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom:2px solid #444;
    height:35px;
    position:relative;
}

.chat-header h4 {
    margin: 0;
    position:absolute;
    bottom:0;
}

.chat-body {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.chat-message-container {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    max-width: 100%; /* Ensure the message container doesn't exceed the body width */
}

.chat-message-container.current-user {
    align-self: flex-end;
    text-align: right;
}

.chat-message-container.other-user {
    align-self: flex-start;
    text-align: left;
}

.chat-message-content {
    display: flex;
    align-items: center;
    position:relative;
}

.chat-message {
    padding: 10px;
    border-radius: 10px;
    word-wrap: break-word;
    display: inline-block;
}

.chat-message.current-user {
    background-color: #4caf50; /* Green for current user */
    color: white;
    max-width:100%;
}

.chat-message.other-user {
    background-color: #007bff; /* Blue for other users */
    color: white;
    margin-left:45px;
    max-width: calc(100% - 45px);
}

.chat-message-img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-right: 10px;
    max-width: 40px;
    max-height: 40px;
    min-width: 40px;
    min-height: 40px;
    top:0;
    position:absolute;
}

.chat-message-username {
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--sc-primary);
}

.chat-footer {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #3b3f47;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    position:relative;
}

.chat-footer input {
    width:calc(100% - 35px);
    padding: 10px;
    border: none;
    border-radius: 5px;
}

.chat-footer ion-icon {
    font-size: 30px;
    cursor: pointer;
    transition: transform 0.3s ease;
    position:absolute;
    bottom:17px;
    right:8px;
    z-index:10;
}

.chat-footer ion-icon:hover {
    transform: scale(1.2);
}
