/**
 * ActProof.ai - Progress Tracking & Remediation Timeline Styles
 */

/* ============================================
   Progress Tracking Section
   ============================================ */

.progress-tracking-section {
    padding: 1.5rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.progress-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.progress-header h3 svg {
    color: var(--primary-light);
}

.fixed-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
}

.fixed-counter .counter-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success);
}

.fixed-counter.has-fixed .counter-value {
    color: var(--success);
}

.fixed-counter .counter-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ============================================
   Mark Fixed Button
   ============================================ */

.btn-mark-fixed {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(124, 58, 237, 0.08) 100%);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 6px;
    color: var(--primary-light);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-mark-fixed:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.25) 0%, rgba(124, 58, 237, 0.15) 100%);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn-mark-fixed.fixed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-color: var(--success);
    color: var(--success);
}

.btn-mark-fixed.fixed:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, rgba(5, 150, 105, 0.2) 100%);
}

.btn-mark-fixed svg {
    width: 14px;
    height: 14px;
}

.btn-mark-fixed .eta-badge {
    margin-left: 0.25rem;
    padding: 0.125rem 0.375rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-size: 0.65rem;
    color: var(--text-tertiary);
}

/* ============================================
   ETA Badge
   ============================================ */

.eta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--warning);
    font-weight: 500;
}

.eta-badge.complexity-low {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.eta-badge.complexity-medium {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

.eta-badge.complexity-high {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.eta-badge svg {
    width: 12px;
    height: 12px;
}

/* ============================================
   Trend Indicator
   ============================================ */

.trend-widget-container {
    margin-bottom: 1.5rem;
}

.trend-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.6) 0%, rgba(17, 24, 39, 0.8) 100%);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 12px;
}

.trend-indicator.trend-improving {
    border-color: rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(17, 24, 39, 0.9) 100%);
}

.trend-indicator.trend-declining {
    border-color: rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(17, 24, 39, 0.9) 100%);
}

.trend-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(124, 58, 237, 0.2);
    border-radius: 10px;
}

.trend-improving .trend-icon {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.trend-declining .trend-icon {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.trend-stable .trend-icon {
    background: rgba(124, 58, 237, 0.2);
    color: var(--primary-light);
}

.trend-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.trend-delta {
    font-size: 1.25rem;
    font-weight: 700;
}

.trend-improving .trend-delta {
    color: var(--success);
}

.trend-declining .trend-delta {
    color: var(--error);
}

.trend-stable .trend-delta {
    color: var(--text-secondary);
}

.trend-message {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* ============================================
   Trend Chart
   ============================================ */

.trend-chart-container {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.trend-chart-container h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

#trendChart {
    width: 100%;
    max-height: 200px;
}

/* ============================================
   Rescan CTA
   ============================================ */

.rescan-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(124, 58, 237, 0.05) 100%);
    border: 1px dashed rgba(124, 58, 237, 0.3);
    border-radius: 12px;
    text-align: center;
}

.rescan-hint {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin: 0;
}

/* ============================================
   GitHub Check Badge
   ============================================ */

.github-check-badge {
    display: inline-flex;
    align-items: center;
}

.check-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.check-status.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.check-status.failure {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.check-status.pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.check-status:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Issue Card Enhancements
   ============================================ */

.alert-card,
.issue-card {
    position: relative;
}

.alert-actions,
.issue-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

/* Fixed issue styling */
.alert-card.is-fixed,
.issue-card.is-fixed {
    opacity: 0.6;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(17, 24, 39, 0.8) 100%);
    border-color: rgba(16, 185, 129, 0.2);
}

.alert-card.is-fixed::after,
.issue-card.is-fixed::after {
    content: 'FIXED';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--success);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

/* ============================================
   Timeline View
   ============================================ */

.remediation-timeline {
    position: relative;
    padding-left: 2rem;
}

.remediation-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary) 0%, rgba(124, 58, 237, 0.2) 100%);
}

.timeline-item {
    position: relative;
    padding: 1rem 0;
    padding-left: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 1.25rem;
    width: 12px;
    height: 12px;
    background: var(--bg-primary);
    border: 2px solid var(--primary);
    border-radius: 50%;
}

.timeline-item.completed::before {
    background: var(--success);
    border-color: var(--success);
}

.timeline-item.in-progress::before {
    background: var(--warning);
    border-color: var(--warning);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

.timeline-content {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
}

.timeline-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.timeline-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}
