/* 
 * Icon AI Sidebar Modal 
 * Premium AI interaction interface
 */

.ai-sidebar-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 3000;
    transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    visibility: hidden;
}

.ai-sidebar-overlay.active {
    right: 0;
    visibility: visible;
}

.ai-sidebar-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 500px;
    height: 100%;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    max-width: 90%;
}

.ai-sidebar-header {
    padding: 25px;
    background: linear-gradient(135deg, #2E3192 0%, #1a1c54 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.ai-header-title i {
    font-size: 1.8rem;
    background: rgba(255,255,255,0.15);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.ai-header-title h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.close-ai-sidebar {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-ai-sidebar:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

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

.message {
    max-width: 85%;
    padding: 15px 20px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
}

.message.user {
    align-self: flex-end;
    background: #2E3192;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.ai {
    align-self: flex-start;
    background: #f0f2f5;
    color: #1a1a1a;
    border-bottom-left-radius: 4px;
}

.ai-status {
    font-size: 0.8rem;
    color: var(--team-text-muted);
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Chat Input */
.ai-chat-input-area {
    padding: 20px 25px;
    background: white;
    border-top: 1px solid #eee;
}

.ai-input-wrapper {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    display: flex;
    align-items: center;
    padding: 5px 15px;
    transition: all 0.3s ease;
}

.ai-input-wrapper:focus-within {
    border-color: #2E3192;
    box-shadow: 0 0 0 4px rgba(46, 49, 146, 0.05);
    background: white;
}

#aiChatMessage {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px;
    outline: none;
    font-size: 0.95rem;
    font-family: inherit;
}

.send-ai-btn {
    width: 40px;
    height: 40px;
    background: #2E3192;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.send-ai-btn:hover {
    transform: scale(1.1);
    background: #1a1c54;
}

.send-ai-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Typing Animation */
.typing-dots {
    display: flex;
    gap: 4px;
    padding: 10px;
}

.dot {
    width: 6px;
    height: 6px;
    background: #2E3192;
    border-radius: 50%;
    animation: dotPulse 1.4s infinite ease-in-out both;
}

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

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

/* Responsive */
@media (max-width: 600px) {
    .ai-sidebar-content {
        width: 100%;
        max-width: 100%;
    }
}
