/* IncepBio Enterprise AI Assistant - World-Class Redesign */

.ai-assistant-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #004D88;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999990;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: white;
    font-size: 24px;
}
.ai-assistant-fab:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,.12);
}

.ai-assistant-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 440px;
    height: 650px;
    max-height: 85vh;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    z-index: 999991;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-assistant-window.ai-active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Header */
.ai-header {
    background: #004D88;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,.05);
}
.ai-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ai-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}
.ai-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ai-title h3 {
    margin: 0 !important;
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
}
.ai-status {
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    display: inline-block;
}
.ai-status-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.ai-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ai-close:hover {
    color: white;
}

/* Chat Body */
.ai-chat-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ai-chat-body::-webkit-scrollbar {
    width: 6px;
}
.ai-chat-body::-webkit-scrollbar-thumb {
    background: #E2E8F0;
    border-radius: 10px;
}

/* Messages */
.ai-msg {
    max-width: 85%;
    font-size: 15px;
    line-height: 1.6;
    padding: 14px 18px;
    border-radius: 16px;
    animation: slideUpFade 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.ai-msg-bot {
    background: #ffffff;
    color: #1E293B;
    border: 1px solid #E2E8F0;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    box-shadow: 0 4px 15px rgba(0,0,0,.03);
}
.ai-msg-user {
    background: #004D88;
    color: #ffffff;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
    box-shadow: 0 4px 15px rgba(0, 77, 136, 0.15);
}

/* Typing Indicator */
.ai-typing {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    box-shadow: 0 4px 15px rgba(0,0,0,.03);
    color: #64748B;
    font-size: 14px;
    display: none;
}
.ai-typing.active {
    display: flex;
}
.ai-dot {
    width: 6px;
    height: 6px;
    background: #009C8D;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}
.ai-dot:nth-child(1) { animation-delay: -0.32s; }
.ai-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typing {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Suggestion Chips */
.ai-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.ai-chip {
    background: #ffffff;
    border: 1px solid #E2E8F0;
    color: #1E293B;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,.02);
}
.ai-chip:hover {
    background: #F8FAFC;
    border-color: #004D88;
    color: #004D88;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,.05);
}

/* Input Area */
.ai-footer {
    padding: 16px 24px 24px;
    background: #F8FAFC;
    border-top: 1px solid #E2E8F0;
}
.ai-input-wrapper {
    display: flex !important;
    background: #ffffff !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 14px !important;
    padding: 6px 6px 6px 16px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,.03) !important;
    transition: border-color 0.3s;
}
.ai-input-wrapper:focus-within {
    border-color: #004D88 !important;
}
.ai-input {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    color: #1E293B !important;
    font-size: 15px !important;
    outline: none !important;
    padding: 8px 0 !important;
    caret-color: #004D88 !important;
}
.ai-input::placeholder {
    color: #94A3B8 !important;
}
.ai-input::selection {
    background: #009C8D;
    color: white;
}
.ai-send {
    background: #009C8D;
    color: #ffffff;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.ai-send:hover {
    background: #007A6E;
    transform: scale(1.05);
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 575px) {
    .ai-assistant-window {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }
    .ai-assistant-fab {
        bottom: 20px;
        right: 20px;
    }
    .ai-footer {
        padding: 12px 16px 20px;
    }
}
