/**
 * AI Bot Assistant Styles
 * Modern, clean interface for the AI assistant
 */

.bot-assistant-wrap {
    margin: 20px 20px 0 0;
}

/* Step-by-Step Progress Styles */
.step-progress-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-title {
    font-weight: 600;
    color: #111827;
    font-size: 16px;
}

.progress-counter {
    color: #6b7280;
    font-size: 14px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    background: #f9fafb;
}

.step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.step-number {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.step-title {
    flex: 1;
    margin-left: 12px;
    color: #111827;
    font-size: 14px;
    font-weight: 500;
}

.step-status {
    font-size: 14px;
}

.step-description {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
}

.bot-assistant-wrap h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 28px;
}

.bot-assistant-wrap h1 .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    0%, 90%, 100% {
        transform: rotate(0deg);
    }
    95% {
        transform: rotate(360deg);
    }
}

/* Container Layout */
.bot-assistant-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 1400px) {
    .bot-assistant-container {
        grid-template-columns: 1fr;
    }
}

/* Chat Section */
.bot-chat-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 800px;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.chat-header-content {
    flex: 1;
}

.chat-header h2 {
    margin: 0 0 5px 0;
    color: white;
    font-size: 22px;
}

.chat-header .description {
    margin: 0;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
}

/* AI Mode Indicator */
.ai-mode-indicator {
    flex-shrink: 0;
}

.mode-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
}

.mode-badge.mode-active {
    background: rgba(16, 185, 129, 0.95);
    color: white;
}

.mode-badge.mode-warning {
    background: rgba(245, 158, 11, 0.95);
    color: white;
}

.mode-badge.mode-inactive {
    background: rgba(156, 163, 175, 0.95);
    color: white;
}

.mode-icon {
    font-size: 24px;
    line-height: 1;
}

.mode-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mode-info strong {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.mode-info small {
    font-size: 11px;
    opacity: 0.9;
    line-height: 1.2;
}

.mode-badge.mode-active .mode-info strong,
.mode-badge.mode-active .mode-info small {
    color: white;
}

.mode-badge.mode-warning .mode-info strong,
.mode-badge.mode-warning .mode-info small {
    color: white;
}

.mode-badge.mode-inactive .mode-info strong,
.mode-badge.mode-inactive .mode-info small {
    color: white;
}

@media (max-width: 782px) {
    .chat-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mode-badge {
        width: 100%;
    }
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

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

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.welcome-message,
.bot-message,
.user-message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: fadeInUp 0.3s ease;
}

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

.bot-avatar {
    font-size: 32px;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    position: relative;
    transition: all 0.3s ease;
}

.user-avatar {
    font-size: 14px;
    font-weight: 600;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    position: relative;
    transition: all 0.3s ease;
}

.bot-avatar {
    background: linear-gradient(135deg, #fff5f7 0%, #ffe5ea 100%);
    box-shadow: 0 2px 8px rgba(255, 105, 180, 0.2);
    animation: bobbing 2s ease-in-out infinite;
}

@keyframes bobbing {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.bot-avatar.thinking {
    animation: shake 0.5s ease-in-out;
}

.bot-avatar.happy {
    animation: bounce 0.6s ease-in-out;
}

.bot-avatar.excited {
    animation: wiggle 0.8s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    50% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

/* Mochi Expression Styles */
.bot-avatar::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid white;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.user-avatar {
    background: #667eea;
    color: white;
}

.message-content {
    flex: 1;
}

/* Simple response without padding/border for agentic step */
.bot-message.agentic-step:not(:has(.bot-avatar)) .message-content:not(:has(h4)) {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Fallback for browsers that don't support :has() */
.bot-message.agentic-step.simple-response {
    margin-bottom: 10px !important;
}

.bot-message.agentic-step.simple-response .message-content {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    color: white !important;
}

.bot-message.agentic-step.simple-response .message-content p,
.bot-message.agentic-step.simple-response .message-content div {
    margin: 0 !important;
    color: white !important;
}

/* User message - simple style */
.user-message {
    margin-bottom: 10px !important;
}

.user-message .message-content {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    color: white !important;
}

.user-message .message-content p,
.user-message .message-content div {
    margin: 0 !important;
    color: white !important;
}

.message-content p {
    margin: 0 0 10px 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.message-content li {
    margin: 5px 0;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
}

/* Chat Input */
.chat-input-container {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    background: white;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.chat-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chat-input-container .button-primary {
    padding: 12px 24px;
    border-radius: 25px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.chat-input-container .button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.chat-input-container .button-primary .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Standalone Chat Input Styles - Updated IDs */
#cursorChatInput-standalone {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    color: #333;
    pointer-events: all !important;
    user-select: text !important;
    resize: none;
    min-height: 20px;
    max-height: 120px;
    width: 100%;
    box-sizing: border-box;
}

#cursorChatInput-standalone:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#cursorSendButton-standalone {
    padding: 12px 16px;
    border-radius: 25px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all !important;
    user-select: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

#cursorSendButton-standalone:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#cursorSendButton-standalone:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Ensure chat messages container is visible */
#cursorChatMessages-standalone {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Legacy IDs for backward compatibility */
#chatInput-standalone,
#sendQuery-standalone,
#chatMessages-standalone {
    /* Inherit from cursor versions */
}

/* Tool Execution Styles */
.tool-execution-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f0f9ff;
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
}

.tool-name {
    font-weight: 600;
    color: #1e40af;
}

.tool-progress {
    display: flex;
    align-items: center;
}

.progress-dots {
    display: flex;
    gap: 4px;
}

.progress-dots span {
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    animation: tool-progress 1.5s infinite;
}

.progress-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.progress-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes tool-progress {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.tool-result {
    border-left: 3px solid #10b981;
    background: #f0fdf4;
}

.tool-error {
    border-left: 3px solid #ef4444;
    background: #fef2f2;
}

.tool-data {
    border-left: 3px solid #8b5cf6;
    background: #faf5ff;
}

.tool-data pre {
    font-size: 12px;
    line-height: 1.4;
    max-height: 200px;
    overflow-y: auto;
}

/* Step Progress Styles */
.step-progress-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-title {
    font-weight: 600;
    color: #374151;
}

.progress-counter {
    font-size: 14px;
    color: #6b7280;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.step-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 15px;
    transition: all 0.3s ease;
}

.step-item[data-status="in-progress"] {
    border-color: #3b82f6;
    background: #eff6ff;
}

.step-item[data-status="completed"] {
    border-color: #10b981;
    background: #f0fdf4;
}

.step-item[data-status="failed"] {
    border-color: #ef4444;
    background: #fef2f2;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.step-number {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.step-title {
    font-weight: 600;
    color: #374151;
    flex: 1;
    margin: 0 10px;
}

.step-status {
    font-size: 14px;
    font-weight: 500;
}

.step-description {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

/* TODO Animation Styles */
.todo-list-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.todo-list-container h4 {
    margin: 0 0 15px 0;
    color: #374151;
    font-size: 16px;
}

.todo-progress {
    margin-bottom: 20px;
}

.progress-bar-text {
    font-family: monospace;
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
}

.progress-stats {
    font-size: 14px;
    color: #6b7280;
}

.todo-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.todo-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.todo-item[data-status="in-progress"] {
    border-color: #3b82f6;
    background: #eff6ff;
}

.todo-item[data-status="completed"] {
    border-color: #10b981;
    background: #f0fdf4;
}

.todo-item[data-status="failed"] {
    border-color: #ef4444;
    background: #fef2f2;
}

.todo-icon {
    font-size: 16px;
    min-width: 20px;
    margin-top: 2px;
}

.todo-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.todo-step-number {
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
}

.todo-step-content {
    color: #374151;
    font-size: 14px;
    line-height: 1.4;
}

.todo-item.pulse {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Execute Plan Button Styles */
.execute-plan-container {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.execute-plan-btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.execute-plan-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.execute-plan-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    font-size: 16px;
}

.btn-text {
    font-size: 14px;
}

.plan-info {
    color: #6b7280;
    font-size: 14px;
}

/* Smart Analysis Workflow Styles */
.analysis-phase {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #0ea5e9;
    border-radius: 12px;
    margin: 15px 0;
}

.analysis-header {
    margin-bottom: 20px;
}

.analysis-header h4 {
    margin: 0 0 8px 0;
    color: #0c4a6e;
    font-size: 18px;
}

.analysis-header p {
    margin: 0;
    color: #0369a1;
    font-size: 14px;
}

.analysis-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.analysis-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.analysis-step.processing {
    border-color: #3b82f6;
    background: #eff6ff;
    animation: pulse 2s infinite;
}

.analysis-step.completed {
    border-color: #10b981;
    background: #f0fdf4;
}

.analysis-step.failed {
    border-color: #ef4444;
    background: #fef2f2;
}

.step-icon {
    font-size: 18px;
    min-width: 24px;
}

.step-text {
    flex: 1;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
}

.step-status {
    font-size: 16px;
    min-width: 20px;
}

/* Analysis Results Styles */
.analysis-results {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin: 15px 0;
}

.analysis-summary {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.summary-item {
    padding: 12px;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.summary-item strong {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
}

.summary-item p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
}

/* Resources Status Styles */
.resources-status {
    background: #f0fdf4;
    border: 1px solid #10b981;
    border-radius: 8px;
    margin: 15px 0;
}

.resources-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.resource-item {
    padding: 10px;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #10b981;
}

.resource-item strong {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-size: 13px;
}

.resource-item p {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
}

/* Execution Plan Styles */
.execution-plan {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    margin: 15px 0;
}

.plan-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.plan-item {
    padding: 10px;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #f59e0b;
}

.plan-item strong {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-size: 13px;
}

.plan-item p {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
}

.plan-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.start-execution-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-execution-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.cancel-execution-btn {
    background: #6b7280;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-execution-btn:hover {
    background: #4b5563;
}

/* Execution Progress Styles */
.execution-start {
    background: #f0f9ff;
    border: 1px solid #3b82f6;
    border-radius: 8px;
    margin: 15px 0;
}

.execution-progress {
    margin-top: 15px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    text-align: center;
    color: #6b7280;
    font-size: 12px;
}

/* Execution Completion Styles */
.execution-complete {
    background: #f0fdf4;
    border: 1px solid #10b981;
    border-radius: 8px;
    margin: 15px 0;
}

.completion-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

/* Analysis Error Styles */
.analysis-error {
    background: #fef2f2;
    border: 1px solid #ef4444;
    border-radius: 8px;
    margin: 15px 0;
}

.retry-analysis-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 10px;
}

.retry-analysis-btn:hover {
    background: #2563eb;
}

/* Execution Cancelled Styles */
.execution-cancelled {
    background: #f9fafb;
    border: 1px solid #6b7280;
    border-radius: 8px;
    margin: 15px 0;
}

/* Quick Actions */
.quick-actions {
    padding: 15px 20px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: white;
    border-radius: 0 0 12px 12px;
}

.quick-action {
    padding: 8px 16px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.quick-action:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Dashboard Panels */
.bot-dashboard-panels {
    display: grid;
    gap: 20px;
}

.dashboard-panel {
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.dashboard-panel h3 {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    font-size: 18px;
}

/* Insights */
.insights-grid {
    display: grid;
    gap: 15px;
}

.insight-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ddd;
    background: #f8f9fa;
}

.insight-item.success {
    border-left-color: #10b981;
    background: #ecfdf5;
}

.insight-item.warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.insight-item.info {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.insight-icon {
    font-size: 24px;
}

.insight-content {
    flex: 1;
}

.insight-content h4 {
    margin: 0 0 5px 0;
    font-size: 15px;
}

.insight-content p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.insight-action {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 12px;
    background: #667eea;
    color: white !important;
    border-radius: 5px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.insight-action:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

/* Tools Status */
.tools-grid {
    display: grid;
    gap: 12px;
}

.tool-item {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.tool-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.tool-name {
    font-weight: 600;
    font-size: 14px;
}

.tool-status {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.tool-status.status-active {
    background: #10b981;
    color: white;
}

.tool-stats {
    display: grid;
    gap: 5px;
    margin: 10px 0;
}

.stat-item {
    font-size: 13px;
    color: #666;
}

.stat-label {
    font-weight: 500;
}

.stat-value {
    color: #667eea;
    font-weight: 600;
}

.tool-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.tool-footer small {
    color: #999;
    font-size: 12px;
}

/* Alerts */
.no-alerts {
    text-align: center;
    padding: 40px 20px;
    color: #10b981;
}

.no-alerts .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
}

.alerts-list {
    display: grid;
    gap: 12px;
}

.alert-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ddd;
    background: #f8f9fa;
    position: relative;
}

.alert-item.severity-high {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.alert-item.severity-medium {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.alert-item.severity-low {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.alert-icon {
    font-size: 24px;
}

.alert-content {
    flex: 1;
}

.alert-content h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.alert-content p {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #666;
}

.alert-time {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 11px;
    color: #999;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-trends {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.stats-trends h4 {
    margin: 0 0 15px 0;
}

.trend-chart {
    height: 200px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

/* Dashboard Widget */
.bot-assistant-widget {
    padding: 10px 0;
}

.widget-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.widget-stats .stat-item {
    flex: 1;
    text-align: center;
}

.widget-stats .stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    display: block;
}

.widget-stats .stat-label {
    font-size: 12px;
    color: #666;
}

.widget-alert {
    padding: 12px;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 13px;
}

.widget-action {
    text-align: center;
    margin: 15px 0 0 0;
}

/* Loading States */
.loading-indicator {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px;
}

.typing-indicator span {
   
    height: 8px;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

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

/* Celebration Particles */
.celebration-particle {
    animation: particleFade 2s ease-out forwards;
}

@keyframes particleFade {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

.chat-messages {
    position: relative;
}

/* Responsive */
@media (max-width: 782px) {
    .bot-assistant-container {
        grid-template-columns: 1fr;
    }
    
    .bot-chat-section {
        height: 600px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .quick-action {
        width: 100%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .bot-chat-section {
        background: #1e1e1e;
        border-color: #333;
    }
    
    .chat-messages {
        background: #252525;
    }
    
    .message-content {
        
        color: #e0e0e0;
    }
    
    .dashboard-panel {
        background: #1e1e1e;
        border-color: #333;
    }
}

/* Mochi Expression Reactions */
.mochi-expression {
    display: inline-block;
    font-size: 24px;
    margin: 0 5px;
    animation: expressionPop 0.5s ease-out;
}

@keyframes expressionPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}

.message-content .mochi-reaction {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    margin: 5px 0;
    font-size: 14px;
}

.bot-message.success .message-content {
    
}

.bot-message.warning .message-content {
    /* border-left: 4px solid #f59e0b; */
}

.bot-message.error .message-content {
    /* border-left: 4px solid #ef4444; */
}

.bot-message.info .message-content {
    /* border-left: 4px solid #3b82f6; */
}

/* Sparkle Effect for Special Responses */
.sparkle-effect {
    position: relative;
    display: inline-block;
}

.sparkle-effect::before,
.sparkle-effect::after {
    content: '✨';
    position: absolute;
    animation: sparkle 1.5s ease-in-out infinite;
}

.sparkle-effect::before {
    left: -20px;
    top: -10px;
    animation-delay: 0s;
}

.sparkle-effect::after {
    right: -20px;
    top: -10px;
    animation-delay: 0.5s;
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}

/* Emoji Reactions Container */
.emoji-reactions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.emoji-reaction {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emoji-reaction:hover {
    transform: scale(1.1);
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.emoji-reaction.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* Message Status Indicators */
.message-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.message-status.ai-powered::before {
    content: '🤖';
    font-size: 14px;
}

.message-status.pattern-match::before {
    content: '⚡';
    font-size: 14px;
}

/* Utility Classes */
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}

.text-success {
    color: #10b981;
}

.text-warning {
    color: #f59e0b;
}

.text-error {
    color: #ef4444;
}

.text-info {
    color: #3b82f6;
}

/* Action Message Styles */
.action-message {
    padding: 15px;
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    margin-top: 10px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.action-buttons .button {
    flex: 1;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.action-confirm {
    background: #10b981 !important;
    color: white !important;
}

.action-confirm:hover {
    background: #059669 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.action-cancel {
    background: #6b7280 !important;
    color: white !important;
}

.action-cancel:hover {
    background: #4b5563 !important;
}

.action-progress {
    margin-top: 15px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    animation: progressAnimation 1.5s ease-in-out infinite;
}

@keyframes progressAnimation {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.progress-text {
    text-align: center;
    color: #667eea;
    font-weight: 600;
    margin-top: 10px;
    font-size: 14px;
}

.action-result {
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    font-weight: 600;
}

.action-result.success {
    background: #ecfdf5;
    border: 1px solid #10b981;
}

.action-result.error {
    background: #fef2f2;
    border: 1px solid #ef4444;
}

.action-cancelled {
    margin-top: 10px !important;
}

/* TODO List Styles */
.todo-list-container {
    margin: 15px 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 10%, #f8f9fa 10%);
    border-radius: 12px;
    border-left: 4px solid #667eea;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease-out;
}

.todo-list-container h4 {
    margin: 0 0 15px 0;
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
}

.todo-progress {
    margin: 15px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.progress-bar-text {
    font-size: 13px;
    margin-bottom: 8px;
    color: #374151;
}

.progress-bar-fill {
    color: #667eea;
    font-weight: bold;
}

.progress-percent {
    color: #10b981;
    font-weight: bold;
}

.progress-stats {
    font-size: 13px;
    color: #6b7280;
}

.progress-completed {
    color: #10b981;
    font-weight: bold;
}

.todo-items {
    margin-top: 15px;
    background: white;
    padding: 15px;
    border-radius: 8px;
}

.todo-item {
    padding: 10px;
    font-size: 14px;
    line-height: 1.6;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.todo-item:last-child {
    margin-bottom: 0;
}

.todo-icon {
    font-size: 18px;
    min-width: 24px;
}

.todo-text {
    flex: 1;
}

.todo-item[data-status="pending"] {
    color: #9ca3af;
    background: #f9fafb;
}

.todo-item[data-status="in-progress"] {
    color: #f59e0b;
    font-weight: 600;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
}

.todo-item[data-status="completed"] {
    color: #10b981;
    font-weight: 500;
    background: #ecfdf5;
    border-left: 3px solid #10b981;
}

.todo-item[data-status="failed"] {
    color: #ef4444;
    background: #fef2f2;
    border-left: 3px solid #ef4444;
}

.todo-item[data-status="skipped"] {
    color: #9ca3af;
    background: #f9fafb;
}

.todo-item.pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.02);
    }
}

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

.todo-final-message {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Query Suggestions Styles */
.query-suggestions-container {
    margin-top: 20px;
    padding: 15px;
    background: var(--fb-bg-primary, #1e1e1e);
    border-radius: 8px;
}

.query-category {
    margin-bottom: 20px;
}

.query-category:last-child {
    margin-bottom: 0;
}

.category-title {
    margin: 0 0 10px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.query-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.query-suggestion-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.query-suggestion-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.query-suggestion-btn:active {
    transform: translateY(0);
}

@media (max-width: 782px) {
    .query-buttons {
        flex-direction: column;
    }
    
    .query-suggestion-btn {
        width: 100%;
        text-align: left;
    }
}


