@font-face {
    font-family: NotoColorEmojiLimited;
    src: url(https://portal.blockcerts.com/includes/js/im/NotoColorEmoji.ttf);
}

.maiai-chat-wrapper {
    position: relative;
    height: 300px;
}

.maiai-chat-wrapper .welcome {
    position: absolute;
    top: calc(50% - 65px);
    left: 0;
    right: 0;
}
.maiai-chat-wrapper .welcome .maiai-suggestion {
    margin-bottom: 8px;
}

.maiai-chat-wrapper .maiai-chat-messages {
    max-height: calc(100% - 1px);
    max-width: calc(100% - 10px);
    overflow-y: auto;
    background-color: #fafafa;
    font-size: 14px;
    line-height: 18px;
    text-align: left;
    padding-right: 1rem;
    margin: 0 auto;
    width: 100%;
    height: 100%;
}

/* ---------- MESSAGES ---------- */
.maiai-chat-messages .maiai-chat-message {
    position: relative;
    margin-bottom: 1rem;
    padding: 10px 100px 10px 58px;
}
.maiai-chat-messages .maiai-chat-message .avatar {
    position: absolute;
    left: 0px;
    top: 5px;
    height: 28px;
    width: 28px;
    border-radius: 50%;
    background-color: #0b0d12;              /* dark ink to match site */
    vertical-align: middle;
    border: 2px solid #C9A34F;             /* gold ring */
    margin: 0 0.75rem;
    box-shadow: 0 0 0 1px rgba(200,150,60,0.35);
}
.maiai-chat-messages .maiai-chat-message .maiai-chat-message-time {
    position: absolute;
    bottom: 8px;
    right: 0;
}
.maiai-chat-messages .maiai-chat-message.your-message {
    border-radius: 0.25rem;
    padding-right: 100px;
    color: #888;
}
.maiai-chat-messages .maiai-chat-message.your-message .you-user {
    font-weight: bold;
}
.maiai-chat-messages .maiai-chat-message.maiai-message {
    padding-right: 100px;
    border-radius: 0.25rem;
    color: #1d251d;
}

.maiai-chat-messages .maiai-chat-message.maiai-message .maiai-message-content {
    color: #1d251d;
    font-size: 14px;
    line-height: 1.5;
    white-space: normal;
}

.maiai-chat-messages .maiai-chat-message.maiai-message .maiai-response-user {
    font-weight: bold;
}

/* ----- TOGGLE BUTTON ----- */
.maia-chat-toogle-button {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    border-radius: 50%;
    padding: 5px;
    width: 42px;
    height: 42px;
    background-color: #1D251D;
    border: none;
    transition: all ease-in-out 0.3s;
    z-index: 900;
}
.maia-chat-toogle-button:hover {
    background-color: #282F28;
    cursor: pointer;
}
.maia-chat-toogle-button svg {
    width: 100%;
    pointer-events: none;
}

/* ----- POPUP MODAL ----- */
.maiai-chat-popup {
    display: none;
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    top: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}
.maiai-chat-popup .maiai-chat-content {
    position: absolute;
    bottom: 5rem;
    right: 1rem;
    width: 600px;
    height: 400px;
    padding: 1rem;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0 19px -10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transition: all ease-in-out 0.25s;
}
.maiai-chat-popup.maximized .maiai-chat-content {
    width: calc(100% - 4rem);
    height: calc(100% - 4rem);
    bottom: 1rem;
}
.maiai-chat-popup.maximized .maiai-chat-content:before {
    opacity: 0;
}
.maiai-chat-popup .maiai-chat-content:before {
    content: '';
    position: absolute;
    bottom: -14px;
    right: 10px;
    width: 0;
    height: 0;
    border-style: solid;
    border-right: 12px solid transparent;
    border-left: 12px solid transparent;
    border-top: 16px solid #ffffff;
    border-bottom: 0;
    opacity: 1;
    transition: all ease-in-out 0.25s;
}

.maiai-chat-popup .maiai-chat-content .maiai-chat-header {
    display: flex;
    justify-content: space-between;
}
.maiai-chat-popup .maiai-chat-content .maiai-chat-header img {
    width: 100px;
}

/* ----- HEADER BUTTONS ----- */

.maiai-chat-popup .maiai-chat-header > div {
    display: flex;
    align-items: center;
}
.maiai-chat-popup .maiai-chat-header .maiai-chat-maximize-button {
    background-color: #1D251D;
    color: #C9A34F;
    border: 1px solid #1D251D;
    border-radius: 50%;
    transition: all ease-in-out 0.3s;
    width: 28px;
    height: 28px;
    margin-left: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.maiai-chat-popup .maiai-chat-header .maiai-chat-maximize-button:hover {
    background-color: #C9A34F;
    color: #1D251D;
    cursor: pointer;
}

.maiai-chat-popup .maiai-chat-header .maiai-chat-close-button {
    background-color: #f55e5e;
    color: #fff;
    border: 1px solid #f55e5e;
    border-radius: 50%;
    transition: all ease-in-out 0.3s;
    width: 28px;
    height: 28px;
    margin-left: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.maiai-chat-popup .maiai-chat-header .maiai-chat-close-button:hover {
    background-color: #d42424;
    color: #fff;
    cursor: pointer;
}

/* ----- LANGUAGE ----- */
.maiai-chat-popup .maiai-chat-content .maiai-chat-header select.maiai-chat-select-language {
    font-family: 'NotoColorEmojiLimited';
    padding: 0.25rem 0.25rem;
    background-color: #fff;
    border-radius: 0.5rem;
    border: 1px solid #ccc;
}

.maiai-chat-popup .maiai-chat-content .maiai-chat-footer {
    font-size: 12px;
    line-height: 16px;
    color: #888;
    text-align: center;
}

.maiai-chat-popup .maiai-chat-content .maiai-chat-messages {
    flex-grow: 1;
    max-width: calc(100% - 0px);
    max-height: calc(100% - 0px);
    overflow-y: auto;
    background-color: #fafafa;
    border-radius: 0.5rem;
    font-size: 14px;
    line-height: 18px;
    text-align: left;
    padding-right: 1rem;
    margin: 0.5rem auto;
    width: 100%;
    box-sizing: border-box;
}
.maiai-chat-popup .maiai-chat-content form {
    position: relative;
}
.maiai-chat-popup .maiai-chat-content form textarea {
    flex-grow: 1;
    background-color: #fafafa;
    border: 1px solid #888;
    color: #576557;
    padding: 7.5px 10px;
    padding-right: 100px;
    width: 100%;
    border-radius: 6px;
    font-size: 14px;
    line-height: 16px;
    resize: none;
    box-sizing: border-box;
    overflow-y: scroll;
}

.maiai-chat-popup .maiai-chat-content form button {
    position: absolute;
    right: 20px;
    bottom: calc(50% - 14px);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #C9A34F;
    background-color: #1D251D;
    border: none;
    transition: all ease-in-out 0.3s;
    z-index: 1;
}

.maiai-chat-popup .maiai-chat-content form button > img {
    width: 100%;
    height: 100%;
}
.maiai-chat-popup .maiai-chat-content form button:hover {
    background-color: #C9A34F;
    cursor: pointer;
}
