/* Overlay */
.chat-container {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 1000;
}

.chat-container.active {
    opacity: 1;
    visibility: visible;
}

/* 👗 Chat window */
.chat-window {
    width: 380px;
    height: 620px;
    background: #fff;
    border-radius: 22px 22px 44px 44px;
    box-shadow: 0 40px 90px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(40px) scale(0.92);
    transition: 0.35s ease;
}

.chat-container.active .chat-window {
    transform: translateY(0) scale(1);
}

/* Header */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-title {
    margin: 0;
    font-size: 16px;
}

.status-text {
    font-size: 12px;
    color: #9ca3af;
}

/* Avatar */
.avatar-gif {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.avatar-gif::before { content: "💬"; }

/* Close */
.close-btn {
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
}

/* Messages */
.chat-messages {
    flex: 1;
    padding: 20px;
    background: #fafafa;
    overflow-y: auto;
}

.message {
    margin-bottom: 12px;
    animation: bubble 0.25s ease;
}

.message-content {
    background: #f1f5f9;
    padding: 14px 16px;
    border-radius: 18px;
    max-width: 90%;
}



/* Bubble animation */
@keyframes bubble {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Quick buttons */
.quick-questions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-top: 1px solid #eee;
}

.quick-questions button {
    border: none;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
}

/* Input */
.chat-input-container {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid #eee;
}

.chat-input-container input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 999px;
    border: none;
    background: #f1f5f9;
}

.chat-input-container button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #2c2c3c;
    color: white;
    cursor: pointer;
}

/* Floating button */
.chat-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: #6366f1;
    color: white;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 18px 40px rgba(99,102,241,0.5);
    z-index: 999;
}


.link-wrapper {
    margin-top: 5px;
}

.link-btn {
    padding: 6px 12px;
    margin-right: 5px;
    background-color: #6b5dd3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.link-btn:hover {
    background-color: #5840a4;
}

/* Контейнер для кнопок (под сообщением) */
.chat-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 15px;
    margin-bottom: 10px;
    animation: fadeIn 0.3s ease;
}

/* Сами кнопки-ссылки */
.link-btn {
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #e5e7eb;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    white-space: nowrap;
}

/* Эффект при наведении */
.link-btn:hover {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Активное нажатие */
.link-btn:active {
    transform: translateY(0);
}

/* Анимация появления */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Если нужно выделить кнопку корзины или каталога (опционально) */
.link-btn[innerText*="Корзина"],
.link-btn[innerText*="Каталог"] {
    border-color: #000;
    font-weight: 600;
}
