/* ============================================
   TRANZUP - PROFESSIONAL TRACKING DESIGN
   ============================================ */

/* Import CSS Variables */
:root {
    --tranzup-primary: #1e3a8a;
    --tranzup-secondary: #3b82f6;
    --tranzup-accent: #f59e0b;
    --tranzup-success: #10b981;
    --tranzup-danger: #ef4444;
    --tranzup-dark: #1f2937;
    --tranzup-light: #f3f4f6;
    --white: #ffffff;
    --gray: #6b7280;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* ============================================
   TRACKING PAGE LAYOUT
   ============================================ */

.tracking-page {
    padding: 4rem 0;
    background: #f8fafc;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.tracking-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.75rem;
    color: var(--tranzup-primary);
    letter-spacing: -0.5px;
}

.page-subtitle {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    color: var(--gray);
    font-weight: 500;
}

/* ============================================
   TRACKING FORM (LARGE)
   ============================================ */

.tracking-form-large {
    margin-bottom: 2rem;
}

.tracking-input-group-large {
    display: flex;
    gap: 0.75rem;
    background: var(--white);
    padding: 0.75rem;
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.tracking-input-group-large:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.tracking-input-large {
    flex: 1;
    min-width: 280px;
    padding: 1.25rem 1.5rem;
    border: 2px solid transparent;
    font-size: 1.05rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tracking-input-large:focus {
    outline: none;
    border-color: var(--tranzup-secondary);
    background: #f8fafc;
}

.tracking-input-large::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* ============================================
   TRACKING RESULT - BASIC
   ============================================ */

.tracking-result {
    margin-top: 2rem;
}

.result-card {
    background: var(--white);
    color: var(--dark);
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 3px;
}

.result-card h3 {
    margin-bottom: 0.75rem;
    color: var(--ups-brown);
    font-size: 1.25rem;
}

.result-message {
    color: var(--gray);
}

/* ============================================
   ERROR CARD STYLING
   ============================================ */

.error-card {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
}

.error-card h3 {
    color: #dc2626 !important;
}

.error-card .result-message {
    color: #991b1b !important;
}

/* ============================================
   TRACKING DETAILS - BASIC
   ============================================ */

.tracking-details {
    margin-top: 1.5rem;
}

.tracking-field {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.tracking-field:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.tracking-field strong {
    color: var(--primary-blue);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tracking-field > *:not(strong) {
    color: var(--dark);
    font-size: 1rem;
    line-height: 1.6;
}

.tracking-nested {
    margin-left: 1rem;
    margin-top: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--primary-orange);
}

.tracking-nested-item {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--light-gray);
}

.tracking-nested-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.tracking-nested-item strong {
    color: var(--primary-orange);
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0;
    display: inline;
    margin-right: 0.5rem;
}

/* ============================================
   ENHANCED TRACKING DISPLAY
   ============================================ */

.tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-blue);
}

.tracking-header h3 {
    margin: 0;
    color: var(--primary-blue);
    font-size: 1.5rem;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-delivered {
    background: #10b981;
    color: white;
}

.status-in-transit,
.status-picked-up {
    background: #3b82f6;
    color: white;
}

.status-pending {
    background: #f59e0b;
    color: white;
}

.status-returned {
    background: #ef4444;
    color: white;
}

.tracking-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--light-gray);
    border-radius: 8px;
    border-left: 4px solid var(--primary-orange);
}

.tracking-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-item {
    padding: 0.75rem;
    background: var(--white);
    border-radius: 5px;
    border: 1px solid var(--border);
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item strong {
    color: var(--primary-blue);
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.route-info {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.route-item {
    flex: 1;
    min-width: 200px;
    padding: 1rem;
    background: var(--white);
    border-radius: 5px;
    border: 1px solid var(--border);
}

.route-item strong {
    color: var(--primary-blue);
    display: block;
    margin-bottom: 0.5rem;
}

.status-remarks {
    padding: 1rem;
    background: var(--white);
    border-radius: 5px;
    border-left: 3px solid var(--primary-orange);
    margin-bottom: 0.75rem;
    font-size: 1rem;
    line-height: 1.6;
}

.activity-date {
    font-size: 0.9rem;
    color: var(--gray);
    padding-left: 1rem;
}

.activity-date strong {
    color: var(--primary-blue);
}

.tracking-timeline {
    position: relative;
    padding-left: 2rem;
}

.tracking-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-orange);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -1.5rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--primary-orange);
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--primary-orange);
}

.timeline-content {
    background: var(--white);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.timeline-status {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.timeline-date,
.timeline-receiver,
.timeline-reason {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 0.5rem;
    line-height: 1.5;
}

.timeline-reason {
    font-style: italic;
    color: var(--dark);
}

/* ============================================
   LEOPARDS STYLE TRACKING DESIGN - MODERN
   ============================================ */

.leopards-style {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 0;
    overflow: hidden;
    border: none;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Consignment Number Bar - Modern Gradient */
.consignment-bar {
    background: linear-gradient(135deg, var(--tranzup-primary) 0%, var(--tranzup-secondary) 100%);
    color: var(--white);
    padding: 1.75rem 2.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
    position: relative;
    overflow: hidden;
}

.consignment-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.consignment-bar strong {
    margin-right: 0.75rem;
    font-weight: 700;
    opacity: 0.9;
}

/* ============================================
   PROGRESS BAR - MODERN DESIGN
   ============================================ */

.progress-bar-container {
    background: linear-gradient(to bottom, #fafbfc, #ffffff);
    padding: 2.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.progress-steps-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-step-item {
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
    color: #9ca3af;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    padding-left: 1.75rem;
    position: relative;
    border-radius: 0 8px 8px 0;
}

.progress-step-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: all 0.3s ease;
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px #e5e7eb;
}

.progress-step-item.active {
    color: var(--tranzup-primary);
    font-weight: 700;
    border-left-color: var(--tranzup-secondary);
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08), transparent);
}

.progress-step-item.active::before {
    background: linear-gradient(135deg, var(--tranzup-primary), var(--tranzup-secondary));
    width: 16px;
    height: 16px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.1);
    }
}

/* ============================================
   DELIVERY STATUS SECTION - MODERN
   ============================================ */

.delivery-status {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 2.5rem 2.5rem;
    border-bottom: none;
    border-left: none;
    position: relative;
    overflow: hidden;
}

.delivery-status::before {
    content: '✓';
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 6rem;
    color: rgba(255, 255, 255, 0.1);
    font-weight: bold;
}

.delivery-status h3,
.delivery-status .delivered-title {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.delivery-status p {
    margin: 0.75rem 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.05rem;
    line-height: 1.6;
    font-weight: 500;
}

.delivery-status strong {
    color: var(--white);
    font-weight: 700;
    min-width: 140px;
    display: inline-block;
    opacity: 0.9;
}

/* ============================================
   SHIPMENT DETAIL SECTION - MODERN GRADIENT
   ============================================ */

.shipment-detail-section {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.detail-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: var(--white);
    padding: 1.5rem 2.5rem;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0;
    padding: 0;
}

.detail-item {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    transition: all 0.3s ease;
    background: var(--white);
}

.detail-item:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.03), transparent);
    border-left: 4px solid var(--tranzup-secondary);
    padding-left: 1.75rem;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    color: var(--tranzup-primary);
    display: block;
    min-width: auto;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* ============================================
   SHIPMENT INFORMATION SECTION - MODERN DARK
   ============================================ */

.shipment-info-section {
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.info-header {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: var(--white);
    padding: 1.5rem 2.5rem;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.info-timeline {
    padding: 2.5rem 2rem;
    position: relative;
    background: linear-gradient(to bottom, #fafbfc, #ffffff);
}

.info-timeline-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    position: relative;
    align-items: flex-start;
}

.info-timeline-item:last-child {
    margin-bottom: 0;
}

/* Left Section - Date & Time - Modern Card */
.timeline-left-section {
    min-width: 200px;
    text-align: right;
    padding-right: 1.5rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.timeline-date-display {
    font-size: 1.05rem;
    color: var(--tranzup-dark);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.timeline-time-display {
    font-size: 0.95rem;
    color: var(--tranzup-secondary);
    font-weight: 600;
}

/* Center Line with Dot - Modern Gradient */
.timeline-center-line {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding-top: 1.5rem;
}

.timeline-center-line::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: -2.5rem;
    width: 4px;
    background: linear-gradient(180deg, var(--tranzup-secondary), var(--tranzup-primary));
    transform: translateX(-50%);
    z-index: 1;
    border-radius: 2px;
}

.info-timeline-item:last-child .timeline-center-line::before {
    display: none;
}

.timeline-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--white);
    border: 4px solid #e5e7eb;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.timeline-dot.active {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.15);
    transform: scale(1.3);
    animation: ripple 2s infinite;
}

@keyframes ripple {
    0%, 100% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.15);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(16, 185, 129, 0.05);
    }
}

/* Right Section - Status Content - Modern Card */
.timeline-content-info {
    flex: 1;
    padding: 1.25rem 1.75rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.timeline-content-info:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--tranzup-secondary);
    transform: translateX(5px);
}

.timeline-status-info {
    font-size: 1.1rem;
    color: var(--tranzup-dark);
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 0.3px;
    line-height: 1.5;
}

.timeline-receiver-info,
.timeline-reason-info {
    font-size: 0.95rem;
    color: var(--gray);
    margin-top: 0.5rem;
    line-height: 1.6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-receiver-info::before {
    content: '👤';
    font-size: 1rem;
}

.timeline-reason-info {
    font-style: italic;
    color: #9ca3af;
}

.timeline-reason-info::before {
    content: '📝';
    font-size: 1rem;
}

/* ============================================
   RESPONSIVE DESIGN - TRACKING PAGE
   ============================================ */

/* Tablet and smaller (max-width: 992px) */
@media (max-width: 992px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile and Tablet (max-width: 768px) */
@media (max-width: 768px) {
    /* Tracking Input */
    .tracking-input-group-large {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .tracking-input-large {
        min-width: 100%;
        width: 100%;
    }

    /* Tracking Display Responsive */
    .tracking-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .status-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .route-info {
        flex-direction: column;
        gap: 1rem;
    }

    .tracking-timeline {
        padding-left: 1.5rem;
    }

    .timeline-item {
        padding-left: 1.5rem;
    }

    .tracking-section {
        padding: 1rem;
    }
    
    /* Leopards Style */
    .consignment-bar {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .progress-bar-container {
        padding: 1.5rem 1rem;
    }
    
    .delivery-status {
        padding: 1.5rem 1rem;
    }
    
    .delivery-status h3,
    .delivery-status .delivered-title {
        font-size: 1.5rem;
    }
    
    .detail-header,
    .info-header {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .detail-grid,
    .info-timeline {
        padding: 1.5rem 1rem;
    }
    
    .detail-item strong {
        min-width: 120px;
        font-size: 0.9rem;
    }
    
    /* Timeline Responsive */
    .info-timeline-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .timeline-left-section {
        text-align: left;
        padding-right: 0;
        min-width: auto;
        display: flex;
        gap: 0.5rem;
        align-items: baseline;
    }
    
    .timeline-center-line {
        display: none;
    }
    
    .timeline-content-info {
        padding-left: 0;
        padding-top: 0.5rem;
        border-left: 3px solid #FFD700;
        padding-left: 1rem;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .tracking-page {
        padding: 2rem 0;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .result-card {
        padding: 1.5rem;
    }
    
    .consignment-bar {
        font-size: 0.95rem;
        padding: 0.875rem 1rem;
    }
    
    .progress-step-item {
        font-size: 0.95rem;
        padding: 0.625rem 0.875rem;
    }
    
    .delivery-status h3,
    .delivery-status .delivered-title {
        font-size: 1.25rem;
    }
    
    .delivery-status p {
        font-size: 0.95rem;
    }
    
    .detail-header,
    .info-header {
        font-size: 1rem;
        padding: 0.875rem 1rem;
    }
    
    .detail-item strong {
        min-width: 100px;
        display: block;
        margin-bottom: 0.25rem;
    }
    
    .timeline-status-info {
        font-size: 1rem;
    }
    
    .timeline-date-info {
        font-size: 0.875rem;
    }
}

/* Extra Small Mobile (max-width: 360px) */
@media (max-width: 360px) {
    .page-title {
        font-size: 1.25rem;
    }
    
    .result-card {
        padding: 1.25rem;
    }
    
    .consignment-bar {
        font-size: 0.875rem;
    }
    
    .progress-step-item {
        font-size: 0.875rem;
    }
}
