/**
 * Timeline Styles v2 - Стилі для компонентів часової лінії
 * Планування виробництва v2.0
 */

/* ==========================================
   TIMELINE CALENDAR COMPONENTS
========================================== */

.timeline-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.timeline-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
}

.timeline-content {
    padding: 20px;
}

/* ==========================================
   TIMELINE NAVIGATION
========================================== */

.timeline-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #e0e6ed;
}

.timeline-nav-button {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.timeline-nav-button:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.timeline-nav-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.timeline-current-period {
    font-weight: 600;
    font-size: 18px;
    color: #495057;
}

/* ==========================================
   TIMELINE EVENTS
========================================== */

.timeline-events {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.timeline-event {
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.timeline-event:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

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

.timeline-event-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.timeline-event-time {
    color: #6c757d;
    font-size: 14px;
}

.timeline-event-content {
    color: #495057;
    line-height: 1.5;
}

/* ==========================================
   TIMELINE PROGRESS INDICATORS
========================================== */

.timeline-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.timeline-progress-bar {
    flex: 1;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.timeline-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.timeline-progress-text {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    white-space: nowrap;
}

/* ==========================================
   TIMELINE STATUS BADGES
========================================== */

.timeline-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-status.draft {
    background: #fff3cd;
    color: #856404;
}

.timeline-status.active {
    background: #d1ecf1;
    color: #0c5460;
}

.timeline-status.completed {
    background: #d4edda;
    color: #155724;
}

.timeline-status.overdue {
    background: #f8d7da;
    color: #721c24;
}

/* ==========================================
   TIMELINE METRICS
========================================== */

.timeline-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.timeline-metric {
    text-align: center;
}

.timeline-metric-value {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    display: block;
}

.timeline-metric-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

/* ==========================================
   RESPONSIVE DESIGN
========================================== */

@media (max-width: 768px) {
    .timeline-nav {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .timeline-event-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .timeline-metrics {
        grid-template-columns: 1fr 1fr;
    }
    
    .timeline-progress {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .timeline-progress-bar {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .timeline-content {
        padding: 15px;
    }
    
    .timeline-metrics {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   ANIMATION UTILITIES
========================================== */

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

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

.timeline-loading {
    position: relative;
    overflow: hidden;
}

.timeline-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.6),
        transparent
    );
    animation: timelineShimmer 1.5s infinite;
}

@keyframes timelineShimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}