﻿#chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-toggle {
    height: 56px;
    border-radius: 28px;
    background-color: #34b233;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
    animation: pulse 2s infinite;
}

    .chat-toggle:hover {
        background-color: #2a8f29;
        transform: scale(1.05);
        animation: none;
    }

.chat-toggle-label {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(52, 178, 51, 0.6);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 4px 24px rgba(52, 178, 51, 0.7), 0 0 0 12px rgba(52, 178, 51, 0);
        transform: scale(1.07);
    }

    100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(52, 178, 51, 0);
        transform: scale(1);
    }
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background-color: #34b233;
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .chat-header h3 {
        margin: 0;
        font-size: 18px;
    }

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background-color: #f8f9fa;
}

.message {
    margin-bottom: 12px;
    display: flex;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    word-wrap: break-word;
}

.message.user .message-content {
    background-color: #34b233;
    color: white;
}

.message.assistant .message-content {
    background-color: white;
    color: #333;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message.system .message-content {
    background-color: #f0f0f0;
    color: #666;
    font-style: italic;
    max-width: 100%;
    text-align: center;
}

.chat-input-container {
    display: flex;
    padding: 12px;
    background-color: white;
    border-top: 1px solid #e0e0e0;
}

.chat-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

    .chat-input:focus {
        border-color: #34b233;
    }

.chat-send {
    margin-left: 8px;
    padding: 10px 20px;
    background-color: #34b233;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

    .chat-send:hover {
        background-color: #2a8f29;
    }

    .chat-send:disabled {
        background-color: #ccc;
        cursor: not-allowed;
    }

.typing-indicator {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 75px;
}

    .typing-indicator span {
        height: 8px;
        width: 8px;
        background-color: #999;
        border-radius: 50%;
        display: inline-block;
        margin: 0 2px;
        animation: bounce 1.4s infinite ease-in-out both;
    }

        .typing-indicator span:nth-child(1) {
            animation-delay: -0.32s;
        }

        .typing-indicator span:nth-child(2) {
            animation-delay: -0.16s;
        }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .chat-input {
        font-size: 16px;
    }

    .chat-window {
        width: calc(100vw - 40px);
        /*height: calc(100vh - 100px);
        right: 20px;*/
        bottom: 80px;
    }
}
