/* Order Tracking Page Styles */
#zapvi-tracking-container {
    max-width: 900px;
    margin: 40px auto;
    font-family: 'Inter', sans-serif;
    color: #333;
}

#tracking-form-wrapper {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
}

#tracking-form-wrapper h3 {
    margin-bottom: 25px;
    font-weight: 700;
    color: #000;
    text-align: center;
    font-size: 28px;
}

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #e63946;
    outline: none;
}

#submit-tracking {
    background: #000;
    color: #fff;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

#submit-tracking:hover {
    background: #333;
}

/* Tracking Result Styles */
.tracking-result-box {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-top: 30px;
}

.tracking-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
}

.billing-shipping h4 {
    color: #1a1a1b;
    font-weight: 700;
    margin-bottom: 15px;
}

.address-details {
    line-height: 1.6;
    color: #555;
    font-size: 15px;
}

.order-meta-info p {
    margin: 5px 0;
    font-size: 15px;
}

.color-red {
    color: #e63946;
}

.order-meta-info h4 {
    color: #1a1a1b;
    font-weight: 700;
    margin-bottom: 15px;
}

.meta-label {
    display: inline-block;
    min-width: 100px;
    font-weight: 600;
    color: #555;
}

.download-pdf {
    color: #e63946;
    text-decoration: underline;
    font-size: 13px;
    margin-left: 10px;
}

/* Timeline */
.tracking-timeline-section {
    /* padding: 40px 0; */
    text-align: center;
}

.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto 50px;
}

.timeline-line {
    position: absolute;
    top: 43px;
    left: 12.5%;  /* Center of first item (25%/2) */
    right: 12.5%; /* Center of last item (25%/2) */
    height: 3px;
    background: #e9ecef;
    z-index: 1;
}

.timeline-line-progress {
    position: absolute; /* Relative to timeline-line */
    top: 0;
    left: 0;
    height: 100%;
    /* Width set via inline style */
    background: #ff4d4d;
    transition: width 1s ease-in-out;
}

.timeline-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.step-label {
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 600;
    color: #999;
}

.step.completed .step-label {
    color: #ff4d4d;
}

.step-dot {
    width: 14px;
    height: 14px;
    background: #f1f1f1;
    border-radius: 50%;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.step.completed .step-dot {
    background: #ff4d4d;
}

.step.active .step-dot {
    width: 20px;
    height: 20px;
    margin-top: -3px;
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.5);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(230, 57, 70, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
}

.step-time {
    font-size: 11px;
    color: #888;
    line-height: 1.4;
    max-width: 100px;
}

.package-status-msg {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    margin: 30px auto;
    font-size: 14px;
    color: #0066cc;
    max-width: 800px;
}

.tracking-actions {
    margin: 40px 0;
}

.show-more-details {
    background: #ff4d4d;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 77, 77, 0.3);
    margin-bottom: 20px;
}

.courier-name {
    font-size: 13px;
    color: #888;
    margin-bottom: 15px;
}

.tracking-id-info {
    font-size: 14px;
    font-weight: 700;
}

.tracking-number {
    color: #ff4d4d;
    font-size: 24px;
    margin-top: 5px;
    text-decoration: underline;
}

/* Items Table */
.order-items-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 40px;
}

.order-items-table th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid #e63946;
    font-size: 14px;
    color: #111;
}

.order-items-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.order-items-table th:nth-child(1), .order-items-table td:nth-child(1) { width: 40px; }
.order-items-table th:nth-child(3), .order-items-table td:nth-child(3) { text-align: right; }
.order-items-table th:nth-child(4), .order-items-table td:nth-child(4) { text-align: center; }
.order-items-table th:nth-child(5), .order-items-table td:nth-child(5) { text-align: right; }

.order-items-table tfoot td {
    padding-top: 25px;
}

/* Follow Us */
.follow-us {
    text-align: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.follow-us h3 {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 2px;
    color: #888;
    margin-bottom: 20px;
    background: #fff;
    display: inline-block;
    padding: 0 20px;
    position: relative;
    top: -52px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    transition: opacity 0.3s;
}

.social-icons a.facebook { background: #3b5998; }
.social-icons a.instagram { background: #e1306c; }
.social-icons a.twitter { background: #1da1f2; }
.social-icons a.email { background: #dd4b39; }
.social-icons a.linkedin { background: #0077b5; }
.social-icons a.youtube { background: #ff0000; }

.social-icons a:hover { opacity: 0.8; }

/* Responsive */
@media (max-width: 768px) {
    * {
        box-sizing: border-box;
    }

    #zapvi-tracking-container {
        padding: 0 15px;
        margin: 20px auto;
        overflow-x: hidden; /* Prevent page scroll */
        width: 100%;
    }

    .tracking-result-box {
        padding: 20px;
    }

    .tracking-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .order-meta-info {
        text-align: center;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #eee;
    }

    /* Horizontal Scroll Timeline for Mobile */
    .tracking-timeline-section {
        display: block;
        width: 100%;
        max-width: 100%;
        /* overflow-x: auto;  REMOVED from here */
        /* padding-bottom: 20px; */
    }

    .timeline-scroll-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        padding-bottom: 10px;
    }

    .timeline-container {
        min-width: 600px;
        width: max-content; /* Allow it to grow if text is long */
        margin: 0 auto;
        padding: 0 40px; /* Add padding to ends so dots aren't edge-to-edge if tight */
    }

    /* Reset vertical styles just in case, or simply don't include them from previous step */
    /* Ensure label/time don't wrap weirdly */
    .step-label {
        white-space: nowrap;
    }
    
    .step-time {
        max-width: none;
    }

    /* Responsive Table */
    .order-items-table {
        overflow-x: auto;
    }
    
    .order-items-table table {
        min-width: 500px; /* Ensure table doesn't squish too much */
    }

    /* Stack Order Meta on Mobile */
    .meta-label, .meta-value {
        display: block;
        margin-bottom: 2px;
    }
    
    .order-meta-row {
        margin-bottom: 15px !important;
    }
    
    .download-pdf {
        display: block;
        margin-left: 0;
        margin-top: 5px;
    }
}

/* Loading Screen */
#zapvi-loading-screen {
    text-align: center;
    padding: 40px 20px;
}

.loader-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #ff4d4d;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.loader-subtext {
    font-size: 14px;
    color: #888;
}
