/* 💎 V.AI Principal Architect - Professional Executive UI */

:root {
    --architect-blue: #38bdf8;
    --architect-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --glass-bg: rgba(10, 10, 12, 0.85); /* Deep Translucency */
    --glass-border: rgba(255, 255, 255, 0.08);
    --ai-msg-bg: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    --user-msg-bg: rgba(255, 255, 255, 0.04);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
}

#premium-v-ai-sidebar {
    position: fixed;
    right: 25px;
    top: 25px;
    bottom: 25px;
    width: 380px;
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    overflow: hidden;
    font-family: 'Inter', -apple-system, sans-serif;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Executive Header --- */
.consultant-header {
    padding: 24px;
    background: transparent;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    color: var(--architect-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 11px;
}

.pulse-dot {
    height: 8px;
    width: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
    animation: pulse-animation 2s infinite;
}

/* --- Strategic Chat Area --- */
#consultant-chat-display {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scrollbar-width: none; /* Hide scrollbar for clean look */
}

#consultant-chat-display::-webkit-scrollbar {
    display: none;
}

.message {
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.6;
    max-width: 90%;
    word-wrap: break-word;
}

.ai-message {
    background: var(--ai-msg-bg);
    color: var(--text-main);
    align-self: flex-start;
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-bottom-left-radius: 4px;
}

.user-message {
    background: var(--user-msg-bg);
    color: var(--text-dim);
    align-self: flex-end;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom-right-radius: 4px;
}

/* --- Input Console --- */
.consultant-input-group {
    padding: 24px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 12px;
}

#consultant-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 14px;
    color: white;
    font-size: 13.5px;
    transition: all 0.3s ease;
}

#consultant-input:focus {
    outline: none;
    border-color: var(--architect-blue);
    background: rgba(255, 255, 255, 0.05);
}

#consultant-send {
    background: var(--architect-gradient);
    color: #020617;
    border: none;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s;
}

#consultant-send:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* --- ⏳ Executive Timing Lock --- */
.premium-locked {
    /* Blur hata diya taaki dhundhla na dikhe */
    filter: grayscale(0.8); 
    opacity: 0.7;
    pointer-events: none;
    user-select: none;
    position: relative;
}

/* Jab timer khatam ho jaye, tab sirf background blur hoga, text nahi */
.upgrade-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(10px); /* Sirf overlay ke piche blur hoga */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    text-align: center;
    padding: 40px;
    animation: fade-in 0.5s ease;
}
.upgrade-btn {
    margin-top: 25px;
    background: var(--architect-gradient);
    color: #020617;
    border: none;
    padding: 16px 32px;
    border-radius: 16px;
    font-weight: 900;
    font-size: 13px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 15px 30px -10px rgba(56, 189, 248, 0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.upgrade-btn:hover {
    transform: scale(1.05) translateY(-2px);
}

/* --- Animations --- */
@keyframes pulse-animation {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

@keyframes fade-in {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.typing::after {
    content: '...';
    display: inline-block;
    width: 20px;
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}
/* --- 🟢 Principal Architect: Adaptive View Logic --- */

/* 1. The Minimized "Orb" State */
#premium-v-ai-sidebar.minimized {
    width: 65px !important;
    height: 65px !important;
    right: 30px;
    bottom: 30px;
    top: auto !important; /* Critical: Breaks the top-anchored fixed position */
    border-radius: 50% !important;
    cursor: pointer;
    background: var(--architect-gradient);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.5), 0 0 50px rgba(129, 140, 248, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: none !important; /* Orb state mein koi blur/grayscale nahi */
    opacity: 1 !important;
}

/* 2. Content Visibility Management */
#premium-v-ai-sidebar.minimized .header-label,
#premium-v-ai-sidebar.minimized #consultant-chat-display,
#premium-v-ai-sidebar.minimized .consultant-input-group,
#premium-v-ai-sidebar.minimized #ai-status-text,
#premium-v-ai-sidebar.minimized .upgrade-overlay {
    display: none !important;
    opacity: 0;
}

/* 3. Centering the Icon in the Orb */
#premium-v-ai-sidebar.minimized .consultant-header {
    padding: 0;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    border: none;
    background: transparent;
}

/* 4. The Toggle Button Styling */
.minimize-btn {
    cursor: pointer;
    opacity: 0.6;
    transition: transform 0.3s ease, opacity 0.2s;
    font-size: 22px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.minimize-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* 5. Hover Effect for the Minimized Orb */
#premium-v-ai-sidebar.minimized:hover {
    transform: scale(1.1);
    box-shadow: 0 0 35px rgba(56, 189, 248, 0.7);
}

/* --- Principal Strategist Improvements --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

#ai-status-text {
    font-size: 10px;
    opacity: 0.6;
    font-weight: 500;
}

.learning-action {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.verify-btn {
    font-size: 9px;
    color: var(--architect-blue);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 700;
}

.verify-btn.verified {
    color: #10b981;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

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