.onlineConsultant {
    position: fixed;
    right: 0;
    margin: 10px;
    bottom: 10vh;
    z-index: 80;
    font-size: 10px;
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 5px;
    max-width: 370px;
    width: 100%;
    box-sizing: border-box;
    background-color: #0C94E8;
    padding: 10px;
    box-shadow: 5px 5px 4px 0px rgba(0, 0, 0, 0.25);
}

.onlineConsultant__rollButton {
    background-color: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.onlineConsultant__header {
    color: #fff;
    display: grid;
    justify-content: center;
    justify-items: center;
    align-items: start;
    grid-template-columns: 1fr;
    grid-gap: 10px;
}

.onlineConsultant__title {
    color: #fff;
    padding: 0;
    margin: 0 20px;
    font-size: 2.4em;
    font-weight: 500;
    text-align: center;
}

.onlineConsultant__inputControl input {
    background-color: transparent;
    box-shadow: none;
    border-radius: 0;
    border: none;
    border-bottom: 2px solid #fff;
    text-align: center;
    max-width: 200px;
    color: #fff;
    font-size: 1.4em;
    margin-bottom: 10px;
    outline: none;
}

.onlineConsultant__inputControl input:focus {
    box-shadow: none;
}

.onlineConsultant__inputControl input:focus::placeholder {
    color: transparent;
}

.onlineConsultant__inputControl {
    position: relative;
}

.onlineConsultant__inputControl::after {
    position: absolute;
    top: 2px;
    right: 0;
    content: '';
    display: flex;
    width: 13px;
    height: 13px;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSIiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTMgMTcuMjVWMjFoMy43NUwxNy44MSA5Ljk0bC0zLjc1LTMuNzVMMyAxNy4yNXpNMjAuNzEgNy4wNGMuMzktLjM5LjM5LTEuMDIgMC0xLjQxbC0yLjM0LTIuMzRjLS4zOS0uMzktMS4wMi0uMzktMS40MSAwbC0xLjgzIDEuODMgMy43NSAzLjc1IDEuODMtMS44M3oiIGZpbGw9IiNmZmZmZmYiPjwvcGF0aD48L3N2Zz4=');
}

.onlineConsultant__inputControl input::placeholder {
    font-size: 1em;
    color: #fff;
}

.onlineConsultant__elementControls {
    position: absolute;
    top: 0;
    right: 0;
    padding: 7px;
    display: flex;
    gap: 5px;
    width: 1.5em;
    height: 1.5em;
}

.onlineConsultant__elementControls svg {
    fill: #fff;
    width: 100%;
    height: 100%;
}

.onlineConsultant__body {
    overflow: hidden;
    position: relative;
    border-radius: 5px;
    background-color: #fff;
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 10px;
    grid-template-rows: auto auto;
    padding: 10px;
}

.onlineConsultant__body--preload::after {
    content: '';
    position: absolute;
    display: flex;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSIiIHZpZXdCb3g9IjAgMCAzMDAgMTUwIj48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiMwQzk0RTgiIHN0cm9rZS13aWR0aD0iMTUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWRhc2hhcnJheT0iMzAwIDM4NSIgc3Ryb2tlLWRhc2hvZmZzZXQ9IjAiIGQ9Ik0yNzUgNzVjMCAzMS0yNyA1MC01MCA1MC01OCAwLTkyLTEwMC0xNTAtMTAwLTI4IDAtNTAgMjItNTAgNTBzMjMgNTAgNTAgNTBjNTggMCA5Mi0xMDAgMTUwLTEwMCAyNCAwIDUwIDE5IDUwIDUwWiI+PGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ic3Ryb2tlLWRhc2hvZmZzZXQiIGNhbGNNb2RlPSJzcGxpbmUiIGR1cj0iMiIgdmFsdWVzPSI2ODU7LTY4NSIga2V5U3BsaW5lcz0iMCAwIDEgMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiPjwvYW5pbWF0ZT48L3BhdGg+PC9zdmc+');
    background-position: center;
    background-size: 100px 100px;
    background-repeat: no-repeat;
}

.onlineConsultant__forCreateMessage {
    position: relative;
    border-radius: 7px;
    border: 1px solid rgb(239, 239, 239);
    padding: 5px;
    box-sizing: border-box;
}

.onlineConsultant__forCreateMessage textarea {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: none;
    box-shadow: none;
    resize: none;
    outline: none;
}

.onlineConsultant__forCreateMessage textarea {
    min-height: 70px;
}

.onlineConsultant--small .onlineConsultant__forCreateMessage {
    overflow: hidden;
}

.onlineConsultant__forCreateMessage .onlineConsultant__sendButton {
    cursor: pointer;
    position: absolute;
    bottom: 0;
    right: 0;
    margin: 5px;
    border: none;
    height: 35px;
    width: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background-color: rgb(0, 193, 255);
    transition: filter .2s;
}

.onlineConsultant__sendButton svg {
    fill: #fff;
}

.onlineConsultant__sendButton * {
    pointer-events: none;
}

.onlineConsultant__sendButton:hover {
    filter: brightness(.7);
}

.onlineConsultant__sendButton:disabled {
    filter: grayscale(1);
    pointer-events: none;
}

/* диалоги */
.onlineConsultant__dialog {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    grid-gap: 15px;
    height: 350px;
    overflow: auto;
    margin-right: -5px;
    padding-right: 5px;
    align-items: end;
    /* align-content: end; */
}

/* .onlineConsultant__dialog::before {
    content: "";
    grid-row: 1;
    grid-column: 1;
    height: 100;
    display: flex;
} */

.onlineConsultant__message {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 4px;
    font-size: 1.4em;
    color: #444;
    font-weight: 400;
}

.onlineConsultant__message--new {
    position: relative;
}

.onlineConsultant__message--new::before {
    content: '';
    font-size: 3em;
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 10em;
    display: flex;
    background: tomato;
}

.onlineConsultant__messageAuthor {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 5px;
}

.onlineConsultant__authorAvatar {
    border-radius: 10em;
    background-color: #8BCB7B;
    color: #fff;
    width: 25px;
    min-width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4em;
    font-weight: 600;
}

.onlineConsultant__authorName {
    line-height: 1;
    font-size: 1.2em;
    font-weight: 700;
    color: #9999;
}

.onlineConsultant__messageText {
    font-size: 1em;
    line-height: 1.1em;
}

.onlineConsultant__message--incoming .onlineConsultant__messageText {
    background-color: #EFEFEF;
    border-radius: 0 10px 10px 10px;
    padding: 10px;
}

.onlineConsultant__message--outgoing .onlineConsultant__messageText {
    background-color: #E7F1DC;
    border-radius: 10px 10px 0 10px;
    padding: 10px;
}

.onlineConsultant__separator--date {
    color: #999;
    font-size: 1.4em;
    font-weight: 400;
    text-align: center;
}

.onlineConsultant__separator--new {
    color: tomato;
    font-size: 1.1em;
    font-weight: 400;
    text-align: center;
}

.onlineConsultant__systemMessage {
    display: flex;
    gap: 10px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    border: 3px solid rgb(252, 115, 26);
    border-radius: 7px;
    padding: 10px;
    font-size: 12px;
    line-height: 14px;
    color: #444;
}

.onlineConsultant__systemMessage--passive {
    border-color: #EDEDED;
}

.onlineConsultant__telegramLink {
    font-size: 13px;
    border: 1px solid var(--ui-color-accent);
    border-radius: 5px;
    padding: 5px 20px;
    transition: .2s;
}

.onlineConsultant__telegramLink:hover {
    text-decoration: none;
    color: #fff;
    background-color: var(--ui-color-accent);
}

.onlineConsultant__messageBody {
    background-color: #EFEFEF;
    border-radius: 5px;
    overflow: hidden;
}

.onlineConsultant__messageVideo,
.onlineConsultant__messageImage {
    max-width: 250px;
    margin: 10px auto auto auto;
    border-radius: 5px;
    overflow: hidden;
}

.onlineConsultant__messageVideo video {
    width: 100%;
}

.onlineConsultant__messageSticker {
    display: flex;
    justify-content: center;
    padding: 10px;
}

.onlineConsultant__messageDocument {
    padding: 10px;
}

/* medium */
.onlineConsultant--small {
    grid-gap: 10px;
    max-width: 250px;
}

.onlineConsultant--small .onlineConsultant__elementControls {
    right: 0;
    left: auto;
}

.onlineConsultant--small .onlineConsultant__header {
    justify-content: start;
    justify-items: start;
}

.onlineConsultant--small .onlineConsultant__userControls {
    display: none;
}

.onlineConsultant--small .onlineConsultant__title {
    font-size: 1.5em;
    text-align: left;
}

.onlineConsultant--small .onlineConsultant__dialog {
    max-height: 120px;
}

.onlineConsultant--small .onlineConsultant__authorName {
    font-size: 1em;
}

.onlineConsultant--small .onlineConsultant__sendButton {
    display: none;
}

.onlineConsultant--small .onlineConsultant__forCreateMessage {
    max-height: 40px;
}

/* icon */
.onlineConsultant__templateIcon {
    position: relative;
    cursor: pointer;
    display: none;
}

.onlineConsultant__templateIcon * {
    pointer-events: none;
}

.onlineConsultant__newMessageCount {
    position: absolute;
    top: -15px;
    left: -15px;
    width: 20px;
    height: 20px;
}

.onlineConsultant__newMessageCount:empty {
    display: none;
}

.onlineConsultant--icon {
    max-width: 80px;
    display: flex;
    align-items: center;
    justify-content: start;
    border-radius: 10px 0 0 10px;
    cursor: pointer;
    right: -20px;
    transition: .2s;
}

.onlineConsultant.onlineConsultant--icon {
    padding: 0;
}

.onlineConsultant__templateIcon * {
    pointer-events: none;
}

.onlineConsultant--icon:hover {
    filter: brightness(0.8);
    right: -10px;
}

.onlineConsultant--icon .onlineConsultant__body,
.onlineConsultant--icon .onlineConsultant__header {
    display: none;
}

.onlineConsultant--icon .onlineConsultant__templateIcon {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background-color: transparent;
    width: 80px;
    height: 60px;
    padding-right: 15px;
}

.onlineConsultant--icon .onlineConsultant__templateIcon svg {
    width: 40px;
    height: 40px;
    fill: #fff;
}

.onlineConsultant__workTimePhrase {
    text-align: center;
    font-size: 13px;
    color: tomato;
}

.onlineConsultant__workTimePhrase:empty {
    display: none;
}

@media screen and (max-width: 768px) {
    .onlineConsultant__elementControls {
        width: 3em;
        height: 3em;
    }

    .onlineConsultant {
        bottom: 2vh;
    }

    .onlineConsultant__dialog {
        min-height: 100px;
        max-height: 350px;
        height: fit-content;
    }

    .onlineConsultant__title {
        margin: 0 30px;
    }
}

@media screen and (max-width: 450px) {
    .onlineConsultant__title {
        font-size: 1.9em;
    }

    .onlineConsultant {
        width: auto;
    }
}

@media screen and (max-height: 690px) {
    .onlineConsultant {
        bottom: 0;
    }
}
