.messages {
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 30px 30px 0 0;

    .message-title {
        height: 100%;
        display: flex;
        align-items: center;
        padding: 20px 30px;
        background-color: #ffca45;
        border-radius: 30px 30px 0 0;

        .green-title {
            color: #00A5A2;
            font-size: 1.8em;
            margin: 20px 20px;
        }

        .yellow-dot {
            color: #00A5A2;
            font-size: 3em;
            line-height: 0px;
        }
    }

    .message-body {
        display: flex;
        max-height: 500px;
        overflow: hidden;

        .message-trainees {
            overflow: auto;
            width: 40%;
            border-right: 1px solid #e9e9e9;

            .error {
                display: flex;
                justify-content: center;
                align-items: center;
                margin: 40px;

                p {
                    margin-left: 6px;
                    font-size: 1rem;
                }

                i {
                    color: #C4233C;
                }
            }

            .trainees-messages {
                .selected {
                    background-color: #FFC83B5A;
                }
            }

            .trainee-info {
                display: flex;
                align-items: center;
                padding: 20px;
                border-top: 1px solid #e9e9e9;
                cursor: pointer;

                img {
                    width: 50px;
                    height: 50px;
                }

                h4 {
                    margin-left: 10px;
                }
            }

        }

        .message {
            width: 60%;
            border-top: 1px solid #e9e9e9;
            background-color: #fbfbfb;
            position: relative;
            overflow: auto;

            .image {
                height: 500px;
                position: relative;
                display: block;

                img {
                    height: 100%;
                    width: 100%;
                    position: absolute;
                    top: 0;
                    left: 0;
                }

                p {
                    position: absolute;
                    top: 50%;
                    left: 50%;
                    transform: translate(-50%, -50%);
                    color: #bebebe;
                }

            }


            .message-header {
                background-color: #fff;
                height: 66px;
                padding: 0 20px;
                display: none;
                justify-content: space-between;
                align-items: center;
                box-shadow: 0 1px .5px hsla(0, 0%, 72.9%, .13);
                position: absolute;
                left: 0;
                right: 0;
                top: 0;
                z-index: 1;

                .selected-user {
                    display: flex;
                    align-items: center;

                    img {
                        width: 40px;
                        height: 40px;
                    }

                    h5 {
                        margin: 0 6px;
                        font-size: 1rem;
                        font-weight: 500;
                    }
                }

                .back {
                    display: none;
                    margin-right: 5px;
                }
            }

            .message-container {
                position: relative;
                margin-top: 66px;
                margin-bottom: 66px;
                height: calc(100% - 132px);
                overflow-y: auto;
                padding: 20px;
                display: none;

                .error {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    margin: 40px 0;

                    p {
                        margin-left: 6px;
                        font-size: 1rem;
                    }

                    i {
                        color: #C4233C;
                    }
                }

                .chatBox {
                    display: flex;
                    flex-direction: column;
                    width: 100%;

                    .chat {
                        max-width: 40%;
                        border-bottom-right-radius: 10px;
                        border-bottom-left-radius: 10px;
                        color: #212153;
                        box-shadow: 0 1px .5px rgba(11, 20, 26, .13);
                        margin-bottom: 3px;
                        border-top-left-radius: 10px;

                        p {
                            margin: 0;
                            font-size: .8rem;
                            padding: 10px;
                            line-height: 170%;
                        }

                        .timestamp {
                            p {
                                display: flex;
                                justify-content: end;
                                padding-bottom: 5px;
                                padding-top: 5px;
                                font-size: 10px;
                            }
                        }
                    }
                }

                .chatRight {
                    align-items: flex-end;

                    .chat {
                        background-color: rgba(0, 165, 162, 0.1);
                    }
                }

                .chatLeft {
                    align-items: flex-start;

                    .chat {
                        background-color: rgba(196, 35, 60, 0.1);
                    }
                }
            }

            .new-text {
                background-color: #fff;
                height: 66px;
                padding: 0 20px;
                box-shadow: 0 -1px .5px hsla(0, 0%, 72.9%, .13);
                width: 100%;
                display: none;
                justify-content: space-between;
                align-items: center;
                position: absolute;
                left: 0;
                right: 0;
                bottom: 0;
                z-index: 1;

                input {
                    margin-right: 10px;
                    width: 95%;
                    outline: none;
                    border: none;
                    font-size: .9rem;
                }

                i {
                    transform: rotate(45deg);
                    color: rgb(135, 135, 135);
                    cursor: not-allowed;
                }
            }
        }
    }
}

.trainees-messages.selected {
    background-color: #f0f0f0;
    /* Or your preferred highlight color */
}

@media (max-width: 500px) {
    .messages {
        .message-body {

            .message-trainees {
                width: 100%;
            }

            .message {
                display: none;
                width: 100%;


                .message-header {
                    display: none;
                    justify-content: start;
                    align-items: center;

                    .back {
                        display: block;
                    }

                }
            }
        }
    }
}