:root {
    --darkgreen-color: #6BBF8A;
    --green-color: #729641;
    --red-color: #bb2d3b;
    --black-color: black;
    --white-color: white;
}
.chat-container {
    width: 100%;
    height: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
   /* background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;*/
    overflow: hidden;
    direction: rtl;
}


/* Header */

/*.chat-header {
    flex: 0 0 auto;
    min-height: 64px;
    padding: 10px 16px;
    border-bottom: 1px solid #eeeeee;
    display: flex;
    align-items: center;
    background: #ffffff;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eeeeee;
    font-size: 17px;
}

.chat-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-title {
    font-size: 15px;
    font-weight: 600;
}

.chat-status {
    font-size: 11px;
    color: #777777;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4caf50;
}*/


/*    Chat Header */

.ehr-chat-header {
    display: flex;
    align-items: center;
    height: 58px;
    min-height: 58px;
    padding: 0 16px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.ehr-chat-header-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background: #eef5ff;
    color: #0d6efd;
}

.ehr-chat-header-info {
    margin-right: 10px;
}

.ehr-chat-header-name {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.ehr-chat-header-status {
    margin-top: 2px;
    font-size: 11px;
    color: #22a05a;
}

/* Messages */

.chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
}

.chat-message-row {
    width: 100%;
    display: flex;
    margin-bottom: 8px;
}

    .chat-message-row.mine {
        justify-content: flex-start;
    }

    .chat-message-row.other {
        justify-content: flex-end;
    }

.chat-message {
    max-width: min(75%, 500px);
    padding: 8px 11px 5px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chat-message-row.mine .chat-message {
    background: #e7f1ff;
    border-bottom-right-radius: 3px;
}

.chat-message-row.other .chat-message {
    background: #ffffff;
    border-bottom-left-radius: 3px;
}

.chat-message-text {
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}


.chat-message-time {
    font-size: 10px;
    color: #888888;
}



/*   Messages */

.ehr-chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px;
}

.chat-empty {
    height: 100%;
    width: 100%;
    text-align: center;
    align-content: center;
}

/* Image */

.chat-image {
    display: block;
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    object-fit: contain;
}


/* File */

.chat-file-message {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.chat-file-icon {
    font-size: 25px;
}




/* Attachment Preview */

.chat-attachment-preview {
    flex: 0 0 auto;
    min-height: 46px;
    padding: 7px 12px;
    border-top: 1px solid #eeeeee;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.chat-remove-attachment {
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
}


/* Input */

.chat-input-container {
    flex: 0 0 auto;
    min-height: 60px;
    padding: 8px 10px;
    border-top: 1px solid #eeeeee;
    background: #ffffff;
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.chat-text-input {
    width: 100%;
    min-height: 40px;
    max-height: 120px;
    resize: none;
    border: 1px solid #dddddd;
    border-radius: 10px;
    padding: 9px 12px;
    outline: none;
    font-family: inherit;
    font-size: 13px;
    direction: rtl;
}

.chat-attachment-button,
.chat-audio-button,
.chat-send-button {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 17px;
}
.Send-Icon {
    color: var(--green-color);
    transform: rotate(-135deg);
}
.chat-attachment-button {
    position: relative;
}

    .chat-attachment-button > i,
    .chat-audio-button > i,
    .chat-send-button > i {
        line-height:0;
    }

.chat-send-button:disabled {
    opacity: 0.35;
    cursor: no-drop;
}

/* Mobile */

@media (max-width: 576px) {

    .chat-container {
        border: 0;
        border-radius: 0;
        min-height: 100%;
    }

    .chat-message {
        max-width: 85%;
    }

    .chat-messages {
        padding: 10px;
    }

    /*    Chat Header */

    .ehr-chat-header {
        display: flex;
        align-items: center;
        height: 58px;
        min-height: 58px;
        padding: 0 16px;
        background: #fff;
        border-bottom: 1px solid #e5e7eb;
    }

    .ehr-chat-header-avatar {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        min-width: 38px;
        border-radius: 50%;
        background: #eef5ff;
        color: #0d6efd;
    }

    .ehr-chat-header-info {
        margin-right: 10px;
    }

    .ehr-chat-header-name {
        font-size: 14px;
        font-weight: 600;
        color: #374151;
    }

    .ehr-chat-header-status {
        margin-top: 2px;
        font-size: 11px;
        color: #22a05a;
    }
    .chat-input-container {
        padding: 7px;
    }

    .chat-audio-button,
    .chat-attachment-button,
    .chat-send-button {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .chat-audio-message audio {
        max-width: 220px;
    }
}

.chat-audio-button.recording {
    color: #dc3545;
    animation: chat-recording-pulse 1s infinite;
}

.chat-recording-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 13px;
}

.chat-recording-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dc3545;
    display: inline-block;
}

.chat-audio-message {
    max-width: 260px;
}

    .chat-audio-message audio {
        width: 100%;
    }

@keyframes chat-recording-pulse {
    50% {
        opacity: .45;
    }
}