/* AI Assistant Styles - Premium Corporate White */

.ai-chat-window {
    position: fixed;
    bottom: 100px;
    right: 24px; /* Back to right for standard UX */
    width: 380px;
    height: 560px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 5000; /* Extremely high to prevent overlap issues */
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-chat-window.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

/* Header */
.ai-chat-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary), #0EA5E9);
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.header-ai-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.header-info .ai-name {
    font-weight: 800;
    font-size: 15px;
}

.header-info .ai-status {
    font-size: 11px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-status .status-dot {
    width: 6px;
    height: 6px;
    background: #10B981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10B981;
}

.header-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.header-actions button {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.header-actions button:hover { opacity: 1; }

/* Messages */
.ai-chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #F8FAFC;
}

.ai-welcome-card {
    text-align: center;
    padding: 24px 20px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    margin-bottom: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.welcome-emoji { font-size: 32px; margin-bottom: 12px; display: block; }
.ai-welcome-card h3 { font-size: 16px; font-weight: 800; margin: 0 0 8px 0; color: var(--text-main); }
.ai-welcome-card p { font-size: 13px; color: var(--text-secondary); margin: 0; line-height: 1.5; }

/* Suggestions Grid */
.ai-suggestions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
}

.suggestion-card {
    background: #F8FAFC;
    border: 1px solid var(--glass-border);
    padding: 14px 16px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    outline: none;
}

.suggestion-card:hover {
    border-color: var(--primary);
    background: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 75, 158, 0.08);
    transform: translateY(-2px);
}

.suggestion-card .s-text { font-size: 13px; font-weight: 600; color: var(--text-main); }
.suggestion-card i { font-size: 10px; color: var(--text-muted); }

/* Standard Messages */
.message-wrapper { display: flex; flex-direction: column; width: 100%; }
.message { max-width: 85%; padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.6; }
.message.ai { align-self: flex-start; background: white; border: 1px solid var(--glass-border); color: var(--text-main); border-bottom-left-radius: 4px; }
.message.user { align-self: flex-end; background: var(--primary); color: white; border-bottom-right-radius: 4px; }

/* Input Area */
.ai-chat-input-area {
    padding: 20px 24px 30px;
    background: white;
    border-top: 1px solid var(--glass-border);
}

.input-wrapper {
    background: #F1F5F9;
    border-radius: 12px;
    padding: 8px 8px 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.input-wrapper:focus-within {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 75, 158, 0.05);
}

.input-wrapper input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text-main);
}

.input-wrapper button {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.input-wrapper button:hover { transform: scale(1.05); filter: brightness(1.1); }

/* Typing Indicator */
.typing { display: flex; gap: 4px; padding: 12px; align-self: flex-start; }
.typing span { width: 6px; height: 6px; background: var(--primary); border-radius: 50%; animation: bounce 1.4s infinite ease-in-out both; opacity: 0.6; }
.typing span:nth-child(1) { animation-delay: -0.32s; }
.typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .ai-chat-window {
        width: calc(100% - 32px);
        height: calc(100% - 140px);
        bottom: 80px;
        right: 16px;
    }
    
    .ai-welcome-card h3 { font-size: 16px; }
    .ai-welcome-card p { font-size: 12px; }
}

/* AI Floating Action Button */
.ai-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #004b9e;
    color: white;
    border: none;
    box-shadow: 0 8px 24px rgba(0, 75, 158, 0.25);
    cursor: pointer;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-fab:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 12px 30px rgba(0, 75, 158, 0.4);
}
