#wc-chatbot-widget {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 999999;
    font-family: Arial, Helvetica, sans-serif;
}

#wc-chatbot-toggle {
    width: 66px;
    height: 66px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: radial-gradient(circle at top left, #8d7dff 0%, #6857ff 45%, #4e43d8 100%);
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(56, 44, 140, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#wc-chatbot-box {
    width: 380px;
    max-width: calc(100vw - 28px);
    height: 580px;
    margin-bottom: 14px;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 30px 70px rgba(16, 24, 40, 0.24);
    border: 1px solid rgba(20, 20, 20, 0.06);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    animation: wcChatbotFadeUp 0.22s ease;
}

@keyframes wcChatbotFadeUp {
    from { opacity: 0; transform: translateY(8px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.wc-chatbot-hidden {
    display: none !important;
}

#wc-chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 16px;
    background: linear-gradient(135deg, #221d43, #342d63 65%, #403683 100%);
    color: #ffffff;
}

.wc-chatbot-header-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wc-chatbot-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.wc-chatbot-header-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.wc-chatbot-header-text strong {
    font-size: 16px;
    color: #ffffff;
}

.wc-chatbot-header-text span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.82);
}

#wc-chatbot-close {
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

#wc-chatbot-close:hover {
    transform: scale(1.08);
    opacity: 0.88;
}

#wc-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    background:
        radial-gradient(circle at top left, rgba(110, 96, 255, 0.08), transparent 28%),
        linear-gradient(180deg, #f7f8fc 0%, #f3f5fb 100%);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wc-chatbot-message {
    max-width: 90%;
    padding: 13px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.55;
    word-wrap: break-word;
}

.wc-chatbot-message-bot {
    align-self: flex-start;
    background: #ffffff;
    color: #1f2937;
    border: 1px solid rgba(17, 24, 39, 0.07);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}

.wc-chatbot-message-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #6a5cff, #4e43d8);
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(78, 67, 216, 0.22);
}

.wc-chatbot-message-rich {
    max-width: 95%;
}

.wc-chatbot-rich-intro {
    margin-bottom: 12px;
    font-weight: 700;
    color: #111827;
}

.wc-chatbot-products {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wc-chatbot-product-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    border: 1px solid rgba(17, 24, 39, 0.07);
    border-radius: 16px;
    padding: 13px;
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.05);
}

.wc-chatbot-product-title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 7px;
}

.wc-chatbot-product-price {
    font-size: 15px;
    font-weight: 800;
    color: #5b4bff;
    margin-bottom: 7px;
}

.wc-chatbot-product-reason {
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 11px;
}

.wc-chatbot-product-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    background: #111827;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 700;
    transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.14);
}

.wc-chatbot-suggestions {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(17, 24, 39, 0.07);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.wc-chatbot-suggestions-title {
    font-size: 12px;
    font-weight: 700;
    color: #5b6478;
    margin-bottom: 10px;
}

.wc-chatbot-suggestion-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    margin-bottom: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid rgba(91, 75, 255, 0.18);
    background: rgba(91, 75, 255, 0.06);
    color: #4338ca;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    white-space: normal;
    line-height: 1.2;
}

.wc-chatbot-suggestion-chip:hover {
    transform: translateY(-1px);
    background: rgba(91, 75, 255, 0.10);
}

.wc-chatbot-product-link:hover,
#wc-chatbot-toggle:hover,
#wc-chatbot-send:hover {
    transform: translateY(-1px);
}

.wc-chatbot-product-link:hover {
    opacity: 0.96;
}

.wc-chatbot-typing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
}

.wc-chatbot-typing span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #8b93a7;
    display: inline-block;
    animation: wcChatbotTypingBounce 1.1s infinite ease-in-out;
}

.wc-chatbot-typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.wc-chatbot-typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes wcChatbotTypingBounce {
    0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-4px); }
}

#wc-chatbot-input {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid rgba(17, 24, 39, 0.07);
    background: rgba(255, 255, 255, 0.94);
}

#wc-chatbot-text {
    flex: 1;
    border: 1px solid #d3d8e4;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#wc-chatbot-text:focus {
    border-color: #5b4bff;
    box-shadow: 0 0 0 4px rgba(91, 75, 255, 0.11);
}

#wc-chatbot-send {
    border: 0;
    border-radius: 14px;
    background: #111827;
    color: #ffffff;
    padding: 0 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

@media (max-width: 640px) {
    #wc-chatbot-widget {
        right: 10px;
        bottom: 10px;
    }

    #wc-chatbot-box {
        width: min(370px, calc(100vw - 20px));
        height: 72vh;
        margin-bottom: 10px;
        border-radius: 22px;
    }

    #wc-chatbot-toggle {
        width: 60px;
        height: 60px;
    }

    #wc-chatbot-input {
        gap: 8px;
    }

    #wc-chatbot-send {
        padding: 0 14px;
    }
}
