/* assets/css/ai-assistant.css - Chatbot Assistant Styling */

:root {
    --ai-primary: #A38068;
    --ai-dark: #000000;
    --ai-bg: #ffffff;
    --ai-bubble-user: #A38068;
    --ai-bubble-bot: #F1F1F1;
    --ai-text-dark: #000000;
    --ai-text-light: #777777;
    --ai-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Floating Launcher */
.ai-chatbot-launcher {
    position: fixed !important;
    bottom: 30px !important;
    left: 25px !important;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--ai-primary);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(163, 128, 104, 0.3);
    font-size: 24px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
    z-index: 99999 !important;
    animation: aiPulse 3s infinite;
}

.ai-chatbot-launcher:hover {
    transform: scale(1.1);
    box-shadow: 0 14px 35px rgba(163, 128, 104, 0.4);
}

.ai-chatbot-launcher i {
    transition: transform 0.3s;
}

.ai-chatbot-launcher.active i {
    transform: rotate(90deg);
}

/* Chat Widget Window */
.ai-chatbot-window {
    position: fixed !important;
    bottom: 105px !important;
    left: 25px !important;
    width: 380px;
    height: 520px;
    background: var(--ai-bg);
    border-radius: 20px;
    box-shadow: var(--ai-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99999 !important;
    border: 1px solid rgba(226, 232, 240, 0.8);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.3s cubic-bezier(0.165, 0.84, 0.44, 1),
                transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1),
                visibility 0.3s;
}

.ai-chatbot-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
.ai-chat-header {
    background: var(--ai-dark);
    color: white;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.ai-chat-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--ai-primary);
    border: 1px solid rgba(163, 128, 104, 0.3);
    position: relative;
}

.ai-chat-avatar::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: var(--ai-primary);
    border: 2px solid var(--ai-dark);
    border-radius: 50%;
}

.ai-chat-title h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.ai-chat-title p {
    margin: 2px 0 0 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.ai-chat-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.ai-chat-close:hover {
    color: white;
}

/* Message Area */
.ai-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f8fafc;
}

.ai-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.ai-message.bot {
    align-self: flex-start;
    background: var(--ai-bubble-bot);
    color: var(--ai-text-dark);
    border-bottom-left-radius: 4px;
    border: 1px solid #e2e8f0;
}

.ai-message.user {
    align-self: flex-end;
    background: var(--ai-bubble-user);
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-message.bot a {
    color: var(--ai-primary);
    font-weight: 700;
    text-decoration: underline;
}

.ai-message.bot ul {
    margin: 5px 0 0 0;
    padding-left: 20px;
}

.ai-message.bot li {
    margin-bottom: 4px;
}

/* Suggested chips */
.ai-chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 20px;
    background: #f8fafc;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
}

.ai-chip {
    background: white;
    border: 1px solid var(--ai-primary);
    color: var(--ai-primary);
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-chip:hover {
    background: var(--ai-primary);
    color: white;
}

/* Footer Input */
.ai-chat-input-area {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.ai-chat-input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 24px;
    padding: 10px 18px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.ai-chat-input:focus {
    border-color: var(--ai-primary);
}

.ai-chat-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ai-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.2s;
}

.ai-chat-send:hover {
    background: #059669;
}

/* Buy Button in AI output */
.ai-buy-now-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: #000000;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    margin-top: 8px;
    text-align: center;
    text-transform: uppercase;
    transition: opacity 0.2s;
}

.ai-buy-now-btn:hover {
    opacity: 0.9;
}

/* Ask AI button on product page */
.product-ask-ai-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--ai-primary);
    color: white;
    border: none;
    padding: 14px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(163, 128, 104, 0.2);
    text-transform: uppercase;
    width: 100%;
}

.product-ask-ai-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(163, 128, 104, 0.3);
}

/* Pulse Animation */
@keyframes aiPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(163, 128, 104, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(163, 128, 104, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(163, 128, 104, 0);
    }
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .ai-chatbot-window {
        bottom: 85px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto;
        height: 70%;
    }
    .ai-chatbot-launcher {
        bottom: 15px !important;
        left: 15px !important;
    }
}
