/* Add this to your existing CSS file or create a new one */

.tracking-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.tracking-header h1 {
    font-size: 24px;
    color: #333;
}

.tracking-header .print-invoice {
    text-decoration: none;
    background-color: #007bff;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 12px;
}

.tracking-id {
    font-size: 12px;
    margin-bottom: 30px;
}

.tracking-id strong {
    color: #555;
}

.tracking-id .number {
    color: #d9534f;
    font-weight: bold;
}

.timeline {
    list-style-type: none;
    padding-left: 0;
}

.timeline li {
    display: flex;
    margin-bottom: 30px;
    position: relative;
}

.timeline .timeline-date {
    flex-basis: 150px;
    text-align: right;
    padding-right: 20px;
    position: relative;
}

.timeline .timeline-date strong {
    font-size: 12px;
    display: block;
    font-weight: bold;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    background-color: #007bff;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px #007bff;
    position: relative;
    top: 5px;
    margin: 0 20px;
}

.timeline li:last-child .timeline-content {
    border-left: 2px solid transparent; /* Hide line for last item */
}

.timeline .timeline-content {
    flex-grow: 1;
    padding-left: 20px;
    border-left: 2px solid #ddd;
    position: relative;
    top: -5px;
}
.timeline-content strong {
    font-size: 12px;
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.timeline-content .location {
    font-style: italic;
    color: #666;
    margin-bottom: 5px;
}

.timeline-content .status {
    background-color: #28a745;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-block;
}

/* Add a vertical line connecting the dots */
.timeline li:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 178px; /* Adjust based on timeline-date width + dot margin */
    top: 25px;
    bottom: -25px;
    width: 2px;
    background-color: #ddd;
}

.tracking-body {
    display: flex;
    gap: 20px;
}

.tracking-main-content {
    flex: 2; /* Takes up 2/3 of the space */
}

.tracking-sidebar {
    flex: 1; /* Takes up 1/3 of the space */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.details-card, .map-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.details-card h3, .map-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.shipment-image {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 15px;
}
.details-card table {
    width: 100%;
    border-collapse: collapse;
}

.details-card th, .details-card td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.details-card th {
    width: 40%;
    font-weight: bold;
    color: #555;
}
.map-card #map {
    width: 100%;
    height: 400px;
    border-radius: 5px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .tracking-body {
        flex-direction: column;
    }

    .timeline li::before {
        left: 178px; /* Adjust if necessary */
    }
}

@media (max-width: 480px) {
    .timeline .timeline-date {
        flex-basis: 100px;
    }

    .timeline li::before {
        left: 128px; /* Adjust for smaller date width */
    }
}
