
/* =========================================================
   AkilBeMSG — Theme Module
   Page: /akilbemsg/
   ========================================================= */

body.page-id-13887 .herald-sidebar {
    display: none !important;
}

body.page-id-13887 .col-mod-main {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

body.page-id-13887 article#post-13887 > .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.page-id-13887 article#post-13887 {
    width: 100% !important;
    max-width: 100% !important;
}

body.page-id-13887 .akilbemsg-app {
    width: 100%;
    max-width: none;
    min-height: 70vh;
    margin: 0;
    padding: 0;
}

body.page-id-13887 .akilbemsg-header {
    padding: 16px 18px;
    font-size: 20px;
    font-weight: 700;
    border-bottom: 1px solid #ddd;
}

body.page-id-13887 .akilbemsg-body {
    padding: 18px;
}

/* Hide Herald page title only on AkilBeMSG */
body.page-id-13887 article#post-13887 .col-mod-main > .entry-header {
    display: none !important;
}

/* =========================================================
   AkilBeMSG — Messenger UI
   ========================================================= */

body.page-id-13887 .akilbemsg-app {
    width: 100%;
    margin: 0;
    padding: 0;
}

body.page-id-13887 .akilbemsg-shell {
    display: flex;
    width: 100%;
    height: 72vh;
    min-height: 600px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e4e6eb;
    border-radius: 12px;
}

/* LEFT SIDEBAR */

body.page-id-13887 .akilbemsg-sidebar {
    display: flex;
    flex-direction: column;
    width: 260px;
    min-width: 260px;
    border-right: 1px solid #e4e6eb;
    background: #fff;
}

body.page-id-13887 .akilbemsg-sidebar-header {
    padding: 18px;
    font-size: 22px;
    border-bottom: 1px solid #e4e6eb;
}

body.page-id-13887 .akilbemsg-search {
    padding: 12px;
}

body.page-id-13887 .akilbemsg-search input {
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 21px;
    outline: none;
    background: #f0f2f5;
}

body.page-id-13887 .akilbemsg-conversations {
    flex: 1;
    overflow-y: auto;
}

body.page-id-13887 .akilbemsg-conversation {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    border: 0;
    text-align: left;
    cursor: pointer;
    background: transparent;
}

body.page-id-13887 .akilbemsg-conversation:hover,
body.page-id-13887 .akilbemsg-conversation.is-active {
    background: #f0f2f5;
}

body.page-id-13887 .akilbemsg-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-weight: 700;
    background: #e4e6eb;
}

body.page-id-13887 .akilbemsg-conversation-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

body.page-id-13887 .akilbemsg-conversation-info small {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* CHAT */

body.page-id-13887 .akilbemsg-chat {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    background: #fff;
}

body.page-id-13887 .akilbemsg-chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 70px;
    padding: 10px 16px;
    border-bottom: 1px solid #e4e6eb;
}

body.page-id-13887 .akilbemsg-chat-header > div:last-child {
    display: flex;
    flex-direction: column;
}

body.page-id-13887 .akilbemsg-messages {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    background: #f7f8fa;
}

body.page-id-13887 .akilbemsg-message {
    display: flex;
    margin: 7px 0;
}

body.page-id-13887 .akilbemsg-message.is-received {
    justify-content: flex-start;
}

body.page-id-13887 .akilbemsg-message.is-sent {
    justify-content: flex-end;
}

body.page-id-13887 .akilbemsg-bubble {
    max-width: 70%;
    padding: 10px 14px;
    line-height: 1.4;
    border-radius: 18px;
    word-break: break-word;
}

body.page-id-13887 .akilbemsg-message.is-received .akilbemsg-bubble {
    background: #e4e6eb;
}

body.page-id-13887 .akilbemsg-message.is-sent .akilbemsg-bubble {
    background: #168aff;
    color: #fff;
}

/* COMPOSER */

body.page-id-13887 .akilbemsg-composer {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 12px;
    margin: 0;
    border-top: 1px solid #e4e6eb;
    background: #fff;
}

body.page-id-13887 .akilbemsg-composer textarea {
    flex: 1;
    min-height: 42px;
    max-height: 120px;
    margin: 0;
    padding: 10px 14px;
    resize: none;
    outline: none;
    border: 0;
    border-radius: 21px;
    background: #f0f2f5;
}

body.page-id-13887 .akilbemsg-composer button {
    height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 21px;
    cursor: pointer;
    background: #168aff;
    color: #fff;
    font-weight: 600;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    body.page-id-13887 .herald-section.container {
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.page-id-13887 .col-mod-main {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.page-id-13887 .herald-entry-content {
        margin: 0 !important;
    }

    body.page-id-13887 .akilbemsg-shell {
        height: calc(100vh - 76px);
        min-height: 0;
        border: 0;
        border-radius: 0;
    }

    body.page-id-13887 .akilbemsg-sidebar {
        display: none;
    }

    body.page-id-13887 .akilbemsg-chat {
        width: 100%;
    }

    body.page-id-13887 .akilbemsg-chat-header {
        min-height: 62px;
        padding: 8px 12px;
    }

    body.page-id-13887 .akilbemsg-chat-header .akilbemsg-avatar {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }

    body.page-id-13887 .akilbemsg-messages {
        padding: 12px 10px;
    }

    body.page-id-13887 .akilbemsg-bubble {
        max-width: 82%;
    }

    body.page-id-13887 .akilbemsg-composer {
        padding: 8px;
    }

    body.page-id-13887 .akilbemsg-composer button {
        padding: 0 14px;
    }
}

@media (max-width: 767px) {

    body.page-id-13887 .akilbemsg-shell {
        height: calc(100dvh - 76px);
        min-height: 0;
        overflow: hidden;
    }

    body.page-id-13887 .akilbemsg-chat {
        height: 100%;
        min-height: 0;
    }

    body.page-id-13887 .akilbemsg-chat-header {
        position: sticky;
        top: 0;
        z-index: 5;
        flex-shrink: 0;
        background: #fff;
    }

    body.page-id-13887 .akilbemsg-messages {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    body.page-id-13887 .akilbemsg-composer {
        position: sticky;
        bottom: 0;
        z-index: 6;
        flex-shrink: 0;
        background: #fff;
    }

    body.page-id-13887 .akilbemsg-composer textarea {
        min-height: 42px;
        max-height: 100px;
    }
}

@media (max-width: 767px) {

    body.page-id-13887 .herald-section.container,
    body.page-id-13887 article#post-13887,
    body.page-id-13887 article#post-13887 > .row,
    body.page-id-13887 .col-mod-main,
    body.page-id-13887 .herald-entry-content,
    body.page-id-13887 .akilbemsg-app {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.page-id-13887 .akilbemsg-shell {
        width: calc(100% + 24px) !important;
        max-width: calc(100% + 24px) !important;
        margin-left: -12px !important;
        margin-right: -12px !important;
        border-left: 0;
        border-right: 0;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    body.page-id-13887 .akilbemsg-chat {
        width: 100%;
        max-width: 100%;
    }
}

    body.page-id-13887 .akilbemsg-chat,
    body.page-id-13887 .akilbemsg-messages,
    body.page-id-13887 .akilbemsg-composer {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    body.page-id-13887 .akilbemsg-message {
        max-width: 88%;
        overflow-wrap: anywhere;
    }

    body.page-id-13887 .akilbemsg-bubble {
        max-width: 88%;
    }

    body.page-id-13887 .akilbemsg-composer {
        padding-left: 8px;
        padding-right: 8px;
    }

    body.page-id-13887 .akilbemsg-composer textarea {
        min-width: 0;
        flex: 1 1 auto;
    }

    body.page-id-13887 .akilbemsg-composer button {
        flex: 0 0 auto;
        padding-left: 18px;
        padding-right: 18px;
    }
