/* timeline.css */

.timeline-container {
    padding: 20px 0;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-test-card {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid transparent;
}

.timeline-test-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.timeline-test-card.score-high {
    border-left-color: #28a745;
    /* Green */
}

.timeline-test-card.score-medium {
    border-left-color: #ffc107;
    /* Orange/Yellow */
}

.timeline-test-card.score-low {
    border-left-color: #dc3545;
    /* Red */
}

.test-card-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.test-card-icon {
    width: 60px;
    height: 60px;
    background: #f0f7ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #2878EB;
}

.test-details h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #333;
}

.test-meta {
    font-size: 0.9rem;
    color: #6c757d;
    display: flex;
    gap: 15px;
}

.test-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.test-card-score {
    text-align: right;
}

.score-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.score-percentage {
    font-size: 0.9rem;
    color: #6c757d;
}

.badge-performance {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 5px;
}

.badge-performance.high {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-performance.medium {
    background: #fff8e1;
    color: #f57f17;
}

.badge-performance.low {
    background: #ffebee;
    color: #c62828;
}

.test-card-actions {
    display: flex;
    gap: 10px;
}

.btn-action-sm {
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-review {
    background: #2878EB;
    color: #fff;
}

.btn-review:hover {
    background: #1c64d1;
}

.btn-retry {
    background: #f0f7ff;
    color: #2878EB;
}

.btn-retry:hover {
    background: #e1efff;
}

/* Empty State */
.timeline-empty {
    text-align: center;
    padding: 100px 20px;
    color: #6c757d;
}

.timeline-empty i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Localized Loading Overlay */
.app-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 400px;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 15px;
}

#testHistoryTimeline {
    position: relative;
    min-height: 400px;
}

/* Responsiveness */
@media (max-width: 768px) {
    .timeline-test-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .test-card-score {
        text-align: left;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .test-card-actions {
        width: 100%;
        justify-content: stretch;
    }

    .btn-action-sm {
        flex: 1;
        justify-content: center;
    }
}

/* Load More Button */
.btn-load-more {
    background: transparent;
    border: 2px solid #2878EB;
    color: #2878EB;
    padding: 10px 30px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.btn-load-more:hover {
    background: #2878EB;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 120, 235, 0.25);
}

.btn-load-more:active {
    transform: translateY(0);
}

.btn-load-more:disabled {
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    background: #f8fafc;
    transform: none;
    box-shadow: none;
}