﻿
#chatbubble {
    margin: 10px;
    background-image: url("/Assets/1-2-live-chat-picture.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 1000000;
    height: 120px;
    width: 180px;
    cursor: pointer;
}

#botDiv {
    position: fixed;
    right: 8px;
    bottom: 40px;
    margin: 0;
    width: var(--bpo-sidebarWidth);
    height: min(90dvh, var(--bpo-sidebarHeight));
    max-height: min(90dvh, var(--bpo-sidebarHeight));
    z-index: 1000;
}

#botTitleBar {
    direction: inherit;
    height: 40px;
    min-height: 40px;
    background-color: var(--red);
    color: var(--white);
    border: 1px solid var(--red);
    border-bottom: 0.5px solid var(--red);
}

#botTitleBarText {
    margin: 0;
    align-self: center;
    flex-grow: 1;
    text-align: left;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: inherit;
    font-weight: normal;
    letter-spacing: 0.025em;
}

.sidebarHeader {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    position: relative;
    padding: 0 14px;
    height: 100%;
}

#chatbot {
    position: relative;
    overflow: hidden;
    flex-grow: 1;
    height: 100%;
    width: 100%;
    z-index: 0;
    background-color: var(--bpo-esColorBackgroundInverse);
    transform: translate3d(0, 0, 0);
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-darker);
    border-top: 0;
}

#chatCloseButton {
    cursor: pointer;
    padding-top: 4px;
    background: none;
    border: none;
    height: 32px;
    min-height: 32px;
    width: 32px;
    min-width: 32px;
}

.ac-pushButton > div {
    white-space: normal !important;
    font-size: 18px;
}

/* smaller chat bubble */
@media (min-width: 150px) and (max-width: 867px) {
    #chatbubble {
        background-image: url("/Assets/10-2-live-chat-png-file_600x600.png");
        height: 80px;
        width: 80px;
        bottom: 0;
        right: 0;
        margin: auto;
    }
}

/* mobile layout */
@media (min-width: 290px) and (max-width: 495px) {
    /* keep page scroll enabled by default */
    html,
    body {
        overflow-y: auto;
        height: auto;
    }

        /* only lock background scroll when chat is actually open */
        body.show-chat {
            overflow: hidden;
            -ms-overflow-style: none;
            scrollbar-width: none;
            touch-action: none;
        }

            body.show-chat::-webkit-scrollbar {
                display: none;
            }

    #botDiv {
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
    }

    #chatbot {
        height: calc(100dvh - 40px);
        max-height: calc(100dvh - 40px);
    }

    .webchat__basic-transcript__scrollable {
        max-height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}
