.chatApp {
    position: fixed;
    bottom: 0;
    z-index: 10000;
    right: 0;

    width: 330px;
    height: 489px;

    transform: translateY(489px);
    transition: transform .3s ease-in-out;
}

.chatApp.open {
    transform: translateY(0);
}

.chat-container {
    width: 100%;
    height: 100%;
    background: var(--color-background-primary);
    border-radius: 9.17px 9.17px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background-color: var(--color-foreground-accent);
    padding: 13.75px 11px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.chat-header-left-logo {
    width: 87.27px;
    height: 15px;
}

.chat-header-left-logo img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}

.chat-header-left-t {
    font-size: var(--font-size-sm);
    line-height: 140%;
    color: var(--color-background-primary);
}

.chat-header-close {
    width: 17px;
    height: 17px;

    cursor: pointer;
}

.chat-header-close img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    background: var(--color-background-primary);
}

.date-separator {
    text-align: center;
    position: relative;
    padding: 5px 0;

    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--color-background-primary);
    box-shadow: 0 4px 4px 0 rgba(255, 255, 255, 0.5);
}

.date-separator span {
    width: 100%;
    font-size: var(--font-size-sm);
    line-height: 140%;
    color: var(--color-foreground-tertiary);
}

.cont-messages {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.cont-messages .message {
    display: flex;
    flex-direction: column;
    gap: 4px;

    max-width: 70%;
    padding: 12px;
    border-radius: 12px;
    word-wrap: break-word;

    font-size: var(--font-size-sm);
    line-height: 140%;
}

.message.user {
    align-self: flex-end;
}

.message.operator {
    align-self: flex-start;
}

.message.user {
    background-color: var(--color-foreground-accent);
    color: var(--color-background-primary);
}

.message.operator {
    background-color: var(--color-background-page);
    color: var(--font-size-sm);
}

.message-t {
    text-align: start;
}

.operator-name {
    font-size: 11px;
    line-height: 125%;
    color: var(--color-foreground-tertiary);
    text-align: start;
}

.chat-input-container {
    background-color: var(--color-background-primary);
    padding: 0 11px 11px 11px;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

/* Статус печати */
.chat-input-container-line {
    font-size: var(--font-size-sm);
    line-height: 140%;
    color: var(--color-foreground-tertiary);
    height: 20px;
    transition: opacity 0.2s;
    display: block;
}

.chat-input-cont {
    position: relative;
}

.chat-input {
    width: 100%;
    padding: 5.5px calc(36px + 5.5px) 5.5px 16px;
    height: 47px;
    background-color: var(--color-background-page);
    border-radius: 47.64px;
    outline: none;

    font-size: var(--font-size-sm);
    line-height: 140%;
    color: var(--color-foreground-primary);

    border: none;
}

.chat-input::placeholder {
    font-size: var(--font-size-sm);
    line-height: 140%;
    color: var(--color-foreground-tertiary);
}

.send-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-foreground-accent);
    cursor: pointer;

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

    position: absolute;
    right: 5.5px;
    top: 5.5px;
}

.send-button img {
    width: 18.33px;
    height: 18.33px;

    object-fit: contain;
}



@media screen and (min-width: 1400px) {
    .chatApp {
        width: 360px;
        height: 534px;

        transform: translateY(534px);
    }

    .chat-container {
        border-radius: 10px 10px 0 0;
    }

    .chat-header {
        padding: 15px 12px;
    }

    .chat-header-close {
        width: 18.21px;
        height: 18.21px;
    }

    .date-separator {
        padding: 6px 0;
    }

    .cont-messages {
        gap: 12px;
    }

    .operator-name {
        font-size: 10px;
        line-height: 125%;
    }

    .chat-input-container {
        padding: 0 12px 12px 12px;
        gap: 12px;
    }

    .chat-input {
        padding: 6px calc(40px + 6px) 6px 24px;
        height: 52px;
        border-radius: 52px;
    }

    .send-button {
        width: 40px;
        height: 40px;

        right: 6px;
        top: 6px;
    }

    .send-button img {
        width: 20px;
        height: 20px;
    }
}


@media screen and (max-width: 600px) {
    .chatApp {
        width: 100dvw;
        height: 100dvh;

        transform: translateY(100dvh);
    }

    .chat-container {
        border-radius: 0;
    }

    .chat-header {
        padding: 15px 12px;
    }

    .chat-header-close {
        width: 18.21px;
        height: 18.21px;
    }

    .date-separator {
        padding: 6px 0;
    }

    .cont-messages {
        gap: 12px;
    }

    .operator-name {
        font-size: 10px;
        line-height: 125%;
    }

    .chat-input-container {
        padding: 0 12px 12px 12px;
        gap: 12px;
    }

    .chat-input {
        padding: 6px calc(40px + 6px) 6px 24px;
        height: 52px;
        border-radius: 52px;
    }

    .send-button {
        width: 40px;
        height: 40px;

        right: 6px;
        top: 6px;
    }

    .send-button img {
        width: 20px;
        height: 20px;
    }
}