/* Process Timeline Specific Styles */
/* Enhanced styling for the welcome page process visualization timeline */

/* Timeline Container Enhancements */
.process-timeline-container {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
    position: relative;
}

.process-timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.process-timeline-container > * {
    position: relative;
    z-index: 1;
}

/* Enhanced Timeline Base Line */
.timeline-horizontal .absolute {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(59, 130, 246, 0.3) 10%, 
        rgba(59, 130, 246, 0.6) 50%, 
        rgba(59, 130, 246, 0.3) 90%, 
        transparent 100%
    );
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* Phase Card Hover Effects */
.phase-card:hover .phase-content {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.phase-card:hover .phase-status-circle > div {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Status-based Glow Effects */
.phase-content.ring-2.ring-blue-500 {
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.1), 
                0 0 20px rgba(59, 130, 246, 0.2),
                0 10px 25px rgba(0, 0, 0, 0.1);
}

.phase-content.ring-2.ring-red-500 {
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.1), 
                0 0 20px rgba(239, 68, 68, 0.2),
                0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Enhanced Status Badges */
.phase-card .inline-flex.animate-pulse {
    animation: urgentPulse 2s ease-in-out infinite;
}

@keyframes urgentPulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

/* Enhanced Action Button Animations */
.phase-actions a:hover {
    animation: buttonHover 0.3s ease-out;
}

@keyframes buttonHover {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-2px) scale(1.02); }
    100% { transform: translateY(-1px) scale(1.05); }
}

/* Gradient Text Effects */
.bg-gradient-to-r.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 1024px) {
    .timeline-vertical .phase-content {
        margin-left: 0;
        padding-left: 2rem;
    }
    
    .timeline-vertical .absolute.left-0 {
        left: 0.5rem;
    }
}

@media (max-width: 768px) {
    .process-timeline-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .phase-content {
        padding: 1rem;
    }
    
    .phase-status-circle > div {
        width: 2.5rem;
        height: 2.5rem;
    }
}

@media (max-width: 640px) {
    .timeline-vertical .space-y-8 {
        gap: 1.5rem;
    }
    
    .phase-card .text-xl {
        font-size: 1.125rem;
    }
    
    .phase-card .text-lg {
        font-size: 1rem;
    }
}

/* Enhanced Admin Panel Styling */
.admin-panel-enhanced {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.05) 0%, 
        rgba(255, 255, 255, 0.8) 30%, 
        rgba(16, 185, 129, 0.05) 100%
    );
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Loading States */
.timeline-loading {
    animation: shimmer 2s ease-in-out infinite;
}

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

/* Focus Management */
.phase-card:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 4px;
    border-radius: 0.75rem;
}

/* High Contrast Mode Enhancements */
@media (prefers-contrast: high) {
    .process-timeline-container {
        background: #ffffff;
        border: 3px solid #000000;
    }
    
    .phase-content {
        border: 2px solid #000000;
        background: #ffffff;
    }
    
    .timeline-horizontal .absolute {
        background: #000000;
        height: 4px;
    }
    
    .timeline-vertical .absolute {
        background: #000000;
        width: 4px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .phase-card:hover .phase-content,
    .phase-card:hover .phase-status-circle > div,
    .phase-actions a:hover {
        transform: none;
        animation: none;
    }
    
    .animate-pulse,
    .animate-spin {
        animation: none;
    }
    
    .timeline-loading {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .process-timeline-container {
        background: white;
        box-shadow: none;
    }
    
    .phase-content {
        box-shadow: none;
        border: 1px solid #000000;
    }
    
    .timeline-horizontal .absolute,
    .timeline-vertical .absolute {
        background: #000000;
    }
    
    .phase-actions {
        display: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .process-timeline-container {
        background: linear-gradient(135deg, #1f2937 0%, #111827 50%, #374151 100%);
        color: #f9fafb;
    }
    
    .phase-content {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .timeline-horizontal .absolute {
        background: linear-gradient(90deg, 
            transparent 0%, 
            rgba(96, 165, 250, 0.3) 10%, 
            rgba(96, 165, 250, 0.6) 50%, 
            rgba(96, 165, 250, 0.3) 90%, 
            transparent 100%
        );
    }
}

/* Enhanced Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Keyboard Navigation */
.phase-card[tabindex]:focus {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* Enhanced Visual Hierarchy */
.phase-header h3 {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.phase-dates {
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

/* Micro-interactions */
.phase-status-circle > div {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.phase-content {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Spacing */
.timeline-wrapper {
    padding: 2rem 0;
}

@media (min-width: 1024px) {
    .timeline-wrapper {
        padding: 3rem 0;
    }
}

/* Performance Optimizations */
.phase-card {
    will-change: transform;
    contain: layout style paint;
}

.phase-status-circle {
    will-change: transform;
}

/* Enhanced Error States */
.timeline-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
}

.timeline-error svg {
    filter: drop-shadow(0 2px 4px rgba(239, 68, 68, 0.2));
}