/* Diagnostic Chat UI Styles */
/* Requirements: 36.3, 36.4, 39.3 */

/* Diagnostic Mode Indicator */
.diagnostic-mode-active {
    --diagnostic-accent: #667eea;
    --diagnostic-bg: #f0f4ff;
}

/* Diagnostic Status Bar */
.diagnostic-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 500;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-icon {
    font-size: 18px;
}

.status-text {
    font-size: 14px;
}

.status-paused {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.status-completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Diagnostic Messages */
.diagnostic-message {
    border-left: 4px solid var(--diagnostic-accent, #667eea);
    background: var(--diagnostic-bg, #f0f4ff);
    padding: 16px;
    margin: 12px 0;
    border-radius: 8px;
}

.diagnostic-step-message {
    border-left-width: 6px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.diagnostic-step-message.current-step {
    border-left-color: #10b981;
    background: #f0fdf4;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    animation: highlight-pulse 2s ease-in-out;
}

@keyframes highlight-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Diagnostic Action Buttons */
.diagnostic-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.diagnostic-action-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 100px;
}

.btn-confirm {
    background: #10b981;
    color: white;
}

.btn-confirm:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.btn-retry {
    background: #3b82f6;
    color: white;
}

.btn-retry:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-skip {
    background: #f59e0b;
    color: white;
}

.btn-skip:hover:not(:disabled) {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

.btn-help {
    background: #8b5cf6;
    color: white;
}

.btn-help:hover:not(:disabled) {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

.diagnostic-action-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Persona Handover Notification */
.persona-handover-notification {
    margin: 16px 0;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.handover-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1f2937;
}

.handover-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.handover-from,
.handover-to {
    padding: 12px;
    background: white;
    border-radius: 6px;
}

.handover-from strong,
.handover-to strong {
    color: #667eea;
    display: block;
    margin-bottom: 6px;
}

.handover-arrow {
    text-align: center;
    font-size: 24px;
    margin: 4px 0;
}

/* Step Navigation */
.diagnostic-step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    margin: 16px 0;
}

.nav-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-btn:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-1px);
}

.nav-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.step-counter {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

/* Completion Summary */
.diagnostic-completion-summary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 24px;
    border-radius: 12px;
    margin: 16px 0;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.completion-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.completion-icon {
    font-size: 32px;
}

.completion-header h3 {
    margin: 0;
    font-size: 20px;
}

.completion-content {
    background: rgba(255, 255, 255, 0.1);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.completion-content p {
    margin: 8px 0;
    font-size: 14px;
}

.completion-actions {
    display: flex;
    gap: 12px;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: white;
    color: #10b981;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Code Block Enhancements for Diagnostics */
.diagnostic-message .code-block-wrapper {
    margin: 12px 0;
}

.diagnostic-message .code-block-header {
    background: #667eea;
    color: white;
    padding: 8px 12px;
    border-radius: 6px 6px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.diagnostic-message .copy-code-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.diagnostic-message .copy-code-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .diagnostic-actions {
        flex-direction: column;
    }

    .diagnostic-action-btn {
        width: 100%;
    }

    .completion-actions {
        flex-direction: column;
    }

    .handover-content {
        font-size: 14px;
    }

    .diagnostic-step-navigation {
        flex-direction: column;
        gap: 12px;
    }

    .nav-btn {
        width: 100%;
    }
}

/* Accessibility */
.diagnostic-action-btn:focus,
.nav-btn:focus,
.btn-primary:focus,
.btn-secondary:focus {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .diagnostic-actions,
    .diagnostic-step-navigation,
    .completion-actions {
        display: none;
    }
}
