/*
|--------------------------------------------------------------------------
| FINAL CORRECTED TRACKING PAGE CSS (Fixing All Known Layout and Color Issues)
|--------------------------------------------------------------------------
*/

.tracking-page {
    /* Base Color Variables */
    --primary-color: #0D2C6C;
    --accent-color: #3E8E3E;
    
    /* Global Input/Button Consistency */
    .form-control { height: 50px; }
    .btn-primary { padding: 0.75rem 1rem; }
    .tracking-section {
        background-image: linear-gradient(180deg, #f7f9fc 0%, #ffffff 70%);
    }

    /* --- RADIO BUTTON STYLING (User Provided) --- */
    .radio-inline-track {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 1.5rem;
    }
    .tracking-radio:checked + .form-check-label::after {
        transform: translateY(-50%) scale(1);
    }
    .tracking-radio:checked + .form-check-label::before {
        border-color: #007bff;
    }
}

/* 📦 CARD STYLING */
.tracking-page .tracking-form-slim {
    padding: 1.2rem !important; 
    border-radius: 6px !important; 
    border: 1px solid #e5e5e5 !important; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}
@media (min-width: 992px) {
    .tracking-page .col-lg-5 .tracking-form-slim {
        margin-left: 0 !important;
    }
}

/* Main Header bar */
.tracking-page .tracking-form-slim .card-body > .d-flex.border-bottom {
    margin-bottom: 1rem !important; 
    padding-bottom: 0.5rem !important;
}
.tracking-page .tracking-form-slim .d-flex h4 { font-size: 1.15rem; font-weight: 600; }
.tracking-page .tracking-form-slim .d-flex h5 b { font-size: 1rem; font-weight: 700 !important; color: #333 !important; }

/* Sub-Headings */
.tracking-page .tracking-form-slim h5.mb-3 {
    font-size: 1.05rem; 
    font-weight: 600;
    margin-bottom: 0.6rem !important;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

/* ➡️ SHIPMENT DETAILS (Data List) - Layout Fix */
.tracking-page .tracking-form-slim .list-unstyled li {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    margin-bottom: 0 !important; 
    border-bottom: 1px dashed #eee; 
}
.tracking-page .tracking-form-slim .list-unstyled .text-muted.d-block.small.mb-1 {
    font-size: 0.7rem; 
    font-weight: 400; 
    text-transform: capitalize; 
    color: #777;
    margin-bottom: 0.1rem !important;
}
.tracking-page .tracking-form-slim .list-unstyled b.d-block {
    font-size: 0.85rem; 
    font-weight: 600 !important;
}


/* ⬅️ SHIPPING HISTORY: TIMELINE FIXES */

/* Adjust Column Padding */
.tracking-page .tracking-form-slim .col-md-6.border-end {
    padding-left: 1.2rem !important; 
    padding-right: 1.25rem !important;
    border-right: 1px solid #f0f0f0 !important;
}

/* Timeline Container */
.tracking-page .tracking-timeline {
    position: relative;
    padding-left: 25px !important; 
    margin: 15px 0;
}

/* Vertical Line */
.tracking-page .tracking-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 8px; 
    width: 2px;
    background-color: #e0e0e0;
    z-index: 0;
}

/* Timeline Item (Core Fixes for alignment and margin) */
.tracking-page .tracking-form-slim .timeline-item {
    position: relative;
    margin-bottom: 0.8rem !important; 
    padding-left: 20px; /* Space between dot and content */
    display: flex !important; /* Forces the content row to align */
    align-items: flex-start;
}

/* Timeline Marker (Dot) - FIXING VISIBILITY & POSITION */
.tracking-page .timeline-marker {
    position: absolute;
    top: 0; 
    left: 0;
    width: 14px; 
    height: 14px; 
    border-radius: 50%;
    border: 2px solid #fff; 
    z-index: 10; 
    /* Dynamic background-color is set by PHP */
}

/* Timeline Content */
.tracking-page .timeline-content {
    flex-grow: 1;
    /* Removed padding-left from content as it's handled by .timeline-item */
    padding-left: 0; 
}

/* Timeline Header (Date/Time Row) - CRITICAL FLEX ALIGNMENT FIX */
.tracking-page .timeline-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.1rem !important; 
    width: 100%;
}

/* Date and Time Text */
.tracking-page .timeline-date, .tracking-page .timeline-time {
    color: #6c757d;
    font-size: 0.75rem !important; 
    white-space: nowrap;
}

/* Status Text */
.tracking-page .timeline-status {
    margin-top: 0;
    margin-bottom: 0.1rem !important; 
    font-size: 0.85rem; 
    font-weight: 700 !important; 
    max-width: 60%; 
}

/* Location/Comment Text */
.tracking-page .timeline-location, .tracking-page .timeline-comment {
    margin-bottom: 0;
    line-height: 1.2;
    font-size: 0.75rem !important;
    color: #666;
}
.btn.btn-sm {
    padding: 7px 16px !important;
    font-size: 10px !important;
}

.btn-secondary{
        background-color: #5a6d90 !important;
    border: 1px solid #5a6d90 !important;
    color: #ffffff !important;
    box-shadow: 0 3px 5px 0 rgba(90, 109, 144, 0.1);

}