/* Custom Styles for Autonomous Claims Processing Agent */

/* Font Configuration */
.font-inter {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Workflow Progress Styles */
.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.workflow-step.active .step-circle {
    background-color: #3b82f6;
    color: white;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.workflow-step.completed .step-circle {
    background-color: #10b981;
    color: white;
    border-color: #047857;
}

.workflow-step.processing .step-circle {
    background-color: #f59e0b;
    color: white;
    border-color: #d97706;
    animation: pulse 2s infinite;
}

.workflow-step.error .step-circle {
    background-color: #ef4444;
    color: white;
    border-color: #dc2626;
}

.step-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-align: center;
    transition: color 0.3s ease;
}

.workflow-step.active .step-label {
    color: #1f2937;
    font-weight: 600;
}

.workflow-connector {
    height: 3px;
    background-color: #e5e7eb;
    flex: 0 0 80px;
    margin: 0 1rem;
    align-self: flex-start;
    margin-top: 28px;
    transition: background-color 0.3s ease;
}

.workflow-connector.completed {
    background-color: #10b981;
}

/* Agent Panel Styles */
.agent-panel {
    transition: all 0.3s ease;
}

.agent-panel.hidden {
    display: none;
}

/* File Upload Styles */
#file-upload-area {
    transition: all 0.3s ease;
}

#file-upload-area:hover {
    background-color: #f9fafb;
}

#file-upload-area.dragover {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.uploaded-file {
    display: flex;
    items-center: center;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.uploaded-file:hover {
    background-color: #e5e7eb;
}

.file-info {
    display: flex;
    align-items: center;
}

.file-icon {
    width: 2rem;
    height: 2rem;
    margin-right: 0.75rem;
    color: #6b7280;
}

.file-details h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1f2937;
    margin: 0;
}

.file-details p {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
}

.file-actions {
    display: flex;
    align-items: center;
    space-x: 0.5rem;
}

.file-status {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.file-status.processing {
    background-color: #fef3c7;
    color: #d97706;
}

.file-status.completed {
    background-color: #d1fae5;
    color: #065f46;
}

.file-status.error {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Activity Logs */
.log-entry {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
}

.log-entry:hover {
    background-color: #f9fafb;
}

.timestamp {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    color: #6b7280;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.message {
    flex: 1;
}

/* Agent Status Cards */
.agent-status-card {
    transition: all 0.3s ease;
}

.agent-status-card.active {
    transform: translateX(4px);
    border-left: 4px solid #3b82f6;
}

.agent-status-card.processing {
    border-left: 4px solid #f59e0b;
}

.agent-status-card.completed {
    border-left: 4px solid #10b981;
}

.agent-status-card.error {
    border-left: 4px solid #ef4444;
}

/* Custom Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.slide-in {
    animation: slideIn 0.5s ease-out;
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

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

.progress-fill {
    height: 100%;
    background-color: #3b82f6;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-fill.processing {
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 50%, #3b82f6 100%);
    background-size: 200% 100%;
    animation: progressShimmer 2s linear infinite;
}

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

/* Evidence Cards */
.evidence-card {
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.evidence-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.evidence-card.validated {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.evidence-card.rejected {
    border-color: #ef4444;
    background-color: #fef2f2;
}

/* Contract Match Cards */
.contract-match {
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.contract-match.high-confidence {
    border-left-color: #10b981;
    background-color: #f0fdf4;
}

.contract-match.medium-confidence {
    border-left-color: #f59e0b;
    background-color: #fffbeb;
}

.contract-match.low-confidence {
    border-left-color: #ef4444;
    background-color: #fef2f2;
}

/* Exception Indicators */
.exception-indicator {
    position: relative;
}

.exception-indicator::before {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background-color: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
}

/* Responsive Design Adjustments */
@media (max-width: 768px) {
    .workflow-step {
        margin-bottom: 1rem;
    }
    
    .step-circle {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }
    
    .workflow-connector {
        display: none;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
}

/* Construction Industry Theme Enhancements */
.construction-theme {
    --primary-orange: #ea580c;
    --primary-blue: #0369a1;
    --safety-yellow: #fbbf24;
    --danger-red: #dc2626;
    --success-green: #059669;
}

/* Header styling with construction theme */
header {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
    color: white;
}

header h1 {
    color: white;
}

header .text-gray-500 {
    color: #bae6fd;
}

/* Enhanced button styling */
button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Professional card shadows */
.bg-white {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.bg-white:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* Construction-themed accent colors */
.accent-construction {
    background: linear-gradient(45deg, #ea580c, #f97316);
}

.text-construction-primary {
    color: #ea580c;
}

.bg-construction-primary {
    background-color: #ea580c;
}

.border-construction-primary {
    border-color: #ea580c;
}

/* Enhanced status indicators */
.status-indicator {
    position: relative;
    overflow: hidden;
}

.status-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.status-indicator:hover::before {
    left: 100%;
}

/* Professional typography improvements */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.025em;
}

.text-sm {
    line-height: 1.5;
}

/* Enhanced focus states */
input:focus, select:focus, textarea:focus {
    border-color: #0369a1;
    ring-color: #0369a1;
    box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.1);
}

/* Loading states */
.loading-shimmer {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

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

/* Enhanced tooltips */
.tooltip {
    position: relative;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #1f2937;
    z-index: 10;
}

/* Enhanced mobile responsiveness */
@media (max-width: 640px) {
    .workflow-step .step-label {
        font-size: 0.625rem;
        max-width: 80px;
        line-height: 1.2;
    }
    
    .agent-panel {
        margin: 0 -1rem;
        border-radius: 0;
    }
    
    .grid {
        gap: 0.75rem;
    }
}

/* Print styles for reports */
@media print {
    .no-print {
        display: none !important;
    }
    
    .agent-panel {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #d1d5db;
    }
    
    .workflow-step .step-circle {
        background-color: #f3f4f6 !important;
        color: #374151 !important;
        border: 2px solid #d1d5db !important;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .workflow-step .step-circle {
        border-width: 3px;
    }
    
    .agent-panel {
        border-width: 2px;
    }
    
    button {
        border-width: 2px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .agent-panel {
        background-color: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .log-entry:hover {
        background-color: #374151;
    }
    
    .bg-gray-50 {
        background-color: #374151;
    }
    
    .text-gray-600 {
        color: #d1d5db;
    }
    
    .text-gray-900 {
        color: #f9fafb;
    }
}