.ai-chat-window {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 400px;
    max-height: 650px;
    background: linear-gradient(145deg, var(--bg-primary) 0%, var(--bg-tertiary) 50%, var(--bg-secondary) 100%);
    border: 2px solid var(--brand-secondary, #14b8a6);
    border-radius: 20px;
    box-shadow:
        0 20px 60px var(--brand-glow),
        0 0 40px rgba(20, 184, 166, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: none;
    flex-direction: column;
    z-index: 10000;
    font-family: var(--font-primary, 'Inter', sans-serif);
}

.ai-chat-window.open {
    display: flex;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(20, 184, 166, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.1) 0%, transparent 100%);
}

.ai-chat-header-btns {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ai-chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--brand-accent, #2dd4bf);
    font-weight: 600;
}

.ai-status-dot {
    width: 8px;
    height: 8px;
    background: var(--success, #00d26a);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px var(--success, #00d26a);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.ai-avatar {
    font-size: 26px;
}

.ai-chat-close,
.ai-voice-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--brand-accent, #2dd4bf);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ai-chat-close:hover,
.ai-voice-toggle:hover {
    background: rgba(20, 184, 166, 0.2);
    border-color: var(--brand-secondary, #14b8a6);
}

.ai-voice-toggle.active {
    background: var(--brand-primary, #0d9488);
    color: white;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 350px;
}

.ai-message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-message.user {
    flex-direction: row-reverse;
}

.ai-message .ai-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: rgba(20, 184, 166, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.ai-bubble {
    background: rgba(20, 184, 166, 0.08);
    padding: 14px 18px;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    color: var(--text-primary, #fff);
    max-width: 80%;
    line-height: 1.6;
    font-size: 14px;
    border: 1px solid rgba(20, 184, 166, 0.1);
}

.ai-message.user .ai-bubble {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.2) 0%, rgba(20, 184, 166, 0.1) 100%);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 4px;
    border-color: rgba(20, 184, 166, 0.3);
}

.ai-chat-suggestions {
    padding: 14px 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(20, 184, 166, 0.15);
    background: rgba(0, 0, 0, 0.2);
}

.ai-suggestion {
    background: rgba(20, 184, 166, 0.08);
    border: 1px solid rgba(20, 184, 166, 0.2);
    color: var(--brand-accent, #2dd4bf);
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    font-weight: 500;
}

.ai-suggestion:hover {
    background: rgba(20, 184, 166, 0.2);
    border-color: var(--brand-secondary, #14b8a6);
    transform: translateY(-2px);
}

.ai-chat-input-container {
    padding: 16px 20px;
    display: flex;
    gap: 10px;
    border-top: 1px solid rgba(20, 184, 166, 0.15);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0 0 18px 18px;
}

.ai-voice-input {
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.3);
    color: var(--brand-accent, #2dd4bf);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ai-voice-input:hover {
    background: rgba(20, 184, 166, 0.2);
}

.ai-voice-input.recording {
    background: var(--error, #ff4757);
    border-color: var(--error, #ff4757);
    animation: recordPulse 1s infinite;
}

@keyframes recordPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(255, 71, 87, 0);
    }
}

.ai-chat-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(20, 184, 166, 0.2);
    color: var(--text-primary, #fff);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.2s;
}

.ai-chat-input:focus {
    border-color: var(--brand-secondary, #14b8a6);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
    outline: none;
}

.ai-chat-send {
    background: linear-gradient(135deg, var(--brand-primary, #0d9488) 0%, var(--brand-secondary, #14b8a6) 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
}

.ai-chat-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}

.ai-voice-status {
    display: none;
    padding: 10px 20px;
    text-align: center;
    font-size: 12px;
    color: var(--brand-accent, #2dd4bf);
    background: rgba(20, 184, 166, 0.05);
}

.ai-voice-status.active {
    display: block;
}

.ai-chat-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--brand-primary, #0d9488) 0%, var(--brand-secondary, #14b8a6) 100%);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    box-shadow:
        0 8px 30px rgba(20, 184, 166, 0.4),
        0 0 40px rgba(20, 184, 166, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: all 0.3s;
}

.ai-chat-toggle:hover {
    transform: scale(1.08) rotate(-5deg);
    box-shadow: 0 12px 40px rgba(20, 184, 166, 0.5);
}

.ai-chat-toggle .ai-avatar {
    font-size: 28px;
}

.ai-toggle-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: var(--brand-secondary, #14b8a6);
    animation: togglePulse 2s infinite;
    z-index: -1;
}

@keyframes togglePulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .ai-chat-window {
        width: calc(100% - 20px);
        right: 10px;
        bottom: 70px;
        max-height: 80vh;
    }

    .ai-chat-toggle {
        width: 56px;
        height: 56px;
        right: 16px;
        bottom: 16px;
    }
}
