﻿
.chat1-container {
    display: flex;
    flex-direction: column;
    height: 100%;

}

.chat1-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e5e6;
}

    .chat1-header h3 {
        margin: 0 0 0 8px;
        font-size: 1.2rem;
    }

.header1-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.icon1-button {
    padding: 6px;
    min-width: unset;
}

.messages1-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    /*background: #28363C;*/ /* цвет контейнера сообщений */
}

.message1-bubble {
    display: flex; /* длина окна сообщений */
    margin-bottom: 20px;
    max-width: 90%;
}

    .message1-bubble.user {
        justify-content: flex-start; /* положении диалога пользователя*/
    }

.message1-avatar {
    margin-right: 12px;
}

.ai1-avatar {
    color: var(--rz-primary);
    font-size: 1.5rem;
}

.ai1-icon {
    color: var(--rz-primary);
}

.message1-content-wrapper {
    max-width: calc(100% - 50px);
}

.message1-content {
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message1-bubble.ai .message1-content {
    background: var(--rz-primary);
    color: white;
    border-top-left-radius: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.message1-bubble.user .message1-content {
    background: var(--rz-secondary);
    color: white;
    border-top-right-radius: 0; /* скругление диалога пользователя*/
}

.message1-footer {
    display: flex;
    align-items: center;
    margin-top: 4px;
    font-size: 0.8rem;
    color: #6e6e80;/* цвет времени вопросов и ответов*/
}

.message1-bubble.user .message1-footer {
    justify-content: flex-end;
}

.message1-actions {
    display: flex;
    gap: 6px; /* отступ между кнопками */
    margin-left: 8px; /* отступ слева от контейнера */
    opacity: 0;
    transition: opacity 0.2s;
}

.message1-bubble:hover .message1-actions {
    opacity: 1;
}

.action1-button {
    padding: 2px;
    min-width: unset;
    color: inherit;
}

.input1-area {
    display: flex;
    gap: 8px; /* Добавляет отступ между элементами */
    padding: 12px;
    border-top: 1px solid #e5e5e6;
    align-items: center; /* Выравнивает элементы по центру по вертикали */
}

.chat1-input {
    flex: 1;
    border-radius: 18px;
    padding: 10px 16px;
    border: 1px solid #e5e5e6;
    resize: none;
}

    .chat1-input:focus {
        outline: none;
        border-color: #10a37f;
        box-shadow: 0 0 0 2px rgba(16,163,127,0.1);
    }

.send1-button {
    margin-left: 0; /* Убираем margin-left, так как теперь используем gap */
    border-radius: 50%;
    width: 44px;
    height: 44px;
    min-width: unset;
}

.chat1-footer {
    padding: 8px;
    text-align: center;
    color: #6e6e80;
    font-size: 0.8rem;
    border-top: 1px solid #e5e5e6;
}

/* Loading indicator */
.typing1-indicator {
    display: flex;
    padding: 12px 16px;
}

    .typing1-indicator span {
        height: 8px;
        width: 8px;
        background: #ccc;
        border-radius: 50%;
        margin: 0 2px;
        opacity: 0.4;
        animation: typingAnimation 1s infinite ease-in-out;
    }

        .typing1-indicator span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing1-indicator span:nth-child(3) {
            animation-delay: 0.4s;
        }

@keyframes typingAnimation {
    0%, 100% {
        opacity: 0.4;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-5px);
    }
}
