.chat-container {
    width: 100%;
    max-width: 900px;
    margin: 50px auto;
    border: 1px solid #ccc;
    background-color: #BDDCBA; /* sfondo verde chiaro tipo Telegram */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.chat-header {
    background-color: #558fb0; /* blu/azzurro Telegram */
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
}

.avatar {
    width: 50px;
    height: 50px;
    background-color: #ccc;
    border-radius: 50%;
    margin-right: 10px;
    background-image: url('https://dronility.com/wp-content/uploads/2025/07/image-10.png');
    background-size: cover;
    background-position: center;
}

.user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-weight: bold;
    font-size: 18px;
}

.user-status {
    font-size: 14px;
    color: #d0eaf7;
}

.chat-messages {
    padding: 1em;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 0.6em 0.9em;
    border-radius: 1em;
    max-width: 70%;
    line-height: 1.4;
    position: relative;
    font-size: 15px;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.sent {
    background-color: #dcf8c6; /* verde chiaro */
    align-self: flex-end;
    border-bottom-right-radius: 0.4em;
}

.received {
    background-color: #ffffff;
    align-self: flex-start;
    border-bottom-left-radius: 0.4em;
}

.message img {
    max-height: 200px;
    border-radius: 10px;
    display: block;
}

.message-flex {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
    max-width: 70%;
}

.message-image img {
    width: 100%;
    min-width: 100px;
    max-width: 100px;
    height: auto;
    border-radius: 10px;
}

.chat-date-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0.5em auto;
    position: relative;
}

.chat-date-divider span {
    background-color: #d7eadd;
    color: #333;
    font-size: 13px;
    padding: 0.4em 0.8em;
    border-radius: 1em;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@media (max-width: 600px) {
    .message-flex {
        flex-direction: column;
        max-width: 85%;
        align-items: start;
    }

    .message-image img {
        width: 70px;
    }

    .message {
        font-size: 15px;
    }

    .chat-messages {
        padding: 0.5em;
    }

    .entry-content-wrap {
        padding-left: 0.4em !important;
        padding-right: 0.4em !important;
    }
}
