/*
|--------------------------------------------------------------------------
| SweetMeet Messages
|--------------------------------------------------------------------------
|
| Dedicated styling for:
| /account/account-messages.php
|
| SweetMeet owns the layout and presentation.
| PremiumPress continues to provide the message engine.
|
|--------------------------------------------------------------------------
*/


/*
|--------------------------------------------------------------------------
| Variables
|--------------------------------------------------------------------------
*/

body.sm-account-messages {
    --sm-msg-gold: #c8a96a;
    --sm-msg-gold-soft: #faf7ef;
    --sm-msg-gold-border: rgba(200, 169, 106, 0.34);

    --sm-msg-black: #080808;
    --sm-msg-text: #222222;
    --sm-msg-grey: #666666;
    --sm-msg-muted: #999999;

    --sm-msg-border: #e5e1da;
    --sm-msg-border-light: #eeeeee;

    --sm-msg-white: #ffffff;
    --sm-msg-light: #f7f7f7;

    --sm-msg-radius: 4px;
}


/*
|--------------------------------------------------------------------------
| Remove PremiumPress Account Presentation
|--------------------------------------------------------------------------
*/

body.sm-account-messages .sm-account-header {
    display: none !important;
}

body.sm-account-messages .page-messages,
body.sm-account-messages .page-messages[ppt-border1],
body.sm-account-messages [ppt-border1].page-messages {
    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;

    box-shadow: none !important;

    background: transparent !important;
}

body.sm-account-messages .account-right,
body.sm-account-messages .account-right[ppt-box] {
    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;

    box-shadow: none !important;

    background: transparent !important;
}


/*
|--------------------------------------------------------------------------
| Main SweetMeet Messages Shell
|--------------------------------------------------------------------------
*/

body.sm-account-messages .sm-messages {
    display: block;

    width: 100%;
    max-width: none;

    margin: 0;
    padding: 0;

    overflow: hidden;

    border: 1px solid var(--sm-msg-border);
    border-radius: var(--sm-msg-radius);

    background: var(--sm-msg-white);
}


/*
|--------------------------------------------------------------------------
| Main Messages Header
|--------------------------------------------------------------------------
*/

body.sm-account-messages .sm-messages-header {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 46px;

    margin: 0;
    padding: 0 16px;

    border-bottom: 1px solid var(--sm-msg-border);

    background: var(--sm-msg-white);
}

body.sm-account-messages .sm-messages-header__title {
    color: var(--sm-msg-black);

    font-size: 15px;
    font-weight: 500;
    line-height: 1;

    text-align: center;
}


/*
|--------------------------------------------------------------------------
| My Account Icon
|--------------------------------------------------------------------------
*/

body.sm-account-messages .sm-messages-header__account {
    position: absolute;
    top: 50%;
    left: 16px;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #777777;

    line-height: 1;
    text-decoration: none;

    transform: translateY(-50%);

    transition: color 0.18s ease;
}

body.sm-account-messages .sm-messages-header__account:hover,
body.sm-account-messages .sm-messages-header__account:focus {
    color: var(--sm-msg-gold);

    text-decoration: none;
    outline: none;
}

body.sm-account-messages .sm-messages-header__account svg {
    display: block !important;

    width: 21px !important;
    height: 21px !important;

    min-width: 21px !important;
    min-height: 21px !important;

    max-width: 21px !important;
    max-height: 21px !important;

    margin: 0 !important;
    padding: 0 !important;

    fill: none !important;

    stroke: currentColor !important;
    stroke-width: 1.7 !important;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/*
|--------------------------------------------------------------------------
| Main Two Column Board
|--------------------------------------------------------------------------
*/

body.sm-account-messages .sm-messages-board {
    display: grid !important;

    grid-template-columns:
        280px
        minmax(0, 1fr);

    width: 100%;
    min-width: 0;

    height: 700px;
    min-height: 600px;

    margin: 0;
    padding: 0;

    background: var(--sm-msg-white);
}


/*
|--------------------------------------------------------------------------
| Conversations Column
|--------------------------------------------------------------------------
*/

body.sm-account-messages .sm-messages-contacts {
    display: flex;
    flex-direction: column;

    min-width: 0;
    height: 100%;

    margin: 0;
    padding: 0;

    overflow: hidden;

    border-right: 1px solid var(--sm-msg-border);

    background: var(--sm-msg-white);
}


/*
|--------------------------------------------------------------------------
| Conversations Header
|--------------------------------------------------------------------------
*/

body.sm-account-messages .sm-messages-contacts__header {
    display: flex;
    align-items: center;

    flex: 0 0 70px;
    min-height: 70px;

    padding: 0 4px;

    border-bottom: 1px solid var(--sm-msg-border);

    background: var(--sm-msg-white);
}

body.sm-account-messages .sm-messages-contacts__title {
    margin: 0;

    color: var(--sm-msg-black);

    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}


/*|--------------------------------------------------------------------------
| Conversation Search
|------------------------------------------------------------------------*/

.sm-messages-contacts__search {
    width: 100%;
    padding: 10px 6px;
}

.sm-messages-contacts__search input {
    width: 100%;
    height: 38px;

    padding: 0 12px;

    border: 1px solid #ddd;
    border-radius: 4px;

    background: #fff;

    font-size: 14px;

    outline: none;
    box-sizing: border-box;
}

.sm-messages-contacts__search input:focus {
    border-color: #c8a96a;
}

/*|--------------------------------------------------------------------------
| Conversation Search - Hidden Row
|------------------------------------------------------------------------*/

#ajax_chat_list .contact.sm-conversation-search-hidden {
    display: none !important;
}

/*
|--------------------------------------------------------------------------
| Conversation List Scrolling
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-contacts {
    display: flex !important;
    flex-direction: column !important;

    height: 100% !important;
    min-height: 0 !important;

    overflow: hidden !important;
}


body.sm-account-messages
.sm-messages-contacts__header {
    flex: 0 0 70px !important;

    height: 70px !important;
    min-height: 70px !important;
}


body.sm-account-messages
.sm-messages-contact-list {
    flex: 1 1 0 !important;

    height: auto !important;
    min-height: 0 !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;

    -webkit-overflow-scrolling: touch;
}


/*
|--------------------------------------------------------------------------
| Conversation List
|--------------------------------------------------------------------------
*/

body.sm-account-messages .sm-messages-contact-list {
    flex: 1 1 auto;

    width: 100%;
    min-width: 0;
    min-height: 0;

    margin: 0;
    padding: 0;

    overflow-x: hidden;
    overflow-y: auto;

    background: var(--sm-msg-white);
}


/*
|--------------------------------------------------------------------------
| Conversation Rows
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-contact-list
.contact {
    position: relative;

    display: flex !important;
    align-items: center !important;

    width: 100% !important;
    height: 60px !important;
    min-height: 60px !important;

    margin: 0 !important;
    padding: 0 14px !important;

    border: 0 !important;
    border-bottom: 1px solid var(--sm-msg-border-light) !important;
    border-radius: 0 !important;

    background: var(--sm-msg-white) !important;

    box-shadow: none !important;

    cursor: pointer;

    transition:
        background-color 0.16s ease;
}

body.sm-account-messages
.sm-messages-contact-list
.contact:hover {
    background: #fcfaf6 !important;
}

body.sm-account-messages
.sm-messages-contact-list
.contact.active-contact {
    background: var(--sm-msg-gold-soft) !important;
}

body.sm-account-messages
.sm-messages-contact-list
.contact.active-contact::before {
    content: "";

    position: absolute;

    top: 0;
    bottom: 0;
    left: 0;

    width: 3px;

    background: var(--sm-msg-gold);
}

body.sm-account-messages
.sm-messages-contact-list
.contact > .d-flex {
    display: flex !important;
    align-items: center !important;

    width: 100%;

    margin: 0 !important;
    padding: 0 !important;
}


/*
|--------------------------------------------------------------------------
| Conversation Row Avatar
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-contact-list
.contact .ppt-avatar {
    flex: 0 0 40px;

    width: 40px !important;
    height: 40px !important;

    margin: 0 11px 0 0 !important;
}


/*
|--------------------------------------------------------------------------
| Conversation Row Name / Time
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-contact-list
.contact ._name {
    margin: 0 !important;

    color: var(--sm-msg-black) !important;

    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

body.sm-account-messages
.sm-messages-contact-list
.contact ._desc,
body.sm-account-messages
.sm-messages-contact-list
.contact .chat-timing {
    margin-top: 3px !important;

    color: var(--sm-msg-muted) !important;

    font-size: 11px !important;
    font-weight: 400 !important;
    line-height: 1.1 !important;
}


/*
|--------------------------------------------------------------------------
| Active Conversation Header
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.discussion-header {
    position: relative !important;

    top: auto !important;

    min-height: 70px !important;
    height: 70px !important;

    margin: 0 !important;
    padding: 0 16px !important;

    border: 0 !important;
    border-left: 0 !important;
    border-bottom: 1px solid var(--sm-msg-gold-border) !important;

    background: var(--sm-msg-gold-soft) !important;
}


body.sm-account-messages
.sm-messages-conversation__header {
    flex: 0 0 70px !important;

    width: 100%;

    min-height: 70px !important;
    height: 70px !important;

    align-items: center;
}


/*
 * PremiumPress initially hides the header.
 * Once a contact becomes active, show it.
 */

body.sm-account-messages
.sm-messages:has(.active-contact)
.sm-messages-conversation__header {
    display: flex !important;
}


/*
|--------------------------------------------------------------------------
| Conversation Actions Menu
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-actions-menu {
    position: fixed;

    z-index: 99990;

    width: 190px;
    min-width: 190px;

    padding: 5px;

    overflow: hidden;

    border: 1px solid #ded8cd;
    border-radius: 5px;

    background: var(--sm-msg-white);

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.12);
}


body.sm-account-messages
.sm-messages-actions-menu[hidden] {
    display: none !important;
}


/*
|--------------------------------------------------------------------------
| Menu Items
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-actions-menu__item {
    display: block;

    width: 100%;

    margin: 0;
    padding: 10px 12px;

    border: 0 !important;
    border-radius: 3px;

    background: var(--sm-msg-white) !important;

    color: var(--sm-msg-black) !important;

    font: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;

    text-align: left;

    cursor: pointer;

    transition:
        background-color 0.15s ease;
}


body.sm-account-messages
.sm-messages-actions-menu__item:hover,
body.sm-account-messages
.sm-messages-actions-menu__item:focus {
    background: var(--sm-msg-gold-soft) !important;

    color: var(--sm-msg-black) !important;

    outline: none;
}


/*
|--------------------------------------------------------------------------
| Divider
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-actions-menu__divider {
    height: 1px;

    margin: 4px 7px;

    background: var(--sm-msg-border);
}


body.sm-account-messages
.sm-messages-actions-menu__item--muted {
    color: var(--sm-msg-grey) !important;
}


/*
|--------------------------------------------------------------------------
| Profile Identity Link
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-conversation__profile-link {
    display: inline-flex;
    align-items: center;

    flex: 1 1 auto;

    min-width: 0;

    gap: 12px;

    margin: 0;
    padding: 0;

    color: var(--sm-msg-black) !important;

    text-decoration: none !important;

    overflow: hidden;
}


body.sm-account-messages
.sm-messages-conversation__profile-link:hover,
body.sm-account-messages
.sm-messages-conversation__profile-link:focus {
    color: var(--sm-msg-black) !important;

    text-decoration: none !important;

    outline: none;
}


/*
|--------------------------------------------------------------------------
| Active Conversation Avatar
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-conversation__avatar {
    flex: 0 0 44px !important;

    width: 44px !important;
    height: 44px !important;

    min-width: 44px !important;
    min-height: 44px !important;

    max-width: 44px !important;
    max-height: 44px !important;

    margin: 0 !important;
}


body.sm-account-messages
.sm-messages-conversation__avatar
._wrap {
    width: 100%;
    height: 100%;

    border-radius: 50%;

    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}


/*
|--------------------------------------------------------------------------
| Active Conversation Name
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-conversation__name {
    display: block;

    min-width: 0;

    overflow: hidden;

    color: var(--sm-msg-black) !important;

    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;

    text-overflow: ellipsis;
    white-space: nowrap;

    transition:
        color 0.16s ease;
}


body.sm-account-messages
.sm-messages-conversation__profile-link:hover
.sm-messages-conversation__name {
    color: var(--sm-msg-gold) !important;
}


/*
|--------------------------------------------------------------------------
| Conversation List - Row Actions Button
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-contact-list
.contact {
    position: relative;
}


/*
 * Reserve room for the actions button so long names
 * cannot run underneath it.
 */

body.sm-account-messages
.sm-messages-contact-list
.contact {
    padding-right: 48px !important;
}


body.sm-account-messages
.sm-messages-contact-actions-toggle {
    position: absolute;

    top: 50%;
    right: 12px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 34px;

    margin: 0;
    padding: 0;

    transform: translateY(-50%);

    border: 1px solid var(--sm-msg-gold) !important;
    border-radius: var(--sm-msg-radius) !important;

    background: var(--sm-msg-white) !important;

    color: var(--sm-msg-black) !important;

    font-size: 15px;
    line-height: 1;

    cursor: pointer;

    box-shadow: none !important;

    z-index: 5;

    transition:
        background-color 0.16s ease,
        color 0.16s ease,
        border-color 0.16s ease;
}


body.sm-account-messages
.sm-messages-contact-actions-toggle:hover,
body.sm-account-messages
.sm-messages-contact-actions-toggle:focus {
    border-color: var(--sm-msg-gold) !important;

    background: var(--sm-msg-gold) !important;

    color: var(--sm-msg-white) !important;

    outline: none;
}


body.sm-account-messages
.sm-messages-contact-actions-toggle i {
    margin: 0 !important;

    font-size: 14px;
    line-height: 1;
}


/*
|--------------------------------------------------------------------------
| Conversation List - Hide Menu
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-contact-actions-menu {
    position: fixed;

    z-index: 99991;

    width: 175px;
    min-width: 175px;

    padding: 5px;

    overflow: hidden;

    border: 1px solid #ded8cd;
    border-radius: 5px;

    background: var(--sm-msg-white);

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.12);
}


body.sm-account-messages
.sm-messages-contact-actions-menu[hidden] {
    display: none !important;
}


body.sm-account-messages
.sm-messages-contact-actions-menu__item {
    display: block;

    width: 100%;

    margin: 0;
    padding: 10px 12px;

    border: 0 !important;
    border-radius: 3px;

    background: var(--sm-msg-white) !important;

    color: var(--sm-msg-grey) !important;

    font: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;

    text-align: left;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}


body.sm-account-messages
.sm-messages-contact-actions-menu__item:hover,
body.sm-account-messages
.sm-messages-contact-actions-menu__item:focus {
    background: var(--sm-msg-gold-soft) !important;

    color: var(--sm-msg-black) !important;

    outline: none;
}



/*
|--------------------------------------------------------------------------
| Conversation Header Actions
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-conversation__actions {
    display: flex;
    align-items: center;

    flex: 0 0 auto;

    gap: 8px;

    margin-left: 14px;
}


/*
|--------------------------------------------------------------------------
| View Profile Button
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-profile-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    min-height: 36px;

    margin: 0 !important;
    padding: 7px 15px !important;

    border: 1px solid var(--sm-msg-gold) !important;
    border-radius: var(--sm-msg-radius) !important;

    background: var(--sm-msg-white) !important;

    color: var(--sm-msg-black) !important;

    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.2;

    text-decoration: none !important;

    box-shadow: none !important;

    transition:
        background-color 0.16s ease,
        color 0.16s ease;
}


body.sm-account-messages
.sm-messages-profile-button:hover,
body.sm-account-messages
.sm-messages-profile-button:focus {
    border-color: var(--sm-msg-gold) !important;

    background: var(--sm-msg-gold) !important;

    color: var(--sm-msg-white) !important;

    text-decoration: none !important;

    outline: none;
}


/*
|--------------------------------------------------------------------------
| Conversation Options Button
|--------------------------------------------------------------------------
|
| Match the SweetMeet profile actions button.
|
*/

body.sm-account-messages
.sm-messages-actions-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 34px;

    width: 34px;
    height: 38px;

    margin: 0;
    padding: 0;

    border: 1px solid var(--sm-msg-gold) !important;
    border-radius: var(--sm-msg-radius) !important;

    background: var(--sm-msg-white) !important;

    color: var(--sm-msg-black) !important;

    font-size: 17px;
    line-height: 1;

    cursor: pointer;

    box-shadow: none !important;

    transition:
        background-color 0.16s ease,
        color 0.16s ease,
        border-color 0.16s ease;
}


body.sm-account-messages
.sm-messages-actions-toggle:hover,
body.sm-account-messages
.sm-messages-actions-toggle:focus {
    border-color: var(--sm-msg-gold) !important;

    background: var(--sm-msg-gold) !important;

    color: var(--sm-msg-white) !important;

    outline: none;
}


body.sm-account-messages
.sm-messages-actions-toggle i {
    margin: 0 !important;

    font-size: 16px;
    line-height: 1;
}

/*
|--------------------------------------------------------------------------
| Back Button
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-back {
    display: none !important;
}


/*
|--------------------------------------------------------------------------
| Mobile Conversation Header
|--------------------------------------------------------------------------
*/

@media (max-width: 767.98px) {

    body.sm-account-messages
    .discussion-header,
    body.sm-account-messages
    .sm-messages-conversation__header {
        padding: 0 10px !important;
    }


    /*
     * Back to conversation list.
     */

    body.sm-account-messages
    .sm-messages-back {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;

        flex: 0 0 34px;

        width: 34px;
        height: 34px;

        margin: 0 8px 0 0;
        padding: 0;

        border: 0 !important;
        border-radius: 50%;

        background: transparent !important;

        color: var(--sm-msg-grey);

        font-size: 17px;

        cursor: pointer;
    }


    body.sm-account-messages
    .sm-messages-back:hover,
    body.sm-account-messages
    .sm-messages-back:focus {
        background: rgba(200, 169, 106, 0.12) !important;

        color: var(--sm-msg-gold);

        outline: none;
    }


    body.sm-account-messages
    .sm-messages-conversation__profile-link {
        gap: 10px;
    }


    body.sm-account-messages
    .sm-messages-conversation__name {
        font-size: 18px;
    }


    body.sm-account-messages
    .sm-messages-conversation__actions {
        gap: 5px;

        margin-left: 8px;
    }

}


/*
|--------------------------------------------------------------------------
| Small Mobile
|--------------------------------------------------------------------------
|
| Avatar/name already link directly to the profile,
| so View Profile is redundant on smaller phones.
|
|--------------------------------------------------------------------------
*/

@media (max-width: 575.98px) {

    body.sm-account-messages
    .sm-messages-profile-button {
        display: none !important;
    }


    body.sm-account-messages
    .sm-messages-conversation__actions {
        margin-left: 5px;
    }

}



/*
|--------------------------------------------------------------------------
| Conversation Panel
|--------------------------------------------------------------------------
*/

body.sm-account-messages .sm-messages-conversation {
    display: flex !important;
    flex-direction: column;

    min-width: 0;
    height: 100%;

    margin: 0;
    padding: 0;

    overflow: hidden;

    background: var(--sm-msg-white);
}






/*
|--------------------------------------------------------------------------
| Message History
|--------------------------------------------------------------------------
*/

body.sm-account-messages .sm-messages-history {
    flex: 1 1 auto;

    width: 100%;
    min-width: 0;
    min-height: 0;

    margin: 0 !important;
    padding: 20px !important;

    overflow-x: hidden;
    overflow-y: auto;

    border: 0 !important;

    background: var(--sm-msg-white) !important;
}

body.sm-account-messages
.sm-messages-history__inner {
    min-height: 100%;
}


/*
|--------------------------------------------------------------------------
| SweetMeet Message Row Layout
|--------------------------------------------------------------------------
|
| PremiumPress output:
|
| .message-chat
|   > .text-muted          avatar wrapper
|   > .message-chat-text   bubble
|   > .message-chat-meta   time
|
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-history
.message-chat {
    display: grid !important;

    width: 100% !important;

    margin: 0 0 4px 0 !important;
    padding: 0 !important;

    column-gap: 10px;
    row-gap: 1px;

    border: 0 !important;

    background: transparent !important;
}


/*
|--------------------------------------------------------------------------
| Incoming Message Layout
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-history
.message-chat-left {
    grid-template-columns:
        30px
        minmax(0, 1fr);

    justify-content: stretch !important;
}

body.sm-account-messages
.sm-messages-history
.message-chat-left
> .text-muted {
    grid-column: 1;
    grid-row: 1;

    align-self: start;

    width: 30px;

    margin: 4px 0 0 0 !important;
    padding: 0 !important;
}

body.sm-account-messages
.sm-messages-history
.message-chat-left
> .message-chat-text {
    grid-column: 2;
    grid-row: 1;

    justify-self: start;
}

body.sm-account-messages
.sm-messages-history
.message-chat-left
> .message-chat-meta {
    grid-column: 2;
    grid-row: 2;

    justify-self: start;

    text-align: left !important;
}


/*
|--------------------------------------------------------------------------
| Outgoing Message Layout
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-history
.message-chat-right {
    grid-template-columns:
        minmax(0, 1fr)
        30px;

    justify-content: stretch !important;
}

body.sm-account-messages
.sm-messages-history
.message-chat-right
> .message-chat-text {
    grid-column: 1;
    grid-row: 1;

    justify-self: end;
}

body.sm-account-messages
.sm-messages-history
.message-chat-right
> .text-muted {
    grid-column: 2;
    grid-row: 1;

    align-self: start;

    width: 30px;

    margin: 4px 0 0 0 !important;
    padding: 0 !important;
}

body.sm-account-messages
.sm-messages-history
.message-chat-right
> .message-chat-meta {
    grid-column: 1;
    grid-row: 2;

    justify-self: end;

    text-align: right !important;
}


/*
|--------------------------------------------------------------------------
| Message Avatars
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-history
.message-chat
.ppt-avatar {
    display: flex !important;

    width: 30px !important;
    height: 30px !important;

    min-width: 30px !important;
    min-height: 30px !important;

    max-width: 30px !important;
    max-height: 30px !important;

    margin: 0 !important;
}


/*
|--------------------------------------------------------------------------
| Message Bubbles
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-history
.message-chat-text {
    position: relative;

    display: block;

    width: fit-content !important;
    max-width: 72% !important;

    margin: 0 !important;
    padding: 7px 11px !important;

    border-radius: 5px !important;

    box-shadow: none !important;
}

body.sm-account-messages
.sm-messages-history
.message-chat-left
.message-chat-text {
    border: 1px solid #d8d8d8 !important;

    background: #f5f5f5 !important;

    color: var(--sm-msg-text) !important;
}

body.sm-account-messages
.sm-messages-history
.message-chat-right
.message-chat-text {
    border: 1px solid var(--sm-msg-gold-border) !important;

    background: #fdfbf7 !important;

    color: var(--sm-msg-text) !important;
}

body.sm-account-messages
.sm-messages-history
.message-chat-text p {
    margin: 0 !important;

    color: inherit !important;

    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.45 !important;
}

body.sm-account-messages
.sm-messages-history
.message-chat-text::before {
    display: none !important;
}

/*
|--------------------------------------------------------------------------
| Message Delete Control
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.message-chat-text {
    position: relative;
}


/*
 * Own messages only receive this button.
 */

body.sm-account-messages
.sm-message-delete {
    position: absolute;

    top: 50%;
    right: calc(100% + 7px);

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 26px;
    height: 26px;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;

    color: #999999;

    font-size: 14px;

    opacity: 0;

    cursor: pointer;

    transform: translateY(-50%);

    transition:
        color 0.16s ease,
        background-color 0.16s ease,
        opacity 0.16s ease;
}


/*
|--------------------------------------------------------------------------
| Show Action on Hover
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.message-chat-right:hover
.sm-message-delete {
    opacity: 1;
}


body.sm-account-messages
.sm-message-delete:hover,
body.sm-account-messages
.sm-message-delete:focus {
    background: var(--sm-msg-gold-soft);

    color: var(--sm-msg-gold);

    opacity: 1;

    outline: none;
}


/*
|--------------------------------------------------------------------------
| Deleted Message
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-message-is-deleted
.message-chat-text {
    padding: 6px 10px !important;

    border: 1px solid #dddddd !important;

    background: #fafafa !important;

    color: #999999 !important;

    box-shadow: none !important;
}


body.sm-account-messages
.sm-message-deleted-text {
    font-size: 13px;

    font-style: italic;

    color: #999999;
}


/*
|--------------------------------------------------------------------------
| Touch Devices
|--------------------------------------------------------------------------
|
| No hover on phones/tablets, so keep the action visible.
|
*/

@media (hover: none) {

    body.sm-account-messages
    .message-chat-right
    .sm-message-delete {
        opacity: 0.65;
    }
}

/*
|--------------------------------------------------------------------------
| Message Time
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-history
.message-chat-meta {
    margin: 0 !important;
    padding: 0 !important;

    color: #aaaaaa !important;

    font-size: 10px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;

    opacity: 1 !important;
}


/*
|--------------------------------------------------------------------------
| PremiumPress Colour Reset
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-history
.bg-primary {
    border-color: var(--sm-msg-gold-border) !important;

    background: #fdfbf7 !important;

    color: var(--sm-msg-text) !important;

    box-shadow: none !important;
}

body.sm-account-messages
.sm-messages-history
.bg-secondary {
    border-color: #d8d8d8 !important;

    background: #f5f5f5 !important;

    color: var(--sm-msg-text) !important;

    box-shadow: none !important;
}

body.sm-account-messages
.sm-messages-history
.bg-primary *,
body.sm-account-messages
.sm-messages-history
.bg-secondary * {
    color: inherit !important;
}


/*
|--------------------------------------------------------------------------
| Message Attachments / Emoji
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-history
.message-chat img {
    max-width: 100%;
}


/*
|--------------------------------------------------------------------------
| Emoji-only Messages - No Bubble
|--------------------------------------------------------------------------
|
| PremiumPress adds .message-has-icon to smile-only messages.
| Keep the normal message row footprint and alignment, but remove
| the visible text bubble around the icon.
|
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-history
.message-chat.message-has-icon
.message-chat-text {
    background: transparent !important;
    background-color: transparent !important;

    border: 0 !important;
    box-shadow: none !important;

    min-width: 54px !important;
    min-height: 45px !important;

    margin: 0 !important;
    padding: 7px 11px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/*
|--------------------------------------------------------------------------
| Emoji-only Messages - Tighter Vertical Spacing
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-history
.message-chat.message-has-icon {
    margin-bottom: 4px !important;
}

body.sm-account-messages
.sm-messages-history
.message-chat.message-has-icon
.message-chat-text {
    min-height: 45px !important;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
}

body.sm-account-messages
.sm-messages-history
.message-chat.message-has-icon
.message-chat-meta {
    margin-top: -4px !important;
}


/*
|--------------------------------------------------------------------------
| Emoji-only Messages - Remove Bubble Arrow / Decoration
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-history
.message-chat.message-has-icon
.message-chat-text::before,
body.sm-account-messages
.sm-messages-history
.message-chat.message-has-icon
.message-chat-text::after {
    display: none !important;
    content: none !important;
}


/*
|--------------------------------------------------------------------------
| Emoji-only Messages - Icon Size
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-history
.message-chat.message-has-icon
.ppt-smile-icon {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;

    background-size: 120% 120% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/*
|--------------------------------------------------------------------------
| Emoji-only Messages - Centre Avatar With Icon
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-history
.message-chat.message-has-icon
> .text-muted {
    align-self: center !important;

    position: relative;
    top: -5px;
}


/*
|--------------------------------------------------------------------------
| SweetMeet Message Images
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-message-image-button {
    display: block;

    width: 240px;
    height: 240px;

    margin: 0;
    padding: 0;

    overflow: hidden;

    border: 1px solid var(--sm-msg-border);
    border-radius: 5px;

    background: #f7f7f7;

    cursor: pointer;
}

body.sm-account-messages
.sm-message-image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.18s ease;
}

body.sm-account-messages
.sm-message-image-button:hover
.sm-message-image {
    transform: scale(1.02);
}


/*
|--------------------------------------------------------------------------
| Message Image Lightbox
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-message-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 30px;

    background: rgba(0, 0, 0, 0.88);
}

body.sm-account-messages
.sm-message-lightbox.is-open {
    display: flex;
}

body.sm-account-messages
.sm-message-lightbox__image {
    display: block;

    max-width: min(92vw, 1200px);
    max-height: 88vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 4px;
}

body.sm-account-messages
.sm-message-lightbox__close {
    position: absolute;
    top: 18px;
    right: 22px;

    width: 42px;
    height: 42px;

    padding: 0;

    border: 0;

    background: transparent;

    color: #ffffff;

    font-size: 34px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;
}


@media (max-width: 620px) {

    body.sm-account-messages
    .sm-message-image-button {
        width: 200px;
        height: 200px;
    }

    body.sm-account-messages
    .sm-message-lightbox {
        padding: 18px;
    }
}


/*
|--------------------------------------------------------------------------
| Message Image Hover
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-message-image-button {
    position: relative;
    overflow: hidden;

    cursor: zoom-in;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}


body.sm-account-messages
.sm-message-image {
    transition:
        transform 0.22s ease,
        filter 0.22s ease;
}


body.sm-account-messages
.sm-message-image-button:hover {
    border-color: var(--sm-msg-gold) !important;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.10);
}


body.sm-account-messages
.sm-message-image-button:hover
.sm-message-image {
    transform: scale(1.025);

    filter: brightness(0.96);
}


/*
|--------------------------------------------------------------------------
| Loading / Empty States
|--------------------------------------------------------------------------
*/

body.sm-account-messages .sm-messages-loading,
body.sm-account-messages .sm-messages-empty {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 240px;

    color: var(--sm-msg-muted);

    text-align: center;
}

body.sm-account-messages .sm-messages-empty {
    flex-direction: column;

    gap: 12px;
}

body.sm-account-messages .sm-messages-empty i {
    color: var(--sm-msg-gold);

    font-size: 32px;
}


/*
|--------------------------------------------------------------------------
| Community Upgrade Notice
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-message-upgrade-notice {
    flex: 0 0 auto;

    margin: 0;

    padding: 17px 20px;

    border-top: 1px solid var(--sm-msg-border);

    background: var(--sm-msg-gold-soft);

    color: var(--sm-msg-grey);

    font-size: 14px;
    line-height: 1.4;

    text-align: center;
}


/*
|--------------------------------------------------------------------------
| Message Composer
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-composer {
    flex: 0 0 auto;

    width: 100%;

    margin: 0 !important;
    padding: 12px 16px 14px !important;

    border: 0 !important;
    border-top: 1px solid var(--sm-msg-border) !important;

    background: var(--sm-msg-white) !important;
}


/*
|--------------------------------------------------------------------------
| Composer Row
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-composer__row {
    display: grid;

    grid-template-columns:
        34px
        minmax(0, 1fr)
        34px
        auto;

    align-items: center;

    width: 100%;

    gap: 4px;

    min-height: 48px;

    margin: 0;
    padding: 4px 5px 4px 7px;

    border: 1px solid #d8d8d8;
    border-radius: 24px;

    background: var(--sm-msg-white);

    box-shadow: none;

    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}

body.sm-account-messages
.sm-messages-composer__row:focus-within {
    border-color: var(--sm-msg-gold);

    box-shadow:
        0 0 0 2px rgba(200, 169, 106, 0.10);
}


/*
|--------------------------------------------------------------------------
| Composer Controls - Reset PremiumPress Positioning
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-composer__row
.sm-messages-composer__icon,
body.sm-account-messages
.sm-messages-composer__row
.sm-messages-composer__icon i {
    position: static !important;

    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;

    margin: 0 !important;

    transform: none !important;
}


/*
|--------------------------------------------------------------------------
| Composer Input
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-composer__input {
    grid-column: 2;

    display: block;

    min-width: 0;
    width: 100%;

    height: 38px;

    margin: 0 !important;
    padding: 6px 7px !important;

    border: 0 !important;
    border-radius: 0 !important;

    outline: 0 !important;

    background: transparent !important;

    color: var(--sm-msg-black) !important;

    font: inherit;
    font-size: 14px;

    box-shadow: none !important;
}

body.sm-account-messages
.sm-messages-composer__input::placeholder {
    color: #aaaaaa;

    opacity: 1;
}


/*
|--------------------------------------------------------------------------
| Composer Icons
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-composer__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 50%;

    background: var(--sm-msg-gold-soft);

    color: #888888;

    font-size: 17px;
    line-height: 1;

    cursor: pointer;

    transition:
        color 0.16s ease,
        background-color 0.16s ease;
}

body.sm-account-messages
.sm-messages-composer__icon:hover,
body.sm-account-messages
.sm-messages-composer__icon:focus {
    background: var(--sm-msg-gold-soft);

    color: var(--sm-msg-gold);

    outline: none;
}

body.sm-account-messages
.sm-messages-composer__emoji {
    grid-column: 1;

    justify-self: center;
}

body.sm-account-messages
.sm-messages-composer__attachment {
    grid-column: 3;

    justify-self: center;
}


/*
|--------------------------------------------------------------------------
| Send Button
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-send {
    grid-column: 4;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    justify-self: end;

    min-width: 72px;
    min-height: 38px;

    margin: 0;
    padding: 7px 17px;

    border: 1px solid var(--sm-msg-gold);
    border-radius: 19px;

    background: var(--sm-msg-white);

    color: var(--sm-msg-black);

    font: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;

    cursor: pointer;

    box-shadow: none;

    transition:
        background-color 0.16s ease,
        color 0.16s ease;
}

body.sm-account-messages
.sm-messages-send:hover,
body.sm-account-messages
.sm-messages-send:focus {
    background: var(--sm-msg-gold);

    color: var(--sm-msg-white);

    outline: none;
}


/*
|--------------------------------------------------------------------------
| Attachment Upload
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-upload {
    margin: 0 0 10px 0;

    padding: 12px 14px;

    border: 1px solid var(--sm-msg-border);
    border-radius: var(--sm-msg-radius);

    background: var(--sm-msg-light);
}

body.sm-account-messages
.sm-messages-upload input[type="file"] {
    display: block;

    width: 100%;
}

body.sm-account-messages
.sm-messages-upload__help {
    margin-top: 6px;

    color: var(--sm-msg-muted);

    font-size: 12px;
}

/*
|--------------------------------------------------------------------------
| SweetMeet Messages - Attachment Selector
|--------------------------------------------------------------------------
*/

body.sm-account-messages .sm-messages-upload {
    position: relative;
    display: block;
    width: 100%;
    margin: 0 0 10px;
    padding: 0;
}


/*
|--------------------------------------------------------------------------
| Hide native file control visually
|--------------------------------------------------------------------------
*/

body.sm-account-messages .sm-messages-upload form {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0;
    z-index: 2;
    overflow: hidden;
    opacity: 0;
    cursor: pointer;
}

body.sm-account-messages .sm-messages-upload input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    cursor: pointer;
}


/*
|--------------------------------------------------------------------------
| Visible attachment bar
|--------------------------------------------------------------------------
*/

body.sm-account-messages .sm-messages-upload__help {
    position: relative;

    display: flex;
    align-items: center;

    width: 100%;
    min-height: 40px;

    padding: 0 92px 0 16px;

    border: 1px solid #e5e1da;
    border-radius: 4px;

    background: #fff;

    color: #666666;
    font-size: 13px;
    line-height: 1.3;

    box-sizing: border-box;
}


/*
|--------------------------------------------------------------------------
| Select button
|--------------------------------------------------------------------------
*/

body.sm-account-messages .sm-messages-upload__help::after {
    content: "Select";

    position: absolute;
    top: -1px;
    right: -1px;
    bottom: -1px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 76px;

    background: #c8a96a;
    color: #fff;

    border-radius: 0 4px 4px 0;

    font-size: 13px;
    font-weight: 600;

    pointer-events: none;
}


/*
|--------------------------------------------------------------------------
| Hover
|--------------------------------------------------------------------------
*/

body.sm-account-messages .sm-messages-upload:hover
.sm-messages-upload__help::after {
    background: #b99a5f;
}


/*
|--------------------------------------------------------------------------
| Emoji Picker
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-smiles {
    margin: 0 0 10px 0;

    padding: 10px;

    border: 1px solid var(--sm-msg-border);
    border-radius: var(--sm-msg-radius);

    background: var(--sm-msg-white);
}

body.sm-account-messages
.sm-messages-smiles__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 6px;

    border: 0;

    background: transparent;

    cursor: pointer;
}


/*
|--------------------------------------------------------------------------
| Scrollbars
|--------------------------------------------------------------------------
*/

body.sm-account-messages
.sm-messages-history,
body.sm-account-messages
.sm-messages-contact-list {
    scrollbar-width: thin;
    scrollbar-color: #cccccc transparent;
}

body.sm-account-messages
.sm-messages-history::-webkit-scrollbar,
body.sm-account-messages
.sm-messages-contact-list::-webkit-scrollbar {
    width: 6px;
}

body.sm-account-messages
.sm-messages-history::-webkit-scrollbar-thumb,
body.sm-account-messages
.sm-messages-contact-list::-webkit-scrollbar-thumb {
    border-radius: 8px;

    background: #cccccc;
}


/*|--------------------------------------------------------------------------
| Interested In You - Card Actions
|------------------------------------------------------------------------*/

.sm-interest-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}


/*
|--------------------------------------------------------------------------
| Three Dot Button
|------------------------------------------------------------------------*/

.sm-interest-actions-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 38px;

    width: 38px;
    height: 38px;

    margin: 0;
    padding: 0;

    border: 1px solid #c8a96a;
    border-radius: 4px;

    background: #fff;

    color: #111;

    font-size: 17px;
    line-height: 1;

    cursor: pointer;

    box-shadow: none;

    transition:
        background-color 0.16s ease,
        color 0.16s ease,
        border-color 0.16s ease;
}


.sm-interest-actions-toggle:hover,
.sm-interest-actions-toggle:focus {
    background: #faf7f0;

    color: #111;

    outline: none;
}


/*
|--------------------------------------------------------------------------
| Interest Actions Menu
|------------------------------------------------------------------------*/

.sm-interest-actions-menu {
    position: fixed;

    z-index: 99990;

    min-width: 170px;

    background: #fff;

    border: 1px solid #ddd;
    border-radius: 5px;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.12);

    overflow: hidden;
}


.sm-interest-actions-menu[hidden] {
    display: none !important;
}


.sm-interest-actions-menu__item {
    display: block;

    width: 100%;

    padding: 11px 14px;

    border: 0;

    background: #fff;

    color: #111;

    text-align: left;

    font-size: 14px;

    cursor: pointer;
}


.sm-interest-actions-menu__item:hover,
.sm-interest-actions-menu__item:focus {
    background: #f6f6f6;

    outline: none;
}


/*
|--------------------------------------------------------------------------
| Tablet
|--------------------------------------------------------------------------
*/

@media (max-width: 991.98px) {

    body.sm-account-messages
    .sm-messages-board {
        grid-template-columns:
            240px
            minmax(0, 1fr);
    }
}


/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 767.98px) {

    body.sm-account-messages
    .sm-messages {
        border-right: 0;
        border-left: 0;

        border-radius: 0;
    }

    body.sm-account-messages
    .sm-messages-board {
        display: block !important;

        height: auto;
        min-height: 620px;
    }

    body.sm-account-messages
    .sm-messages-contacts {
        width: 100%;
        min-height: 620px;

        border-right: 0;
    }

    body.sm-account-messages
    .sm-messages-conversation {
        width: 100%;
        min-height: 620px;
    }

    body.sm-account-messages
    .sm-messages-conversation__header {
        min-height: 54px;

        padding: 8px 12px !important;
    }

    body.sm-account-messages
    .sm-messages-history {
        min-height: 480px;

        padding: 16px !important;
    }

    body.sm-account-messages
    .sm-messages-composer {
        padding: 10px 10px 12px !important;
    }

    body.sm-account-messages
    .sm-messages-composer__row {
        grid-template-columns:
            32px
            minmax(0, 1fr)
            32px
            auto;

        min-height: 46px;
    }

    body.sm-account-messages
    .sm-messages-composer__icon {
        width: 32px;
        height: 32px;
    }

    body.sm-account-messages
    .sm-messages-send {
        min-width: 62px;

        padding-left: 13px;
        padding-right: 13px;
    }

    body.sm-account-messages
    .sm-messages-profile-button {
        min-height: 34px;

        padding: 6px 11px !important;

        font-size: 12px !important;
    }
	
    body.sm-account-messages .sm-messages-board {
        display: block !important;
        min-height: 620px;
    }

    /* Default: conversations visible */
    body.sm-account-messages .sm-messages-contacts {
        display: flex !important;
        width: 100%;
        min-height: 620px;
        border-right: 0;
    }

    body.sm-account-messages .sm-messages-conversation {
        display: none !important;
        width: 100%;
        min-height: 620px;
    }

    /* Conversation selected */
    body.sm-account-messages
    .sm-messages.sm-messages--conversation-open
    .sm-messages-contacts {
        display: none !important;
    }

    body.sm-account-messages
    .sm-messages.sm-messages--conversation-open
    .sm-messages-conversation {
        display: flex !important;
    }	
	
}


@media (max-width: 767.98px) {

    /*
    |--------------------------------------------------------------------------
    | Default Mobile State - Conversation List
    |--------------------------------------------------------------------------
    */

    body.sm-account-messages
    .sm-messages-contacts {
        display: flex !important;
        width: 100%;
        border-right: 0;
    }

    body.sm-account-messages
    .sm-messages-conversation {
        display: none !important;
        width: 100%;
    }


    /*
    |--------------------------------------------------------------------------
    | Mobile Conversation Open
    |--------------------------------------------------------------------------
    */

    body.sm-account-messages
    .sm-messages.sm-messages--conversation-open
    .sm-messages-contacts {
        display: none !important;
    }

    body.sm-account-messages
    .sm-messages.sm-messages--conversation-open
    .sm-messages-conversation {
        display: flex !important;
    }
}

/*
|--------------------------------------------------------------------------
| SweetMeet Mobile Messages - Viewport Fit Override
|--------------------------------------------------------------------------
|
| IMPORTANT:
| This block deliberately sits at the very end of the file.
|
| It does NOT restyle:
| - message bubbles
| - delete / three-dot controls
| - image previews
| - attachment selector
| - composer controls
| - profile header
|
| It only makes the existing mobile list/conversation states fit the
| available viewport and scroll internally.
|
|--------------------------------------------------------------------------
*/

@media (max-width: 767.98px) {

    /*
    |--------------------------------------------------------------------------
    | Messages Shell
    |--------------------------------------------------------------------------
    */

    body.sm-account-messages
    .sm-messages {
        display: flex !important;
        flex-direction: column;

        width: 100%;

        /*
         * Current SweetMeet mobile header allowance.
         * This is the ONE value to tune if required.
         */
        height: calc(100dvh - 88px);
        min-height: 0 !important;

        overflow: hidden;
    }


    /*
    |--------------------------------------------------------------------------
    | Messages Title Row
    |--------------------------------------------------------------------------
    */

    body.sm-account-messages
    .sm-messages-header {
        flex: 0 0 46px;

        height: 46px;
        min-height: 46px;
    }


    /*
    |--------------------------------------------------------------------------
    | Board Fills Remaining Space
    |--------------------------------------------------------------------------
    */

    body.sm-account-messages
    .sm-messages-board {
        flex: 1 1 auto;

        width: 100%;

        height: auto !important;
        min-height: 0 !important;

        overflow: hidden;
    }


    /*
    |--------------------------------------------------------------------------
    | Conversation List State
    |--------------------------------------------------------------------------
    |
    | Existing CSS still controls whether this panel is visible.
    | These rules only control its height and scrolling.
    |
    */

    body.sm-account-messages
    .sm-messages-contacts {
        height: 100%;
        min-height: 0 !important;

        overflow: hidden;
    }

    body.sm-account-messages
    .sm-messages-contact-list {
        flex: 1 1 auto;

        min-height: 0 !important;

        overflow-x: hidden;
        overflow-y: auto;

        -webkit-overflow-scrolling: touch;
    }


    /*
    |--------------------------------------------------------------------------
    | Active Conversation State
    |--------------------------------------------------------------------------
    |
    | Existing .sm-messages--conversation-open rules continue to control
    | display. We only make the visible conversation fill the board.
    |
    */

    body.sm-account-messages
    .sm-messages-conversation {
        height: 100%;
        min-height: 0 !important;

        overflow: hidden;
    }


    /*
    |--------------------------------------------------------------------------
    | Conversation Header
    |--------------------------------------------------------------------------
    */

    body.sm-account-messages
    .sm-messages-conversation__header {
        flex: 0 0 70px !important;

        height: 70px !important;
        min-height: 70px !important;
    }


    /*
    |--------------------------------------------------------------------------
    | Message History
    |--------------------------------------------------------------------------
    |
    | This is the scrolling area while a conversation is open.
    |
    */

    body.sm-account-messages
    .sm-messages-history {
        flex: 1 1 auto;

        min-height: 0 !important;

        overflow-x: hidden !important;
        overflow-y: auto !important;

        -webkit-overflow-scrolling: touch;
    }


    /*
    |--------------------------------------------------------------------------
    | Composer
    |--------------------------------------------------------------------------
    |
    | Keep the existing SweetMeet composer styling.
    | Only stop it growing/shrinking with the history.
    |
    */

    body.sm-account-messages
    .sm-messages-composer {
        flex: 0 0 auto;
    }


    /*
    |--------------------------------------------------------------------------
    | Permission / Upgrade Notice
    |--------------------------------------------------------------------------
    */

    body.sm-account-messages
    .sm-message-upgrade-notice {
        flex: 0 0 auto;
    }
}

/*
|--------------------------------------------------------------------------
| Mobile Messages - Hide SweetMeet Footer
|--------------------------------------------------------------------------
*/

@media (max-width: 767.98px) {

    body.sm-account-messages
    .elementor.elementor-100 {
        display: none !important;
    }

    body.sm-account-messages
    .container.my-sm-4 {
        width: calc(100% - 2px) !important;
        max-width: none !important;

        margin-left: 2px !important;
        margin-right: 2px !important;

        padding-left: 0 !important;
        padding-right: 0 !important;
    }	
	
}

/*
|--------------------------------------------------------------------------
| Mobile Messages - Lock Composer to Bottom of Panel
|--------------------------------------------------------------------------
*/

@media (max-width: 767.98px) {

    /*
     * Remove any PremiumPress sticky / absolute positioning.
     */
    body.sm-account-messages
    .discussion-message.sm-messages-composer {
        position: relative !important;

        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;

        flex: 0 0 auto !important;

        width: 100% !important;

        margin: 0 !important;
        padding: 10px !important;

        z-index: 5;

        background: var(--sm-msg-white) !important;

        border-top: 1px solid var(--sm-msg-border) !important;

        transform: none !important;
    }


    /*
     * History owns all remaining space.
     * Nothing from the thread should appear below the composer.
     */
    body.sm-account-messages
    .sm-messages-history {
        flex: 1 1 0 !important;

        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;

        overflow-y: auto !important;
        overflow-x: hidden !important;
    }


    /*
     * Prevent the inner PremiumPress history wrapper
     * from forcing extra height below the composer.
     */
    body.sm-account-messages
    .sm-messages-history__inner {
        min-height: 0 !important;
        height: auto !important;
    }
}


/*|--------------------------------------------------------------------------
| Conversation Unread Indicator
|------------------------------------------------------------------------*/

#ajax_chat_list .contact {
    position: relative;
}


#ajax_chat_list .contact.has-unread ._name {
    font-weight: 700;
}


.sm-conversation-unread {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 20px;
    height: 20px;

    padding: 0 6px;

    border-radius: 10px;

    background: #c8a96a;

    color: #ffffff;

    font-size: 11px;
    font-weight: 700;
    line-height: 1;

    position: absolute;

    right: 34px;
    top: 50%;

    transform: translateY(-50%);
}

/*|--------------------------------------------------------------------------
| Header Message Unread Badge
|------------------------------------------------------------------------*/

.sm-header-message-icon-wrap {
    position: relative;

    display: inline-flex;

    align-items: center;
    justify-content: center;
}


.sm-header-message-badge {
    position: absolute;

    top: -4px;
    right: -2px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 18px;
    height: 18px;

    padding: 0 5px;

    border-radius: 9px;

    background: #c8a96a;

    color: #fff;

    font-size: 10px;
    font-weight: 700;
    line-height: 1;

    box-sizing: border-box;
}

/*|--------------------------------------------------------------------------
| Header Message Badge - Mobile
|------------------------------------------------------------------------*/

@media (max-width: 768px) {

    .sm-messages-conversations .contact {
        position: relative;
    }

    .sm-conversation-unread {
        position: absolute;

        right: 48px;
        top: 50%;

        transform: translateY(-50%);

        margin: 0;

        z-index: 2;
    }
}


/*
|--------------------------------------------------------------------------
| Messages - Smiles Override
|--------------------------------------------------------------------------
*/


.ppt-smile-icon {
    display: inline-block !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
	background-size: 120% 120% !important;
}

.sm-account-messages .ppt-smile-icon.icon-cyber {
    background-size: 125% 125% !important;
}


body.sm-account-messages
.ppt-smile-icon.icon-happy {
    background-image:
        url("../account/smiles/icon-happy.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-laughing {
    background-image:
        url("../account/smiles/laughing.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-kiss {
    background-image:
        url("../account/smiles/kiss.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-love {
    background-image:
        url("../account/smiles/icon-love.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-like {
    background-image:
        url("../account/smiles/icon-like.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-humor {
    background-image:
        url("../account/smiles/icon-humor.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-angel {
    background-image:
        url("../account/smiles/angel.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-cool {
    background-image:
        url("../account/smiles/cool.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-cyber {
    background-image:
        url("../account/smiles/coffee.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-clown {
    background-image:
        url("../account/smiles/heart.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-cap {
    background-image:
        url("../account/smiles/lips.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-eyeglass {
    background-image:
        url("../account/smiles/lips.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-geek {
    background-image:
        url("../account/smiles/lips.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-money {
    background-image:
        url("../account/smiles/lips.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-mustache {
    background-image:
        url("../account/smiles/lips.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-punk {
    background-image:
        url("../account/smiles/lips.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-robot {
    background-image:
        url("../account/smiles/lips.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-security {
    background-image:
        url("../account/smiles/lips.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-confused {
    background-image:
        url("../account/smiles/lips.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-sleepi {
    background-image:
        url("../account/smiles/lips.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-crying {
    background-image:
        url("../account/smiles/lips.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-depression {
    background-image:
        url("../account/smiles/lips.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-dislike {
    background-image:
        url("../account/smiles/lips.svg") !important;
}

body.sm-account-messages
.ppt-smile-icon.icon-angry {
    background-image:
        url("../account/smiles/lips.svg") !important;
}


body.sm-account-messages
.ppt-smile-icon.icon-gay {
    background-image:
        url("../account/smiles/gay.svg") !important;
}