/* WC Chatbot Styles */
.wc-chatbot-container {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.wc-chatbot-container.bottom-right {
    bottom: 20px;
    right: 20px;
}

.wc-chatbot-container.bottom-left {
    bottom: 20px;
    left: 20px;
}

.wc-chatbot-container.top-right {
    top: 20px;
    right: 20px;
}

.wc-chatbot-container.top-left {
    top: 20px;
    left: 20px;
}

.wc-chatbot-button {
    padding: 0 !important;
    margin: 0 !important;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #1e73be !important;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 1000000;
}

div.wc-chatbot-suggestions{
    display: flex;
    gap: 1px;
    flex-direction: column;
}

.wc-chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.wc-chatbot-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 999999;
    border: 1px solid #e0e0e0;
}

.wc-chatbot-window.active {
    display: flex !important;
}

.wc-chatbot-header {
    background: #1e73be;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.wc-chatbot-title {
    font-weight: 600;
    font-size: 16px;
}

.wc-chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.wc-chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: calc(100% - 140px);
}

.wc-chatbot-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

.wc-chatbot-message.bot {
    background: #f1f3f4;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.wc-chatbot-message.user {
    background: #1e73be;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.wc-chatbot-input-area {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    background: #fafafa;
}

.wc-chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 24px;
    outline: none;
    font-size: 14px;
    background: white;
}

.wc-chatbot-input:focus {
    border-color: #1e73be;
}

.wc-chatbot-send {
    background: #1e73be !important;
    color: white;
    border: none;
    border-radius: 24px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.wc-chatbot-send:hover {
    background: #155a9d !important;
}

.wc-chatbot-send:disabled {
    background: #ccc !important;
    cursor: not-allowed;
}

.wc-chatbot-typing {
    display: none;
    align-self: flex-start;
    background: #f1f3f4;
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    margin-bottom: 10px;
}

.wc-chatbot-typing.active {
    display: block;
}

.wc-chatbot-typing-dots {
    display: flex;
    gap: 4px;
}

.wc-chatbot-typing-dot {
    width: 6px;
    height: 6px;
    background: #666;
    border-radius: 50%;
    animation: typing-dot 1.4s ease-in-out infinite;
}

.wc-chatbot-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.wc-chatbot-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-dot {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Shortcode version */
.wc-chatbot-inline {
    width: 100%;
    max-width: 400px;
    margin: 20px 0;
}

.wc-chatbot-inline .wc-chatbot-window {
    position: relative;
    bottom: auto;
    right: auto;
    width: 100%;
    display: flex;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wc-chatbot-input-area {
        padding: 15px 10px;
        border-top: 1px solid #e0e0e0;
        display: grid;
        grid-template-columns: 70% 30%;
        gap: 5px;
        max-width: 100%;
        width: 100%;
        flex-shrink: 1;
        background: #fafafa;
        align-items: center;
    }

    .wc-chatbot-send {
        display: flex;
        background: #1e73be !important;
        color: white;
        border: none;
        border-radius: 84px;
        padding: 12px 5px;
        cursor: pointer;
        font-size: 0.8rem;
        font-weight: 500;
        transition: background 0.3s ease;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
    }
    .wc-chatbot-window {
        width: 90vw;
        height: 70vh;
        bottom: 80px;
        transform: translateX(-90%);
        left: 5vw;
    }
    
    .wc-chatbot-container.bottom-right,
    .wc-chatbot-container.bottom-left {
        bottom: 10px;
    }
    
    .wc-chatbot-container.bottom-right {
        right: 10px;
    }
    
    .wc-chatbot-container.bottom-left {
        left: 10px;
    }
}