﻿/* =========================================================
   SHARED CHAT STYLES
   ========================================================= */

.message-row {
    display: flex;
    margin-bottom: 12px;
}

    .message-row.customer {
        justify-content: flex-end;
    }

    .message-row.support {
        justify-content: flex-start;
    }

    .message-row.admin-support {
        justify-content: flex-end;
    }

    .message-row.admin-customer {
        justify-content: flex-start;
    }

.message-bubble {
    padding: 11px 15px;
    max-width: 72%;
    border-radius: 14px;
}

/* =========================================================
   CUSTOMER MESSAGE
   ========================================================= */

.customer-message {
    background-color: var(--mud-palette-info) !important;
    color: var(--mud-palette-info-text) !important;
    border-bottom-right-radius: 4px;
}

/* =========================================================
   SUPPORT MESSAGE
   ========================================================= */

.support-message {
    background-color: var(--mud-palette-primary) !important;
    color: var(--mud-palette-primary-text) !important;
    border-bottom-left-radius: 4px;
}

/* =========================================================
   MESSAGE CONTENT
   ========================================================= */

.message-sender {
    display: block;
    font-weight: 600;
}

.message-text {
    margin-top: 3px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.message-time {
    display: block;
    margin-top: 5px;
    opacity: 0.75;
    text-align: right;
}

/* =========================================================
   HISTORY PAGINATION
   ========================================================= */

.history-pagination {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 8px 12px;
    border-top: 1px solid var(--mud-palette-divider);
}

.history-pagination-pages {
    display: flex;
    justify-content: center;
}

.history-total {
    position: absolute;
    right: 12px;
    white-space: nowrap;
}

/* =========================================================
   ATTACHMENTS
   ========================================================= */

.chat-attachment {
    margin-top: 8px;
}

.chat-image {
    display: block;
    max-width: 50%;
    max-height: 200px;
    width: auto;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
}
