/* ==========================================
   DEEPSEEK CHAT INTERFACE
   ========================================== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height) - var(--nav-height) - var(--footer-height));
    width: 100%;
    max-width: none;
    margin: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    position: relative;
    transition: all var(--transition-normal);
}

.main-container.full-width .chat-container {
    height: calc(100vh - var(--header-height) - var(--nav-height));
    border-radius: 0;
    border: none;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.ai-chat-avatar {
    background: linear-gradient(135deg, #1a73e8, #8ab4f8);
}

.chat-title h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.chat-status {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.chat-action-btn {
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.chat-action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--bg-secondary);
}

.chat-welcome-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-primary);
    opacity: 0.9;
    padding: 20px;
}

.welcome-logo {
    width: 64px;
    height: 64px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary-blue);
}

.chat-welcome-message h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.chat-examples {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

.chat-examples button {
    padding: 10px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 14px;
}

.chat-examples button:hover {
    background: var(--bg-hover);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.bot-capabilities-modern {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 600px;
    margin: 32px auto 0;
    text-align: left;
}

.capability-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.capability-item:hover {
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.cap-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.cap-info {
    display: flex;
    flex-direction: column;
}

.cap-info strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.cap-info span {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.chat-message {
    display: flex;
    gap: 16px;
    max-width: 85%;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message.ai {
    align-self: flex-start;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: bold;
}

.user-avatar-small {
    background: var(--primary-blue);
    color: white;
}

.ai-avatar-small {
    background: linear-gradient(135deg, #1a73e8, #8ab4f8);
    color: white;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.chat-message.user .message-bubble {
    background: var(--primary-blue);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.ai .message-bubble {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Markdown Rendering & Scientific Formatting Optimizations */
.chat-answer-content {
    line-height: 1.65;
    color: var(--text-primary);
}

.maverick-section-header {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 20px 0 10px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-light);
    letter-spacing: -0.01em;
}

.maverick-section-header:first-child {
    margin-top: 0;
}

.maverick-cite {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    padding: 0 6px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 700;
    margin: 0 2px;
    cursor: help;
    border: 1px solid rgba(59, 130, 246, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.chat-answer-content p {
    margin-bottom: 12px;
}

.chat-answer-content strong {
    font-weight: 700;
    color: var(--text-primary);
}

.chat-answer-content em {
    font-style: italic;
    opacity: 0.9;
}

.chat-answer-content u {
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
}

.chat-answer-content code.inline-code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    color: var(--google-red);
}

.chat-answer-content ul {
    margin: 12px 0 12px 20px;
    padding: 0;
    list-style-type: disc;
}

.chat-answer-content li {
    margin-bottom: 6px;
}

.chat-answer-content li:last-child {
    margin-bottom: 0;
}

.maverick-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1.5px solid var(--primary-blue-light);
    transition: all 0.2s ease;
}

.maverick-link:hover {
    background: var(--primary-blue-light);
    border-bottom-color: var(--primary-blue);
}

.chat-answer-content br+ul {
    margin-top: 0;
}

/* Message Actions */
.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    opacity: 0;
    transition: opacity 0.2s;
}

.chat-message:hover .message-actions {
    opacity: 1;
}

.msg-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.msg-action-btn:hover {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
    background: var(--bg-hover);
}

.msg-action-btn.active {
    color: var(--google-blue);
    background: rgba(26, 115, 232, 0.1);
    border-color: var(--google-blue);
}

/* Thinking Process */
.thinking-process {
    margin-bottom: 12px;
    border-left: 2px solid var(--border-color);
    padding-left: 12px;
}

.thinking-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    cursor: pointer;
    opacity: 0.8;
}

.thinking-toggle:hover {
    opacity: 1;
    color: var(--primary-blue);
}

.thinking-toggle svg {
    transition: transform 0.2s;
}

.thinking-toggle.active svg {
    transform: rotate(90deg);
}

.thinking-content {
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 4px;
    line-height: 1.5;
}

/* File Upload & Attachments */
.chat-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
}

.chat-upload-btn:hover {
    background: var(--bg-hover);
    color: var(--primary-blue);
}

.chat-web-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    background: transparent;
    border: none;
}

.chat-web-toggle:hover {
    background: var(--bg-hover);
    color: var(--primary-blue);
}

.chat-web-toggle.active {
    color: #4285f4;
    /* Google Blue */
    background: rgba(66, 133, 244, 0.1);
    box-shadow: 0 0 8px rgba(66, 133, 244, 0.2);
}

#chat-attachment-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 0 4px;
}

.attachment-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 12px;
    color: var(--text-primary);
}

.maverick-boxed {
    display: block;
    border: 1px solid var(--primary-blue);
    padding: 16px 20px;
    border-radius: 16px;
    background: var(--bg-secondary);
    font-weight: 600;
    margin: 18px 0;
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    position: relative;
    border-left: 5px solid var(--primary-blue);
    line-height: 1.6;
}

.attachment-remove {
    cursor: pointer;
    color: var(--google-red);
    font-weight: bold;
    font-size: 14px;
}

.full-tab-chat {
    height: calc(100vh - var(--header-height) - var(--nav-height));
    border-radius: 0;
    box-shadow: none;
    border: none;
    background: var(--bg-secondary);
}


.full-tab-chat .chat-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0d47a1 100%);
    color: white;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chat-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-header-actions .chat-action-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 6px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-header-actions .chat-action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chat-header-actions .chat-action-btn svg {
    width: 16px;
    height: 16px;
}

.full-tab-chat .chat-subtitle,
.full-tab-chat .chat-status {
    color: white !important;
}

.chat-secondary-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.2s;
}

.chat-secondary-btn:hover {
    background: var(--bg-hover);
    color: var(--primary-blue);
}

.chat-secondary-btn.active {
    color: var(--google-red);
    background: rgba(234, 67, 53, 0.1);
}

.chat-input-area {
    padding: 20px 40px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    z-index: 10;
    position: sticky;
    bottom: 0;
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 10px 16px;
    transition: all var(--transition-normal);
    max-width: 1000px;
    margin: 0 auto;
}

.chat-input-wrapper:focus-within {
    background: var(--bg-primary);
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-focus);
}

.chat-input-wrapper textarea {
    flex: 1;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    resize: none;
    max-height: 120px;
    outline: none;
    color: var(--text-primary);
    padding: 10px 0;
    line-height: 1.5;
    margin: 0;
    display: block;
}

#chat-send-btn,
#chat-stop-btn {
    background: var(--primary-blue);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

#chat-stop-btn {
    background: #ea4335 !important;
    /* Medical Alert Red */
}

#chat-send-btn:hover {
    background: var(--primary-blue-hover);
    transform: scale(1.05);
}

#chat-stop-btn:hover {
    background: #d33426 !important;
    transform: scale(1.1);
}

#chat-send-btn:disabled,
#chat-stop-btn.hidden {
    display: none;
}

.chat-disclaimer {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-bubble {
    padding: 12px 18px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    border-bottom-left-radius: 2px;
    display: inline-block;
    box-shadow: var(--shadow-sm);
    max-width: 90%;
}

.typing-bubble.detailed-thinking {
    min-width: 280px;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.thinking-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.thinking-main-text {
    font-size: 14px;
    color: var(--primary-blue);
    font-weight: 600;
}

.thinking-steps {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.thinking-step {
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding-left: 12px;
    position: relative;
    margin-bottom: 0;
}

.thinking-step::before {
    content: '•';
    position: absolute;
    left: 0;
}

.thinking-step.active {
    opacity: 1;
    max-height: 40px;
    color: var(--text-muted);
    margin-bottom: 4px;
    transform: translateX(4px);
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Supporting Evidence / Source Details */
.chat-sources {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.chat-sources-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.source-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.source-card:hover {
    border-color: var(--primary-blue);
    background: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.source-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 600;
}

.source-index {
    background: var(--primary-blue);
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.source-badge {
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.source-badge.pubmed {
    background: #e3f2fd;
    color: #1565c0;
}

.source-badge.clinical_trials {
    background: #e8f5e9;
    color: #2e7d32;
}

.source-score {
    margin-left: auto;
    color: var(--text-muted);
}

.source-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.source-card-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.source-card-snippet {
    font-size: 11px;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Chat Para & Citations */
.chat-para {
    margin-bottom: 12px;
}

.chat-para:last-child {
    margin-bottom: 0;
}

.citation {
    color: var(--primary-blue);
    font-weight: 600;
    cursor: help;
    padding: 0 2px;
}

/* Integrated Desk Assistant */
.desk-assistant-section {
    margin-top: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.assistant-header {
    background: var(--bg-tertiary);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

.assistant-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #34a853;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(52, 168, 83, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 168, 83, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(52, 168, 83, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(52, 168, 83, 0);
    }
}

.assistant-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
}

.assistant-hint {
    font-size: 13px;
    font-weight: 400;
}

.assistant-body {
    max-height: 500px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.assistant-body.collapsed {
    max-height: 0;
    border-top: none;
}

.desk-chat-history {
    padding: 24px;
    max-height: 350px;
    overflow-y: auto;
    background: var(--bg-primary);
}

.chat-welcome-mini {
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.desk-input-wrapper {
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.desk-input-wrapper input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 24px;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
}

.desk-input-wrapper button {
    background: var(--primary-blue);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.desk-input-wrapper button:hover {
    transform: scale(1.05);
}

.chat-secondary-btn.recording {
    color: var(--google-red);
    background: rgba(234, 67, 53, 0.1);
    animation: voice-pulse 1.5s infinite;
}

@keyframes voice-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(234, 67, 53, 0.4);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(234, 67, 53, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(234, 67, 53, 0);
    }
}

/* Elite Suggested Questions Chips */
.suggested-questions-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 0 4px;
}

.suggested-questions-chips.hidden {
    display: none;
}

.question-chip {
    padding: 6px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--primary-blue);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.question-chip:hover {
    background: var(--primary-blue-light);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Speaking State for Action Buttons */
.msg-action-btn.speaking {
    color: var(--google-green);
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--google-green);
}

.msg-action-btn.speaking svg {
    animation: speak-pulse 1s infinite alternate;
}

@keyframes speak-pulse {
    from {
        opacity: 0.5;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Export Button Animation */
@keyframes download-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.chat-action-btn:hover svg {
    animation: download-bounce 0.6s ease infinite;
}

/* ==========================================
   CHAT TOOLS & PLUGINS DROPDOWN
   ========================================== */
.chat-tool-menu {
    position: relative;
    display: inline-block;
}

.plugin-dropdown {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 0;
    width: 240px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 8px;
    z-index: 2000;
    animation: pluginSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pluginSlideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.plugin-dropdown.hidden {
    display: none !important;
}

.plugin-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.plugin-item:hover {
    background: var(--bg-hover);
}

.plugin-item svg {
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.plugin-item.active svg {
    color: var(--primary-blue);
}

.plugin-info {
    display: flex;
    flex-direction: column;
}

.plugin-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.plugin-desc {
    font-size: 10px;
    color: var(--text-muted);
}

.plugin-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    margin-left: auto;
}

.plugin-item.active .plugin-status-dot {
    background: var(--google-green);
    box-shadow: 0 0 8px rgba(52, 168, 83, 0.4);
}

/* Thin separator line between plugin groups */
.plugin-divider {
    height: 1px;
    background: var(--border-light, #e8eaed);
    margin: 4px 8px;
    opacity: 0.6;
}

/* Tooltip on chat header action buttons */
.chat-action-btn {
    position: relative;
}

.chat-action-btn::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(32, 33, 36, 0.92);
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    padding: 3px 8px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 3000;
    letter-spacing: 0.02em;
}

.chat-action-btn:hover::after {
    opacity: 1;
}

.chat-tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    background: transparent;
    border: none;
}

.chat-tool-btn:hover {
    background: var(--bg-hover);
    color: var(--primary-blue);
}

.chat-tool-btn.active {
    color: var(--primary-blue);
    background: var(--primary-blue-light);
}

.chat-tool-btn.active-plugin {
    position: relative;
}

.chat-tool-btn.active-plugin::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: var(--google-green);
    border: 2px solid var(--bg-primary);
    border-radius: 50%;
    z-index: 10;
}

/* ========================================== 
   MAVERICK CHAT MODES (INCOGNITO & GROUP) 
   ========================================== */
.chat-action-btn.active {
    color: white !important;
    background: rgba(255, 255, 255, 0.45) !important;
    transform: scale(1.1);
}

#incognito-toggle-btn.active {
    background: #5f6368 !important;
}

.chat-container.incognito-mode {
    border-top: 3px solid #9aa0a6;
}

.chat-container.incognito-mode .chat-header {
    background: #202124 !important;
    color: #e8eaed !important;
}

.chat-container.incognito-mode .ai-chat-avatar {
    background: #3c4043 !important;
}

.chat-container.group-mode {
    border-top: 3px solid #34a853;
}

.group-participant-tag {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    margin-right: 8px;
    margin-bottom: 6px;
    display: inline-block;
    letter-spacing: 0.5px;
}

.tag-analyst {
    background: #e8f0fe;
    color: #1a73e8;
    border: 1px solid #1a73e8;
}

.tag-specialist {
    background: #e6f4ea;
    color: #1e8e3e;
    border: 1px solid #1e8e3e;
}

.tag-reviewer {
    background: #fef7e0;
    color: #f9ab00;
    border: 1px solid #f9ab00;
}

.incognito-disclaimer {
    background: #202124;
    color: #9aa0a6;
    font-size: 11px;
    text-align: center;
    padding: 6px;
    margin-top: 10px;
    border-radius: 8px;
    border: 1px dashed #3c4043;
}

.chat-message.ai.incognito .message-bubble {
    border-color: #9aa0a6;
}