/* ========================================
   TRACK AND TRACE SECTION STYLES
   ======================================== */

/* Page Title Section */
.page-title {
    background-size: cover;
    background-position: center;
    padding: 80px 0;
    position: relative;
    color: white;
    text-align: center;
}

.page-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.page-title .title-outer {
    position: relative;
    z-index: 1;
}

.page-title .title {
    font-size: 48px;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Track Section Container */
.track-section {
    background: white;
    padding: 50px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

/* Sec Title Two */
.sec-title-two {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f4a400;
}

.sec-title-two h2 {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 15px 0;
}

.sec-title-two h2 span {
    color: #f4a400;
}

.sec-title-two .separater {
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #f4a400, #ff6b00);
    margin: 15px auto 0;
    border-radius: 3px;
}

/* Track Form Styles */
.track-form-two {
    margin-bottom: 40px;
}

.track-form-two .form-group {
    margin-bottom: 20px;
}

.track-form-two label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.track-form-two input[type="text"] {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
}

.track-form-two input[type="text"]:focus {
    border-color: #f4a400;
    outline: none;
    box-shadow: 0 0 8px rgba(244, 164, 0, 0.2);
}

.track-form-two input[type="text"]::placeholder {
    color: #999;
}

.track-form-two .theme-btn {
    width: 100%;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #f4a400, #ff6b00);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.track-form-two .theme-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(244, 164, 0, 0.3);
    background: linear-gradient(135deg, #ff6b00, #f4a400);
}

/* Tracking Info Detail */
.tracking-info-detail {
    margin: 40px 0;
    padding: 40px;
    background: white;
    border-radius: 8px;
    border-left: 6px solid #f4a400;
}

.tracking-box {
    display: block;
    padding: 20px 0 20px 50px;
    margin-bottom: 5px;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
    position: relative;
}

.tracking-box:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 45px;
    width: 2px;
    height: 100%;
    background: #f4a400;
}

.tracking-time-box {
    min-width: auto;
    padding-right: 0;
    border-right: none;
    margin-bottom: 8px;
}

.tracking-time {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.tracking-time-box span {
    font-size: 12px;
    color: #999;
    display: block;
}

.tracking-location {
    flex: none;
    padding-left: 0;
    position: relative;
}

.tracking-location .dott {
    position: absolute;
    left: -42px;
    top: 0;
    width: 16px;
    height: 16px;
    background: #f4a400;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #f4a400;
}

.tracking-location strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.tracking-location {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* Status Styles */
.tracking-location.style-two .dott,
.tracking-location.style-two strong {
    color: #1abc9c;
}

.tracking-location.style-3 .dott,
.tracking-location.style-3 strong {
    color: #3498db;
}

.tracking-location.style-4 .dott,
.tracking-location.style-4 strong {
    color: #f39c12;
}

.tracking-location.style-5 .dott,
.tracking-location.style-5 strong {
    color: #27ae60;
}

.tracking-location.style-6 .dott,
.tracking-location.style-6 strong {
    color: #e74c3c;
}

.tracking-location.style-7 .dott,
.tracking-location.style-7 strong {
    color: #9b59b6;
}

/* Shipment Details Container */
.container {
    margin: 40px 0;
}

.container center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container center img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

.container center p {
    font-weight: 600;
    font-size: 18px;
    color: #1a1a1a;
}

/* Grid Layouts */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.grid article {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.grid article:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: #f4a400;
}

.grid article h5 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 15px 0;
}

.grid article hr {
    border: none;
    border-top: 2px solid #f4a400;
    margin: 10px 0 15px 0;
}

.grid article ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.grid article li {
    padding: 8px 0;
    color: #666;
    border-bottom: 1px solid #eee;
}

.grid article li:last-child {
    border-bottom: none;
}

.grid-two {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.grid-two article {
    background: transparent;
    padding: 15px 0;
    border-radius: 0;
    border: none;
}

.grid-two article b {
    color: #1a1a1a;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.grid-two article p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Status Badge */
.container > div:first-of-type {
    background: linear-gradient(135deg, #f4a400, #ff6b00);
    color: white;
    padding: 15px;
    font-size: 14px;
    text-align: center;
    border-radius: 5px;
    font-weight: 600;
    margin: 20px 0;
}

/* Package Image Section */
.container > div:nth-of-type(2) {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

.container > div:nth-of-type(2) > div {
    background: linear-gradient(135deg, #666, #333);
    color: white;
    padding: 15px;
    font-size: 14px;
    text-align: center;
    border-radius: 5px;
    font-weight: 600;
    margin-bottom: 20px;
}

.container > div:nth-of-type(2) img {
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Live Location Map */
.map {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Print Receipt Button */
.container center a.btn {
    background: linear-gradient(135deg, #f4a400, #ff6b00);
    color: white !important;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 20px;
}

.container center a.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(244, 164, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-title .title {
        font-size: 32px;
    }

    .sec-title-two h2 {
        font-size: 28px;
    }

    .track-section {
        padding: 30px 20px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tracking-box {
        flex-direction: column;
    }

    .tracking-time-box {
        border-right: none;
        border-bottom: 2px solid #ddd;
        padding-right: 0;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }

    .tracking-location {
        padding-left: 0;
    }

    .tracking-location .dott {
        left: 0;
        top: 0;
    }

    .grid-two {
        grid-template-columns: 1fr;
    }

    .container center img {
        max-width: 300px;
    }

    .container > div:nth-of-type(2) img {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .page-title {
        padding: 50px 0;
    }

    .page-title .title {
        font-size: 24px;
    }

    .sec-title-two h2 {
        font-size: 22px;
    }

    .track-section {
        padding: 20px 15px;
    }

    .track-form-two input[type="text"],
    .track-form-two .theme-btn {
        font-size: 14px;
        padding: 12px 15px;
    }

    .grid article h5 {
        font-size: 16px;
    }

    .grid article {
        padding: 20px 15px;
    }

    .grid-two article {
        padding: 15px;
    }

    .container center img {
        max-width: 250px;
    }
}

/* Timeline markers: unique outlined ring with colored center */
.tracking-location {
    /* default color for markers/text; specific statuses override this */
}

.tracking-location .dott {
    display: block;
    position: absolute;
    left: -42px;
    top: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: transparent;
    border: 3px solid currentColor;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.03);
}

.tracking-location .dott::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* Status color mapping (applies to marker ring and label) */
.tracking-location.style-two { color: #1abc9c; }
.tracking-location.style-3  { color: #3498db; }
.tracking-location.style-4  { color: #f39c12; }
.tracking-location.style-5  { color: #27ae60; }
.tracking-location.style-6  { color: #e74c3c; }
.tracking-location.style-7  { color: #fff; }

/* On hold status - red background with white text to highlight the label */
.tracking-location.style-7 strong {
    background-color: #e74c3c !important;
    color: #fff !important;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 4px;
    display: inline-block;
}

/* Adjust left padding so content aligns with the markers */
.tracking-box {
    padding-left: 36px;
}

/* Sections style: remove the vertical connector line and present each update as its own card */
.tracking-box:not(:last-child)::before,
.tracking-box::before {
    display: none !important;
}

.tracking-info-detail {
    border-left: none !important;
    padding-left: 0 !important;
}

.tracking-box {
    background: #ffffff !important;
    border-radius: 8px !important;
    padding: 18px 20px 18px 60px !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06) !important;
    margin-bottom: 18px !important;
    position: relative !important;
}

/* --- Timeline vertical line and event icon style --- */
.tracking-timeline {
    position: relative;
    margin: 0;
    padding: 0;
}

.tracking-box {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 18px 20px 18px 56px !important;
    margin-bottom: 24px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

/* Vertical line */
.tracking-timeline::before {
    content: '';
    position: absolute;
    left: 28px;
    top: 0;
    width: 2px;
    height: 100%;
    background: #e0e0e0;
    z-index: 0;
}

/* Event icon */
.tracking-event-icon {
    position: absolute;
    left: 16px;
    top: 24px;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    border: 2px solid #2196f3;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    font-size: 16px;
    color: #2196f3;
    box-shadow: 0 2px 8px rgba(33,150,243,0.08);
}

/* Highlight most recent event */
.tracking-box.latest .tracking-event-icon {
    border-color: #ff9800;
    color: #ff9800;
}
.tracking-box.latest {
    border: 2px solid #ff9800;
    background: #fffbe7;
}

/* Date/time and status text */
.tracking-time {
    font-weight: 600;
    color: #222;
    font-size: 15px;
}
.tracking-status {
    color: #666;
    font-size: 14px;
    margin-top: 2px;
}

/* Remove old marker styles */
.tracking-location .dott,
.tracking-location .dott::after {
    display: none !important;
}
