/* ================================================
   Job Tracking Pages CSS
   For both tracking index (search) and show (results) pages
   ================================================ */

/* Global Styles */
* {
    font-family: 'Montserrat', sans-serif;
}

/* ================================================
   INDEX PAGE (Search Form) Styles
   ================================================ */
.tracking-page-index body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 2rem 1rem;
}

.tracking-card {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 100%;
    padding: 3rem;
}

.tracking-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tracking-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.tracking-header p {
    color: #64748b;
    font-size: 1rem;
}

.tracking-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.tracking-icon i {
    font-size: 2.5rem;
    color: white;
}

.tracking-page-index .form-control {
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 1rem;
}

.tracking-page-index .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.tracking-page-index .form-label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

.btn-track {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0.875rem;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 0.75rem;
    color: white;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-track:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

.tracking-page-index .alert {
    border-radius: 0.75rem;
    border: none;
}

.help-text {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.5rem;
}

.back-link {
    text-align: center;
    margin-top: 2rem;
}

.back-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.back-link a:hover {
    text-decoration: underline;
}

/* ================================================
   SHOW PAGE (Results/Status) Styles
   ================================================ */
.tracking-page-show body {
    background: #f8f9fa;
    padding: 2rem 0;
}

.tracker-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0 2rem;
    margin-bottom: 2rem;
}

.tracker-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.job-info-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.job-info-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #64748b;
}

.info-value {
    font-weight: 500;
    color: #1e293b;
}

/* Progress Tracker */
.progress-tracker {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.progress-tracker h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2rem;
    text-align: center;
}

.tracker-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 2rem 0;
}

.tracker-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.step-icon.completed {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(72, 187, 120, 0.4);
}

.step-icon.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    animation: pulse 2s infinite;
}

.step-icon.pending {
    background: #e2e8f0;
    color: #94a3b8;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.step-label {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.step-description {
    font-size: 0.875rem;
    color: #64748b;
}

.step-time {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.1rem;
}

/* Progress Line */
.tracker-steps::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 10%;
    right: 10%;
    height: 4px;
    background: #e2e8f0;
    z-index: 1;
}

.progress-line {
    position: absolute;
    top: 40px;
    left: 10%;
    height: 4px;
    background: linear-gradient(90deg, #48bb78 0%, #38a169 100%);
    z-index: 1;
    transition: width 1s ease;
    max-width: 80%; /* Limit to grey line width (10% to 90%) */
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.in_progress {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.completed {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.delivered {
    background: #e9d5ff;
    color: #581c87;
}

/* Details Section */
.details-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.details-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.btn-track-again {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-track-again:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tracker-steps {
        flex-direction: column;
        align-items: center;
    }
    
    .tracker-step {
        margin-bottom: 2rem;
    }
    
    .tracker-steps::before {
        display: none;
    }
    
    .progress-line {
        display: none;
    }
    
    .tracking-card {
        padding: 2rem;
    }
    
    .info-row {
        flex-direction: column;
        gap: 0.5rem;
    }
}
