/* ===== DeepSeek Chat Widget ===== */

/* Кнопка чата */
.deepseek-chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #55697a, #3e4f5d);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(85, 105, 122, 0.3);
    transition: all 0.3s ease;
    z-index: 9999;
}

.deepseek-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(85, 105, 122, 0.4);
}

.deepseek-chat-button svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

/* Окно чата */
.deepseek-chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.deepseek-chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Заголовок чата */
.deepseek-chat-header {
    background: #55697a;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deepseek-chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.deepseek-chat-header .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.deepseek-chat-header .close-btn:hover {
    opacity: 1;
}

/* Область сообщений */
.deepseek-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f5f7f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Сообщения */
.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.user {
    align-self: flex-end;
    background: #55697a;
    color: white;
    border-bottom-right-radius: 5px;
}

.message.bot {
    align-self: flex-start;
    background: white;
    color: #333;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.message.system {
    align-self: center;
    background: #e9ecef;
    color: #6c757d;
    font-style: italic;
    font-size: 12px;
    max-width: 90%;
}

/* Быстрые подсказки */
.quick-suggestions {
    padding: 10px 15px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
}

.quick-suggestion {
    background: #f0f2f4;
    color: #55697a;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.quick-suggestion:hover {
    background: #55697a;
    color: white;
    border-color: #55697a;
}

/* Поле ввода */
.deepseek-chat-input {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.deepseek-chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.deepseek-chat-input input:focus {
    border-color: #55697a;
}

.deepseek-chat-input button {
    background: #55697a;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.deepseek-chat-input button:hover {
    background: #3e4f5d;
}

.deepseek-chat-input button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Анимация печатания */
.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 10px 15px;
    background: white;
    border-radius: 15px;
    align-self: flex-start;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

/* Медиа-запросы */
@media (max-width: 480px) {
    .deepseek-chat-window {
        width: calc(100% - 40px);
        height: 60vh;
        bottom: 80px;
    }
    
    .deepseek-chat-button {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
}