/* Performance Review Timeline Styles */

/* Vertical Timeline Styles - Shared Component */
.timeline {
    position: relative;
    padding-left: 2rem;
    list-style: none;
    margin: 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
    z-index: 0;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    display: block;
}

.timeline-item-last {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.25rem;
    width: 2rem;
    height: 2rem;
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    z-index: 2;
}

.timeline-marker.bg-success {
    background-color: #198754 !important;
    border-color: #198754 !important;
}

.timeline-marker.bg-primary {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

.timeline-marker .text-white {
    color: #fff !important;
}

.timeline-content {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-left: 1rem;
    position: relative;
    z-index: 1;
}

.timeline-content h6 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #495057;
}

.timeline-content .small {
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Ensure timeline items don't get styled as progress bars */
.timeline-item {
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    height: auto !important;
    width: auto !important;
}

/* Override any conflicting Bootstrap or custom progress bar styles */
.timeline .timeline-item:not(.progress):not(.progress-bar) {
    background: transparent !important;
    display: block !important;
    position: relative !important;
}

/* Specific overrides for custom.css conflicts */
.timeline .timeline-item:before {
    display: none !important;
    border: none !important;
    width: 0 !important;
    height: 0 !important;
}

.timeline .timeline-marker {
    z-index: 1000 !important;
    position: absolute !important;
    left: -2rem !important;
    top: 0.25rem !important;
    width: 2rem !important;
    height: 2rem !important;
    background: #fff !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.75rem !important;
}

/* Force timeline structure to display correctly */
.timeline {
    position: relative !important;
    padding-left: 2rem !important;
    list-style: none !important;
    margin: 0 !important;
}

.timeline::before {
    content: '' !important;
    position: absolute !important;
    left: 1rem !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 2px !important;
    background: #dee2e6 !important;
    z-index: 0 !important;
}

.timeline-horizontal {
    position: relative;
    padding: 20px 0;
}

.timeline-line {
    position: absolute;
    top: 32px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: linear-gradient(to right, #198754 0%, #198754 var(--progress-width, 0%), #e9ecef var(--progress-width, 0%), #e9ecef 100%);
    z-index: 1;
}

.timeline-step {
    position: relative;
    z-index: 2;
    max-width: 200px;
}

.timeline-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 3;
    position: relative;
}

.timeline-circle.completed {
    background-color: #198754;
    color: white;
    border: 3px solid #fff;
}

.timeline-circle.pending {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 3px solid #e9ecef;
}

.timeline-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.timeline-connector {
    flex: 1;
    height: 2px;
    margin: 0 -1px;
    position: relative;
    top: 24px;
    z-index: 1;
}

.timeline-connector.completed {
    background-color: #198754;
}

.timeline-connector.pending {
    background-color: #e9ecef;
}

.timeline-content {
    padding: 0 8px;
    min-height: 80px;
}

.timeline-content h6 {
    color: #495057;
    margin-bottom: 4px;
}

.timeline-content .text-success {
    color: #198754 !important;
}

.timeline-content .text-muted {
    color: #6c757d !important;
    line-height: 1.3;
}

/* Responsive timeline for mobile */
@media (max-width: 768px) {
    .timeline-horizontal {
        padding: 15px 0;
    }

    .timeline-circle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .timeline-line {
        top: 20px;
        left: 10%;
        right: 10%;
    }

    .timeline-connector {
        top: 20px;
    }

    .timeline-content {
        padding: 0 4px;
        min-height: 70px;
    }

    .timeline-content h6 {
        font-size: 0.8rem;
    }

    .timeline-content .small {
        font-size: 0.7rem !important;
    }

    .timeline-content div[style*="font-size: 0.75rem"] {
        font-size: 0.65rem !important;
    }
}

/* Quick stats styling */
.performance-review-status-card .row .col-6,
.performance-review-status-card .row .col-md-3 {
    margin-bottom: 1rem;
}

.performance-review-status-card .text-center {
    padding: 0.5rem;
}

.performance-review-status-card .text-center:hover {
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
}

/* Animation for progress */
@keyframes progressFill {
    from {
        width: 0%;
    }

    to {
        width: var(--progress-width);
    }
}

.timeline-line {
    animation: progressFill 1s ease-out;
}

/* Status indicators with better visual hierarchy */
.timeline-content .fw-medium {
    font-size: 0.85rem;
}

.timeline-content .small.fw-medium {
    font-weight: 600 !important;
}