
#chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: Arial, sans-serif;
}

#chat-bubble {
    width: 60px;
    height: 60px;
    background-color: #f17324;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

#chat-bubble:hover {
    transform: scale(1.05);
}

#chat-bubble.hidden {
    display: none;
}

#chat-window {
    width: 350px;
    height: 500px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#chat-window.hidden {
    display: none;
}

#chat-header {
    background-color: #f17324;
    color: white;
    padding: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#close-chat {
    cursor: pointer;
    font-size: 20px;
}

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

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
}

.message.user {
    background-color: #ea9347;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.message.model {
    background-color: #e9ecef;
    color: black;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.typing-indicator {
    font-style: italic;
    color: #6c757d;
    font-size: 12px;
    align-self: flex-start;
    animation: pulse 2.2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 0.10; }
    50%      { opacity: 1.00; }
}

/* Зона ввода */
#chat-input-area {
    display: flex;
    padding: 10px;
    border-top: 1px solid #dee2e6;
    background: white;
}

#chat-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 20px;
    outline: none;
}

#chat-send {
    background-color: #f17324;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0 15px;
    margin-left: 10px;
    cursor: pointer;
}

#chat-send:disabled, #chat-input:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}
