﻿/* ===============================
   DELIVERY PROGRESS BAR
================================ */

.progress-wrap {
    position: relative;
    width: 100%;
    height: 72px; /* room for dots + truck */
}

/* Progress rail container */
#progressBar {
    position: absolute;
    left: 0;
    right: 0; 
    transform: translateY(-60%);
}
.progress-bg {
    position: absolute;
    inset: 18px 0 18px 0; /* top / right / bottom / left */
    background: linear-gradient(180deg, #f8fafc, #eef2ff);
    border-radius: 18px;
    box-shadow: inset 0 1px 2px rgba(255,255,255,.7), 0 8px 20px rgba(15,23,42,.08);
    z-index: 1;
}
/* Rail */
.progress-wrap .progress {
    height: 16px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

/* Animated fill */
#progressFill,
.delivery-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #6366f1, #8b5cf6);
    background-size: 200% 100%;
    animation: gradientMove 2.5s linear infinite;
    border-radius: inherit;
    transition: width 0.45s ease;
}

@keyframes gradientMove {
    from { background-position: 0% 50%; }
    to   { background-position: 200% 50%; }
}

/* ===============================
   MILESTONES (DOTS)
================================ */

.milestones {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

.milestone-dot {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: #fff;
    border: 3px solid #cfd8e3;
    border-radius: 50%;
    z-index: 6;
}

.milestone-dot.completed {
    background: var(--success);
    border-color: var(--success);
    box-shadow: 0 0 0 4px rgba(34,197,94,.15);
}

    .milestone-dot.current {
        background: var(--secondary);
        border-color: var(--secondary);
        transform: translate(-50%, -50%) scale(1.15);
        box-shadow: 0 0 0 6px rgba(59,130,246,.2);
    }

/* ===============================
   TRUCK ICON
================================ */

#truckIcon {
    position: absolute;
    top: -8px;
    transform: translateX(-50%);
    font-size: 18px;
    color: #2563eb;
    transition: left 0.45s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
    z-index: 10;
}

/* ===============================
   STEP LABELS
================================ */

#milestoneLabels {
    position: relative;
    margin-top: 100px;
}

#milestoneLabels span {
    position: absolute;
    transform: translateX(-50%); 
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

#milestoneLabels span.active {
    color: #2563eb;
}

/* ===============================
   TIMELINE
================================ */
.timeline-wrapper summary {
    list-style: none;
    cursor: pointer;
}

    .timeline-wrapper summary::-webkit-details-marker {
        display: none;
    }

.timeline-header {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s ease;
}

    .timeline-header:hover {
        background: #f1f5f9;
    }

.timeline-toggle .hide-text {
    display: none;
}

.timeline-wrapper[open] .show-text {
    display: none;
}

.timeline-wrapper[open] .hide-text {
    display: inline;
}

.timeline-wrapper[open] .fa-chevron-down {
    transform: rotate(180deg);
}

.timeline-toggle i {
    transition: transform 0.2s ease;
}

.timeline-content {
    animation: fadeSlideIn 0.25s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===============================
   CURRENT TRACKING STATUS
================================ */

.current-status {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 14px;
    border-left: 4px solid #3b82f6;
}

.status-icon {
    font-size: 20px;
    color: #3b82f6;
}

.status-title {
    color: #111827;
}

.status-meta {
    line-height: 1.3;
}



.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    text-align: center;
    animation: fadeInUp 0.3s ease-out;
}

.modal-brand {
    margin-bottom: 12px;
}

.brand-logo {
    max-height: 48px;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.modal-subtitle {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.modal-visual {
    max-width: 220px;
    margin: 12px auto;
    display: block;
}

.modal-text {
    font-size: 0.95rem;
    color: #495057;
    margin-top: 10px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}
 

.btn-primary {
    background: #0d6efd;
    color: #fff;
}

.btn-outline {
    background: #f8f9fa;
    color: #212529;
    border: 1px solid #dee2e6;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.modal-visual {
    width: 220px;
    height: auto;
    margin: 10px auto 6px;
    opacity: 0.95;
}