/* Стили для чата */
.btn-chat-bot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 44px;
    border: none;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 10px;
    color: #fff;
    background-color: #028185;
    gap: 8px;
    outline: none !important;
}

.btn-chat-bot.active {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
}

.btn-chat-bot:focus {
    box-shadow: none;
}

.chat-bot-icon {
  width: 20px;
  height: 20px;
  font-size: 10px;
  display: inline-block;
  background-position: 50%;
  background-repeat: no-repeat;
  background-image: url("../img/icon/chat-bot-icon.svg");
}

.chat-widget {
    display: flex;
    flex-direction: column;
    position: absolute;
    bottom: 0px;
    right: 52px;
    width: 350px;
    height: 520px;
    background: white;
    border: 1px solid #53BABD;
    border-top: none;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

.chat-header {
    color: white;
    padding: 15px 20px;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(135deg, #007F83, #53BABD);
}

.chat-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 18px;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #F6FCFD;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 10px;
    word-wrap: break-word;
    animation: messageAppear 0.3s ease;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-sent {
    align-self: flex-end;
    color: white;
    background-color: #028185;
    border-bottom-right-radius: 5px;
}

.message-received {
    align-self: flex-start;
    color: #141414;
    background-color: white;
    border-bottom-left-radius: 5px;
}

.message-received-wrapper {
    display: flex;
    align-items: end;
    gap: 10px;
}

.icon-message-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border-radius: 100%;
    width: 40px;
    height: 40px;
}

.icon-message-received {
    position: relative;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    width: 30px;
    height: 30px;
    background-image: url("../img/favicon.svg");
}

.message-time {
    font-size: 11px;
    margin-top: 5px;
    text-align: right;
}

.message-sent .message-time {
    color: white;
}

.message-received .message-time {
    color: #AEAEAE;
}

.chat-input-container {
    border-top: 1px solid #DADADA;
    border-radius: 0px 0px 10px 10px;
    background: white;
}

.message-input {
    width: 100%;
    padding: 15px;
    border-radius: 0px 0px 10px 10px;
    border: none;
    outline: none;
    font-size: 14px;
}

.message-input:focus {
    border-color: #0084ff;
}

/* Адаптивность */
@media (max-width: 768px) {
    .chat-widget {
        width: 300px;
        height: 450px;
    }
}

/* Стандартная анимация точек */
.typing-indicator {
    display: flex;
    align-items: end;
    gap: 6px;
}

.typing-dots {
    display: flex;
    padding-bottom: 5px;
    gap: 4px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #666;
    display: inline-block;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { 
        transform: scale(0);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}