/* =============================================
   AI ASSISTANT STYLES
   Matches IT Electrician's Cyber-Technical Theme
   ============================================= */

/* Trigger Button */
.ai-chat-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--dark);
    border: 2px solid var(--cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: var(--glow-cyan);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-chat-trigger:hover {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--amber);
    box-shadow: var(--glow-amber);
}

.ai-chat-trigger svg {
    width: 30px;
    height: 30px;
    fill: var(--cyan);
    transition: fill 0.3s ease;
}

.ai-chat-trigger:hover svg {
    fill: var(--amber);
}

/* Chat Window */
.ai-chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 500px;
    background: rgba(10, 18, 32, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

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

/* Header */
.ai-chat-header {
    background: linear-gradient(135deg, var(--dark2), var(--black));
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.ai-header-dot {
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff00;
    animation: pulse 2s infinite;
}

.ai-header-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--white);
    font-size: 1rem;
    letter-spacing: 1px;
}

.ai-close-btn {
    color: var(--grey);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.ai-close-btn:hover {
    color: var(--amber);
}

/* Messages Area */
.ai-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--cyan) transparent;
}

.ai-chat-messages::-webkit-scrollbar {
    width: 4px;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
    background: var(--cyan);
    border-radius: 2px;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    animation: fadeInUp 0.4s ease forwards;
}

.message.ai {
    background: rgba(0, 191, 255, 0.08);
    border: 1px solid rgba(0, 191, 255, 0.2);
    color: var(--white);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.message.user {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--white);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: rgba(0, 191, 255, 0.05);
    border-radius: 12px;
    align-self: flex-start;
    display: none;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--cyan);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

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

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* Input Area */
.ai-chat-input-area {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}

.ai-chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.ai-chat-input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.1);
}

.ai-send-btn {
    background: var(--cyan);
    color: var(--black);
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-send-btn:hover {
    background: var(--amber);
    transform: translateY(-2px);
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .ai-chat-window {
        width: calc(100% - 40px);
        right: 20px;
        bottom: 90px;
        height: 60vh;
    }
    .ai-chat-trigger {
        right: 20px;
        bottom: 20px;
        width: 50px;
        height: 50px;
    }
}
