/* General styles */
body, html {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
}

.header {
    background-color: #539eac;
    color: white;
    padding: 0 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px; /* Adjust the header height to accommodate the larger image */
}

.header img.logo-img {
    width: 300px; /* Increased width */
    height: 200px; /* Increased height */
    margin-left: -70px;
    margin-top: 20px; /* Move the image lower */
}

.header div {
    margin-top: 20px; /* Adjust vertical position of header text if needed */
}

.content {
    display: flex;
    flex: 1; /* Let content take remaining space */
}

.doctors-list {
    width: 25%;
    background-color: #f5f5f5;
    padding: 20px;
    overflow-y: auto; /* Ensure list scrolls if too long */
}

.doctors-list h3 {
    margin-top: 0;
}

.doctor {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.doctor img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
}

.doctor-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.doctor-info div {
    margin-bottom: 5px;
}

.doctor-actions button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    margin-right: 10px;
}

.doctor-actions button:hover {
    color: #539eac;
}

.chat-section {
    width: 75%;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto; /* Ensure chat section scrolls if too long */
}

.chat-box {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
}

.message {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.message p {
    background-color: #f1f1f1;
    padding: 10px;
    border-radius: 10px;
    max-width: 60%;
}

.message.time {
    font-size: 0.85em;
    color: gray;
    margin-left: 10px;
    margin-right: 10px;
}

.message.sent p {
    background-color: #7fc4c1;
    margin-left: auto;
}

.message-input {
    display: flex;
    align-items: center;
    border-top: 1px solid #ddd;
    padding: 10px;
}

.message-input input {
    flex-grow: 1;
    border: none;
    padding: 10px;
    border-radius: 30px;
    outline: none;
    background-color: #f5f5f5;
    margin-right: 10px;
}

.message-input button {
    background-color: #000;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px; /* Rounded corners */
    cursor: pointer;
    transition: background-color 0.3s;
}

.message-input button:hover {
    background-color: #333; /* Darker color on hover */
}

/* Media Queries */

@media (max-width: 1200px) {
    .content {
        flex-direction: column;
    }

    .doctors-list, .chat-section {
        width: 100%;
    }

    .doctor {
        flex-direction: column;
        align-items: flex-start;
    }

    .doctor img {
        margin: 0 0 10px 0;
    }

    .doctor-info {
        align-items: flex-start;
    }

    .message p {
        max-width: 80%;
    }

    .message-input button {
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .header img.logo-img {
        width: 80%;
        height: auto;
        margin: 40px 0 20px 0; /* Moved image lower */
    }

    .header div {
        margin-top: 10px;
    }

    .doctor img {
        width: 40px;
        height: 40px;
    }

    .doctor-info {
        text-align: center;
    }

    .doctor-info div {
        margin-bottom: 2px;
    }

    .message p {
        max-width: 70%;
    }
}

@media (max-width: 480px) {
    .doctor img {
        width: 30px;
        height: 30px;
    }

    .doctor-actions button {
        font-size: 1em;
        margin-right: 5px;
    }

    .message p {
        max-width: 60%;
        font-size: 0.9em;
        padding: 8px;
    }

    .message-input input {
        padding: 8px;
        margin-right: 5px;
    }

    .message-input button {
        padding: 8px 15px;
    }
}
