/* ============ AI ASSISTANT PAGE STYLES ============ */

.ai-header {
    margin-bottom: 2rem;
    animation: popIn 0.3s ease;
}

.ai-header .page-title {
    font-size: 2rem;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}

.ai-header .page-subtitle {
    font-size: 1rem;
    color: var(--color-text-placeholder);
}

/* Premium Gate */
.premium-gate {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

.gate-card {
    background: linear-gradient(135deg, var(--color-bg-secondary), rgba(105, 92, 254, 0.08));
    border: 2px solid var(--color-hover-primary);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    max-width: 500px;
    animation: popIn 0.3s ease;
}

.gate-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1.5rem;
}

.gate-card h2 {
    color: var(--color-text-primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.gate-card > p:first-of-type {
    color: var(--color-text-placeholder);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.gate-features {
    background: var(--color-bg-primary);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.gate-feature {
    color: var(--color-text-primary);
    padding: 0.75rem 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gate-feature::before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
    font-size: 1.2rem;
}

.btn-unlock {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-hover-primary), #7d6ff7);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(105, 92, 254, 0.3);
    margin-bottom: 1rem;
}

.btn-unlock:hover {
    background: linear-gradient(135deg, #5a50e8, #6d5fe5);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(105, 92, 254, 0.4);
}

.gate-note {
    color: var(--color-text-placeholder);
    font-size: 0.85rem;
}

/* AI Assistant Container */
.ai-assistant-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 250px);
    background: var(--color-bg-secondary);
    border-radius: 1rem;
    border: 1px solid var(--color-border-hr);
    overflow: hidden;
}

/* Quick Prompts */
.quick-prompts-section {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--color-border-hr);
}

.quick-prompts-section h3 {
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.quick-prompts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.prompt-btn {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border-hr);
    color: var(--color-text-primary);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.prompt-btn:hover {
    background: var(--color-hover-secondary);
    border-color: var(--color-hover-primary);
    color: var(--color-hover-primary);
}

/* Chat Container */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    display: flex;
    gap: 1rem;
    animation: slideIn 0.3s ease;
}

.chat-message.user {
    justify-content: flex-end;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.message-avatar.user {
    background: linear-gradient(135deg, var(--color-hover-primary), #7d6ff7);
    color: white;
}

.message-avatar.assistant {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.message-bubble {
    max-width: 70%;
    padding: 1rem;
    border-radius: 0.75rem;
    line-height: 1.6;
    word-wrap: break-word;
}

.chat-message.user .message-bubble {
    background: linear-gradient(135deg, var(--color-hover-primary), #7d6ff7);
    color: white;
    border-radius: 1rem 0.75rem 0.75rem 1rem;
}

.chat-message.assistant .message-bubble {
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border-hr);
    border-radius: 0.75rem 1rem 1rem 0.75rem;
}

.loading-dots {
    display: flex;
    gap: 0.4rem;
}

.loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-text-placeholder);
    animation: bounce 1.4s infinite;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 80%, 100% { opacity: 0.6; }
    40% { opacity: 1; }
}

/* Chat Input Area */
.chat-input-area {
    border-top: 1px solid var(--color-border-hr);
    padding: 1.5rem;
    background: var(--color-bg-secondary);
}

.input-wrapper {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

#chat-input {
    flex: 1;
    border: 1px solid var(--color-border-hr);
    border-radius: 0.75rem;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    transition: border-color 0.3s ease;
}

#chat-input:focus {
    outline: none;
    border-color: var(--color-hover-primary);
    box-shadow: 0 0 0 3px rgba(105, 92, 254, 0.1);
}

#chat-input::placeholder {
    color: var(--color-text-placeholder);
}

.btn-send {
    background: linear-gradient(135deg, var(--color-hover-primary), #7d6ff7);
    border: none;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(105, 92, 254, 0.2);
}

.btn-send:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a50e8, #6d5fe5);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(105, 92, 254, 0.3);
}

.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-hint {
    color: var(--color-text-placeholder);
    font-size: 0.85rem;
    margin: 0;
}

/* Scrollbar Styling */
.chat-container::-webkit-scrollbar {
    width: 8px;
}

.chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
    background: var(--color-text-placeholder);
    border-radius: 4px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: var(--color-hover-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .ai-assistant-container {
        height: calc(100vh - 300px);
    }

    .message-bubble {
        max-width: 90%;
    }

    .quick-prompts {
        grid-template-columns: 1fr;
    }

    .gate-card {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .ai-assistant-container {
        height: calc(100vh - 350px);
    }

    .quick-prompts-section {
        padding: 1.5rem 1rem;
    }

    .chat-container {
        padding: 1rem;
    }

    .chat-input-area {
        padding: 1rem;
    }

    .input-wrapper {
        gap: 0.5rem;
    }

    .btn-send {
        width: 44px;
        height: 44px;
    }
}
