/* LIYU Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 0;
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.chatbot-button i {
    color: white;
    font-size: 24px;
}

.chatbot-button .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #000000;
    font-weight: 700;
}

.chatbot-button.has-notification .notification-badge {
    display: flex;
}

.chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 0;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 1);
    border: 2px solid #000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 10001;
    animation: slideUp 0.3s ease;
}

.chatbot-window.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-header {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.chatbot-header .status {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 4px;
}

.chatbot-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;
    border-radius: 0;
    transition: background 0.2s;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fafafa;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.message {
    margin-bottom: 16px;
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    justify-content: flex-end;
}

.message.bot {
    justify-content: flex-start;
}

.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 0;
    font-size: 14px;
    line-height: 1.5;
}

.message.user .message-content {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.bot .message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    padding: 0 4px;
}

.chatbot-input-area {
    padding: 16px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 8px;
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #000;
    border-radius: 0;
    font-size: 14px;
    font-family: 'Source Sans 3', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input:focus {
    border-color: #000000;
}

.chatbot-send {
    width: 44px;
    height: 44px;
    border-radius: 0;
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chatbot-send:hover {
    transform: scale(1.05);
}

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.typing-indicator {
    display: none;
    padding: 12px 16px;
    background: white;
    border-radius: 0;
    border-bottom-left-radius: 4px;
    max-width: 75px;
}

.typing-indicator.active {
    display: block;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 0;
    background: #999;
    display: inline-block;
    margin: 0 2px;
    animation: typing 1.4s infinite;
}

.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);
    }

    30% {
        transform: translateY(-10px);
    }
}

/* Quick reply buttons */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.quick-reply-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid #000;
    border-radius: 0;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
}

.quick-reply-btn:hover {
    background: #f5f5f5;
    border-color: #000000;
    color: #000000;
}

/* Chatbot Product Cards */
.chatbot-products {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 12px 0;
    animation: fadeIn 0.3s ease;
}

.chatbot-product-card {
    display: flex;
    background: white;
    border: 1px solid #e0e0e0;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chatbot-product-card:hover {
    border-color: #000;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 1);
}

.chatbot-product-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.chatbot-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chatbot-product-info {
    flex: 1;
    padding-left: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chatbot-product-info h4 {
    margin: 0 0 4px 0;
    font-size: 13px;
    font-weight: 600;
    color: #000;
    line-height: 1.3;
}

.chatbot-product-price {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 700;
    color: #000;
}

.chatbot-product-btn {
    display: inline-block;
    padding: 4px 10px;
    background: #000;
    color: white;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
    width: fit-content;
}

.chatbot-product-btn:hover {
    background: #333;
}

/* AI Badge in header */
.chatbot-header .status i {
    margin-right: 4px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 80px);
        bottom: 10px;
        right: 10px;
        left: 10px;
    }

    .chatbot-button {
        bottom: 10px;
        right: 10px;
    }

    .chatbot-product-card {
        padding: 8px;
    }

    .chatbot-product-image {
        width: 50px;
        height: 50px;
    }

    .chatbot-product-info h4 {
        font-size: 12px;
    }
}