/* ==========================================================================
   PipStore - Floating WhatsApp & Crowned Lion Gemini AI Assistant
   Location: /css-modules/16-floating-assistant.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. FLOATING ACTION BUTTONS (DESKTOP)
   -------------------------------------------------------------------------- */
.pipstore-floating-actions-left {
    position: fixed !important;
    bottom: 28px !important;
    left: 28px !important;
    z-index: 99990 !important;
}

.pipstore-floating-actions-right {
    position: fixed !important;
    bottom: 28px !important;
    right: 28px !important;
    z-index: 99990 !important;
}

.pipstore-float-btn {
    width: 58px !important;
    height: 58px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35) !important;
    cursor: pointer !important;
    position: relative !important;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    outline: none !important;
    user-select: none !important;
}

.pipstore-float-btn:hover {
    transform: translateY(-4px) scale(1.08) !important;
}

/* WhatsApp Left Button */
.pipstore-float-whatsapp {
    background: #25D366 !important;
    color: #ffffff !important;
}

.pipstore-float-whatsapp:hover {
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.45) !important;
}

/* Crowned Lion AI Right Button */
.pipstore-float-ai {
    background: radial-gradient(circle, #222938 0%, #0f1115 100%) !important;
    border: 2px solid var(--color-gold, #ecc53a) !important;
    animation: pipstore-gold-pulse 2.5s infinite ease-in-out !important;
}

.pipstore-float-ai:hover {
    box-shadow: 0 12px 30px rgba(236, 197, 58, 0.45) !important;
}

@keyframes pipstore-gold-pulse {
    0% { box-shadow: 0 0 0 0 rgba(236, 197, 58, 0.55); }
    70% { box-shadow: 0 0 0 14px rgba(236, 197, 58, 0); }
    100% { box-shadow: 0 0 0 0 rgba(236, 197, 58, 0); }
}

.pipstore-floating-lion-logo {
    width: 36px !important;
    height: 36px !important;
    object-fit: contain !important;
    display: block !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)) !important;
    pointer-events: none !important;
}

.pipstore-ai-badge {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    background: var(--color-gold, #ecc53a) !important;
    color: #0f1115 !important;
    font-size: 9.5px !important;
    font-weight: 900 !important;
    padding: 2px 5px !important;
    border-radius: 6px !important;
    line-height: 1 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important;
    z-index: 5 !important;
}

/* Floating Hover Tooltip */
.pipstore-float-tooltip {
    position: absolute !important;
    bottom: 50% !important;
    transform: translateY(50%) !important;
    background: #0f1115 !important;
    color: #ffffff !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease, transform 0.2s ease !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.pipstore-float-whatsapp .pipstore-float-tooltip {
    left: calc(100% + 12px) !important;
}

.pipstore-float-ai .pipstore-float-tooltip {
    right: calc(100% + 12px) !important;
}

.pipstore-float-btn:hover .pipstore-float-tooltip {
    opacity: 1 !important;
}

/* --------------------------------------------------------------------------
   2. GLASSMORHPIC AI CHAT DRAWER WINDOW
   -------------------------------------------------------------------------- */
.pipstore-ai-chat-card {
    position: fixed !important;
    bottom: 96px !important;
    right: 28px !important;
    width: 380px !important;
    max-width: calc(100vw - 40px) !important;
    height: 520px !important;
    max-height: calc(100vh - 140px) !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-top: 4px solid var(--color-gold, #ecc53a) !important;
    border-radius: 16px !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25) !important;
    display: flex !important;
    flex-direction: column !important;
    z-index: 99995 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(20px) scale(0.95) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.pipstore-ai-chat-card.is-open {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}

/* Header */
.pipstore-ai-chat-header {
    background: #0f1115 !important;
    color: #ffffff !important;
    padding: 14px 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-bottom: 1px solid #1e293b !important;
}

.ai-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.ai-avatar-circle {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: #1e293b !important;
    border: 1px solid var(--color-gold, #ecc53a) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

.pipstore-chat-header-logo {
    width: 22px !important;
    height: 22px !important;
    object-fit: contain !important;
}

.ai-title {
    font-size: 14px !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    margin: 0 !important;
    letter-spacing: 0.5px !important;
}

.ai-status {
    font-size: 10.5px !important;
    color: #94a3b8 !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.status-indicator {
    width: 7px !important;
    height: 7px !important;
    border-radius: 50% !important;
    background: #22c55e !important;
    display: inline-block !important;
}

.ai-header-controls {
    display: flex !important;
    gap: 6px !important;
}

.ai-ctrl-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: none !important;
    color: #ffffff !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
}

.ai-ctrl-btn:hover {
    background: var(--color-gold, #ecc53a) !important;
    color: #0f1115 !important;
}

/* Chat Message Body */
.pipstore-ai-chat-body {
    flex: 1 !important;
    padding: 16px !important;
    overflow-y: auto !important;
    background: #f8fafc !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

.pipstore-ai-msg {
    display: flex !important;
    width: 100% !important;
}

.pipstore-ai-msg.bot {
    justify-content: flex-start !important;
}

.pipstore-ai-msg.user {
    justify-content: flex-end !important;
}

.msg-bubble {
    max-width: 85% !important;
    padding: 10px 14px !important;
    border-radius: 12px !important;
    word-break: break-word !important;
}

.pipstore-ai-msg.bot .msg-bubble {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
    border-bottom-left-radius: 2px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03) !important;
}

.pipstore-ai-msg.user .msg-bubble {
    background: #0f1115 !important;
    color: var(--color-gold, #ecc53a) !important;
    border-bottom-right-radius: 2px !important;
}

/* Quick Suggestion Chips */
.pipstore-ai-quick-chips {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-top: 5px !important;
}

.ai-chip {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    padding: 6px 10px !important;
    border-radius: 14px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.ai-chip:hover {
    background: #0f1115 !important;
    color: var(--color-gold, #ecc53a) !important;
    border-color: #0f1115 !important;
}

/* Footer Input Area */
.pipstore-ai-chat-footer {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 14px !important;
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
}

.pipstore-ai-chat-footer input {
    flex: 1 !important;
    height: 38px !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    outline: none !important;
    background: #f8fafc !important;
}

.pipstore-ai-chat-footer input:focus {
    border-color: var(--color-gold, #ecc53a) !important;
    background: #ffffff !important;
}

.pipstore-ai-chat-footer button {
    width: 38px !important;
    height: 38px !important;
    background: #0f1115 !important;
    color: var(--color-gold, #ecc53a) !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.2s ease !important;
}

.pipstore-ai-chat-footer button:hover {
    transform: scale(1.05) !important;
}

/* Typing Pulse Animation */
.ai-typing-indicator {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 8px 12px !important;
}

.ai-typing-dot {
    width: 6px !important;
    height: 6px !important;
    background: #ecc53a !important;
    border-radius: 50% !important;
    animation: typing-wave 1.2s infinite ease-in-out !important;
}

.ai-typing-dot:nth-child(2) { animation-delay: 0.2s !important; }
.ai-typing-dot:nth-child(3) { animation-delay: 0.4s !important; }

@keyframes typing-wave {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

@media (max-width: 991px) {
    .pipstore-floating-actions-left,
    .pipstore-floating-actions-right,
    .pipstore-ai-chat-card {
        display: none !important;
    }
}