/* Tracker Page Styles */
body {
    background-color: #f0f2f5;
    padding-top: 100px; /* prevent overlap with fixed-top navbar */
}

/* Fix conflicts from global styles.css that target .card and .card-title */
.tracker-container {
    display: block !important; /* undo global .card flex centering */
    max-width: 100% !important; /* ensure full width in container */
}

.tracker-container .card-title {
    position: static !important; /* prevent absolute positioning overlay */
    color: #182848 !important;   /* page theme color */
    background: transparent !important;
    left: auto;
    top: auto;
    padding: 0;
}

.tracker-container {
    box-shadow: 0 6px 20px rgba(0,0,0,0.07);
    border: none;
}

.order-details {
    text-align: center;
    margin-bottom: 2rem;
}

.order-details h2 {
    color: #182848;
}

.restaurant-name {
    font-size: 1.1rem;
    color: #555;
    font-weight: 500;
}

.order-details p {
    color: #555;
}

/* Status Timeline */
.status-timeline {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    position: relative;
}

.status-timeline::before {
    content: '';
    position: absolute;
    top: 8px; /* (dot height / 2) - (bar height / 2) */
    left: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background-color: #e0e0e0;
    z-index: 0;
}

.progress-bar {
    position: absolute;
    top: 8px; /* (dot height / 2) - (bar height / 2) */
    left: 0; /* Will be set by JS */
    height: 4px;
    background-color: #182848;
    transition: width 0.4s ease, left 0.4s ease;
    z-index: 1;
}

.status-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2; /* Ensure dots are above the progress bar */
    padding: 0 0.4rem;
}

.status-step .dot {
    width: 20px;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    transition: background-color 0.4s ease;
    border: 4px solid #fff;
    box-sizing: border-box;
}

.status-step p {
    margin: 0;
    font-weight: 500;
    color: #777;
    transition: color 0.4s ease;
}

/* Add a glow to the active dot for better visibility */
.status-step.active .dot {
    background-color: #182848;
    box-shadow: 0 0 10px rgba(24, 40, 72, 0.5);
}

.status-step.active p {
    color: #182848;
}

/* Map Container */
.map-container {
    margin-bottom: 2rem;
}

/* Delivery Person Info */
.delivery-person-info h3 {
    color: #182848;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.avatar svg {
    width: 50px;
    height: 50px;
    fill: #182848;
}

.info p {
    margin: 0.4rem 0;
    color: #555;
}

.info a {
    color: #182848;
    text-decoration: none;
    font-weight: 500;
}

.info a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .status-step p {
        font-size: 0.8rem; /* Smaller text on mobile */
    }

    .status-step {
        padding: 0 0.3rem;
    }
}

@media (max-width: 576px) {
    .card-title {
        font-size: 1.25rem;
    }

    .restaurant-name {
        display: block;
        font-size: 1rem;
        margin-top: 5px;
    }

}
