/* =========================================================
   HORIZON SHIPMENT MANAGER
   COMPLETE PUBLIC TRACKING RESPONSIVE CSS
========================================================= */

.hbsm-public-tracking {
    width: 100%;
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
    box-sizing: border-box;
    overflow: visible;
}

.hbsm-public-tracking *,
.hbsm-public-tracking *::before,
.hbsm-public-tracking *::after {
    box-sizing: border-box;
}

.hbsm-public-tracking img,
.hbsm-public-tracking iframe {
    max-width: 100%;
}

/* =========================================================
   SEARCH
========================================================= */

.hbsm-tracking-search {
    width: 100%;
    background: #fff;
    border-radius: 14px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,.08);
    text-align: center;
}

.hbsm-tracking-heading h1 {
    margin: 0 0 10px;
    font-size: 34px;
    line-height: 1.2;
}

.hbsm-tracking-heading p {
    margin: 0 0 25px;
    color: #666;
    line-height: 1.6;
}

.hbsm-search-form {
    display: flex;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    gap: 10px;
}

.hbsm-search-form input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid #d9d9d9;
    border-radius: 7px;
    font-size: 16px;
}

.hbsm-search-form button {
    flex: 0 0 auto;
    height: 52px;
    padding: 0 25px;
    border: 0;
    border-radius: 7px;
    background: #1d4ed8;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

/* =========================================================
   RESULT
========================================================= */

.hbsm-tracking-result {
    width: 100%;
    max-width: 100%;
    background: #fff;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,.08);
    overflow: visible;
}

.hbsm-label {
    display: block;
    color: #777;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 7px;
}

.hbsm-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 15px;
    margin: 25px 0;
}

.hbsm-summary-card {
    min-width: 0;
    background: #f7f8fa;
    padding: 20px;
    border-radius: 10px;
    overflow-wrap: anywhere;
}

.hbsm-summary-card strong {
    display: block;
    font-size: 16px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

/* =========================================================
   STATUS HERO
========================================================= */

.hbsm-status-hero {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.hbsm-status-hero-main {
    flex: 1 1 auto;
    min-width: 0;
}

.hbsm-status-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #64748b;
    margin-bottom: 8px;
}

.hbsm-status-hero h2 {
    margin: 0;
    font-size: 32px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.hbsm-status-location {
    margin: 12px 0 0;
    color: #475569;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.hbsm-status-hero-delivery {
    flex: 0 0 190px;
    min-width: 0;
    padding-left: 30px;
    border-left: 1px solid #dbe1e8;
}

.hbsm-status-hero-delivery strong {
    display: block;
    font-size: 19px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.hbsm-status-hero.status-delivered {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.hbsm-status-hero.status-delivered h2 {
    color: #15803d;
}

.hbsm-status-hero.status-in-transit,
.hbsm-status-hero.status-picked-up {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.hbsm-status-hero.status-in-transit h2,
.hbsm-status-hero.status-picked-up h2 {
    color: #1d4ed8;
}

.hbsm-status-hero.status-out-for-delivery {
    border-color: #fde68a;
    background: #fffbeb;
}

.hbsm-status-hero.status-out-for-delivery h2 {
    color: #b45309;
}

.hbsm-status-hero.status-on-hold,
.hbsm-status-hero.status-delayed {
    border-color: #fecaca;
    background: #fef2f2;
}

.hbsm-status-hero.status-on-hold h2,
.hbsm-status-hero.status-delayed h2 {
    color: #b91c1c;
}

/* =========================================================
   TRACKING NUMBER
========================================================= */

.hbsm-tracking-number-card {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 22px 25px;
    margin-bottom: 25px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.hbsm-tracking-number-card > div {
    min-width: 0;
}

.hbsm-tracking-number-card strong {
    display: block;
    font-size: 20px;
    letter-spacing: .3px;
    overflow-wrap: anywhere;
}

.hbsm-last-update {
    text-align: right;
}

.hbsm-last-update strong {
    font-size: 15px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* =========================================================
   PROGRESS
========================================================= */

.hbsm-progress-section {
    width: 100%;
    margin: 30px 0;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
}

.hbsm-progress-section h2 {
    margin: 0 0 30px;
}

.hbsm-progress {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    width: 100%;
}

.hbsm-progress::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 8%;
    right: 8%;
    height: 3px;
    background: #dfe5ec;
    z-index: 0;
}

.hbsm-progress-step {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 20%;
    min-width: 0;
}

.hbsm-progress-circle {
    width: 36px;
    height: 36px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: #dfe5ec;
    color: #667085;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    border: 4px solid #f8fafc;
}

.hbsm-progress-step span {
    display: block;
    font-size: 13px;
    color: #667085;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.hbsm-progress-step.completed .hbsm-progress-circle {
    background: #16a34a;
    color: #fff;
}

.hbsm-progress-step.completed span {
    color: #16a34a;
}

.hbsm-progress-step.current .hbsm-progress-circle {
    background: #1d4ed8;
    color: #fff;
    box-shadow: 0 0 0 5px rgba(29,78,216,.12);
}

.hbsm-progress-step.current span {
    color: #1d4ed8;
}

/* =========================================================
   ROUTE
========================================================= */

.hbsm-route-card {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    margin: 25px 0;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.hbsm-route-point {
    flex: 1 1 auto;
    min-width: 0;
}

.hbsm-route-label {
    display: block;
    color: #777;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.hbsm-route-point strong {
    display: block;
    font-size: 17px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.hbsm-route-line {
    flex: 0 0 100px;
    height: 2px;
    background: #d9e2f2;
    position: relative;
    text-align: center;
}

.hbsm-route-line span {
    position: relative;
    top: -14px;
    background: #fff;
    padding: 0 10px;
    font-size: 20px;
}


/* =========================================================
   TIMELINE
========================================================= */

.hbsm-public-timeline {
    width: 100%;
    margin-top: 35px;
    border-top: 1px solid #eee;
    padding-top: 25px;
}

.hbsm-public-timeline h2 {
    margin: 0 0 20px;
}

.hbsm-timeline {
    position: relative;
    margin-left: 12px;
    padding-left: 35px;
    border-left: 2px solid #d9e2f2;
}

.hbsm-timeline-event {
    position: relative;
    margin-bottom: 30px;
}

.hbsm-timeline-dot {
    position: absolute;
    left: -48px;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1d4ed8;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.hbsm-timeline-content {
    width: 100%;
    background: #f8fafc;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 3px 12px rgba(15,23,42,.04);
    overflow-wrap: anywhere;
}

.hbsm-timeline-content h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.hbsm-timeline-content p {
    margin: 8px 0;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.hbsm-event-location {
    font-weight: 600;
    color: #475569;
}

.hbsm-timeline-content time {
    display: block;
    color: #777;
    font-size: 13px;
    margin-top: 10px;
}

/* =========================================================
   NOT FOUND
========================================================= */

.hbsm-not-found {
    width: 100%;
    background: #fff;
    padding: 50px 30px;
    text-align: center;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,.08);
}

.hbsm-not-found-icon {
    margin: 0 auto 15px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .hbsm-public-tracking {
        padding: 15px;
    }

    .hbsm-tracking-search {
        padding: 30px 25px;
    }

    .hbsm-tracking-result {
        padding: 25px;
    }

    .hbsm-summary-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .hbsm-status-hero {
        gap: 20px;
    }

}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .hbsm-public-tracking {
        width: 100%;
        max-width: 100%;
        margin: 15px auto;
        padding: 8px;
        overflow-x: hidden;
    }

    .hbsm-tracking-search {
        width: 100%;
        padding: 25px 16px;
        margin-bottom: 18px;
        border-radius: 12px;
    }

    .hbsm-tracking-heading h1 {
        font-size: 26px;
        line-height: 1.25;
    }

    .hbsm-tracking-heading p {
        font-size: 14px;
        line-height: 1.55;
        margin-bottom: 20px;
    }

    .hbsm-search-form {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .hbsm-search-form input,
    .hbsm-search-form button {
        width: 100%;
        max-width: 100%;
        flex: none;
        height: 52px;
    }

    .hbsm-tracking-result {
        width: 100%;
        padding: 14px;
        border-radius: 12px;
        overflow: visible;
    }

    /* Status */

    .hbsm-status-hero {
        display: block;
        width: 100%;
        padding: 20px 16px;
        margin-bottom: 15px;
        border-radius: 11px;
    }

    .hbsm-status-hero h2 {
        font-size: 25px;
    }

    .hbsm-status-label {
        font-size: 10px;
    }

    .hbsm-status-location {
        font-size: 14px;
    }

    .hbsm-status-hero-delivery {
        width: 100%;
        min-width: 0;
        margin-top: 20px;
        padding: 16px 0 0;
        border-left: 0;
        border-top: 1px solid #dbe1e8;
    }

    .hbsm-status-hero-delivery strong {
        font-size: 17px;
    }

    /* Tracking number */

    .hbsm-tracking-number-card {
        display: block;
        width: 100%;
        padding: 17px;
        margin-bottom: 18px;
    }

    .hbsm-tracking-number-card strong {
        font-size: 18px;
    }

    .hbsm-last-update {
        width: 100%;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid #eee;
        text-align: left;
    }

    /* Summary */

    .hbsm-summary-grid {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 18px 0;
    }

    .hbsm-summary-card {
        width: 100%;
        padding: 16px;
    }

    /* Progress */

    .hbsm-progress-section {
        width: 100%;
        margin: 20px 0;
        padding: 18px 12px;
        border-radius: 10px;
        overflow: hidden;
    }

    .hbsm-progress-section h2 {
        font-size: 21px;
        margin-bottom: 22px;
    }

    .hbsm-progress {
        display: block;
        width: 100%;
        padding-left: 45px;
    }

    .hbsm-progress::before {
        top: 18px;
        bottom: 18px;
        left: 17px;
        right: auto;
        width: 3px;
        height: auto;
    }

    .hbsm-progress-step {
        width: 100%;
        min-height: 68px;
        display: flex;
        align-items: center;
        text-align: left;
    }

    .hbsm-progress-circle {
        flex: 0 0 36px;
        margin: 0 14px 0 -45px;
    }

    .hbsm-progress-step span {
        font-size: 14px;
        line-height: 1.3;
    }

    /* Route */

    .hbsm-route-card {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 18px;
        margin: 18px 0;
    }

    .hbsm-route-point {
        width: 100%;
    }

    .hbsm-route-point strong {
        font-size: 16px;
    }

    .hbsm-route-line {
        width: 2px;
        height: 34px;
        flex: none;
        margin: 0 auto;
    }

    .hbsm-route-line span {
        top: 5px;
    }

    /* Map section remains contained.
       Mobile map sizing itself is intentionally not
       used to solve the separate map-rendering issue. */
.hbsm-map-header h2 {
        font-size: 21px;
    }

    .hbsm-map-header p {
        font-size: 13px;
    }

    /* Timeline */

    .hbsm-public-timeline {
        width: 100%;
        margin-top: 25px;
        padding-top: 20px;
    }

    .hbsm-public-timeline h2 {
        font-size: 22px;
    }

    .hbsm-timeline {
        margin-left: 7px;
        padding-left: 28px;
    }

    .hbsm-timeline-event {
        margin-bottom: 20px;
    }

    .hbsm-timeline-dot {
        left: -42px;
        width: 27px;
        height: 27px;
    }

    .hbsm-timeline-content {
        width: 100%;
        padding: 14px;
        border-radius: 9px;
    }

    .hbsm-timeline-content h3 {
        font-size: 16px;
    }

    .hbsm-timeline-content p {
        font-size: 14px;
    }

    .hbsm-timeline-content time {
        font-size: 12px;
    }

    /* Not found */

    .hbsm-not-found {
        padding: 40px 18px;
        border-radius: 12px;
    }

}

/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 480px) {

    .hbsm-public-tracking {
        padding: 5px;
        margin: 10px auto;
    }

    .hbsm-tracking-search {
        padding: 22px 13px;
    }

    .hbsm-tracking-heading h1 {
        font-size: 23px;
    }

    .hbsm-tracking-result {
        padding: 10px;
    }

    .hbsm-status-hero {
        padding: 17px 13px;
    }

    .hbsm-status-hero h2 {
        font-size: 22px;
    }

    .hbsm-tracking-number-card {
        padding: 15px;
    }

    .hbsm-progress-section {
        padding-left: 8px;
        padding-right: 8px;
    }

    .hbsm-route-card {
        padding: 16px;
    }
.hbsm-timeline-content {
        padding: 13px;
    }

}

/* =========================================================
   EXTRA-SMALL PHONES
========================================================= */

@media (max-width: 360px) {

    .hbsm-public-tracking {
        padding: 3px;
    }

    .hbsm-tracking-search {
        padding: 18px 10px;
    }

    .hbsm-tracking-heading h1 {
        font-size: 21px;
    }

    .hbsm-status-hero h2 {
        font-size: 20px;
    }

    .hbsm-progress-step span {
        font-size: 13px;
    }

    .hbsm-timeline {
        padding-left: 24px;
    }

    .hbsm-timeline-dot {
        left: -38px;
    }

}


/* =========================================================
   HBSM NEW TRACKING PAGE LAYOUT
   1. Tracking Number + Status
   2. Origin + Destination
   3. Shipment Timeline
   4. Package Details
========================================================= */

.hbsm-info-card {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .04);
}

/* Section heading */

.hbsm-section-heading {
    width: 100%;
    margin-bottom: 20px;
}

.hbsm-section-heading h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.3;
}

/* =========================================================
   1. TRACKING NUMBER + STATUS
========================================================= */

.hbsm-status-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
    align-items: center;
    gap: 30px;
    padding: 25px;
    margin-bottom: 18px;
}

.hbsm-status-card-item {
    min-width: 0;
}

.hbsm-status-card-divider {
    width: 1px;
    height: 65px;
    background: #e2e8f0;
}

.hbsm-tracking-code {
    display: block;
    font-size: 23px;
    line-height: 1.35;
    letter-spacing: .4px;
    overflow-wrap: anywhere;
}

.hbsm-main-status {
    display: block;
    font-size: 22px;
    line-height: 1.35;
    color: #1d4ed8;
    overflow-wrap: anywhere;
}

.hbsm-current-location {
    margin: 8px 0 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.hbsm-current-location strong {
    color: #1e293b;
}

/* =========================================================
   2. ORIGIN + DESTINATION
========================================================= */

.hbsm-route-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    padding: 25px;
    margin: 0 0 35px;
}

.hbsm-route-point {
    min-width: 0;
}

.hbsm-route-label {
    display: block;
    margin-bottom: 7px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.hbsm-route-point strong {
    display: block;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.hbsm-route-arrow {
    width: 100%;
    text-align: center;
    color: #1d4ed8;
    font-size: 28px;
    font-weight: 700;
}

/* =========================================================
   3. SHIPMENT TIMELINE
========================================================= */

.hbsm-timeline-section {
    width: 100%;
    margin-bottom: 35px;
}

.hbsm-shipment-timeline {
    position: relative;
    width: 100%;
    padding-left: 38px;
}

.hbsm-shipment-timeline::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 15px;
    bottom: 15px;
    width: 2px;
    background: #dbe3ee;
}

.hbsm-timeline-item {
    position: relative;
    width: 100%;
    margin: 0 0 18px;
}

.hbsm-timeline-item:last-child {
    margin-bottom: 0;
}

.hbsm-timeline-marker {
    position: absolute;
    left: -38px;
    top: 16px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1d4ed8;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 0 0 4px #ffffff;
}

.hbsm-timeline-card {
    width: 100%;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .04);
    overflow-wrap: anywhere;
}

.hbsm-timeline-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 8px;
}

.hbsm-timeline-top h3 {
    margin: 0;
    color: #0f172a;
    font-size: 17px;
    line-height: 1.4;
}

.hbsm-timeline-top time {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
    text-align: right;
}

.hbsm-event-status {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 14px;
    line-height: 1.5;
}

.hbsm-event-location {
    margin: 7px 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
}

.hbsm-event-description {
    margin: 8px 0 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.hbsm-no-events {
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #64748b;
}

/* =========================================================
   4. PACKAGE DETAILS
========================================================= */

.hbsm-package-card {
    padding: 25px;
    margin-bottom: 10px;
}

.hbsm-package-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: #e2e8f0;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    overflow: hidden;
}

.hbsm-package-item {
    min-width: 0;
    padding: 18px;
    background: #ffffff;
}

.hbsm-package-item strong {
    display: block;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .hbsm-status-card {
        display: block;
        padding: 18px;
        margin-bottom: 14px;
    }

    .hbsm-status-card-divider {
        width: 100%;
        height: 1px;
        margin: 17px 0;
    }

    .hbsm-tracking-code {
        font-size: 20px;
    }

    .hbsm-main-status {
        font-size: 20px;
    }

    .hbsm-route-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 13px;
        padding: 18px;
        margin-bottom: 25px;
    }

    .hbsm-route-arrow {
        width: 100%;
        height: 30px;
        line-height: 30px;
        transform: rotate(90deg);
    }

    .hbsm-section-heading h2 {
        font-size: 21px;
    }

    .hbsm-shipment-timeline {
        padding-left: 33px;
    }

    .hbsm-shipment-timeline::before {
        left: 11px;
    }

    .hbsm-timeline-marker {
        left: -33px;
        width: 26px;
        height: 26px;
    }

    .hbsm-timeline-card {
        padding: 15px;
    }

    .hbsm-timeline-top {
        display: block;
    }

    .hbsm-timeline-top h3 {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .hbsm-timeline-top time {
        display: block;
        text-align: left;
        font-size: 12px;
    }

    .hbsm-package-card {
        padding: 18px;
    }

    .hbsm-package-grid {
        grid-template-columns: 1fr;
    }

    .hbsm-package-item {
        padding: 15px;
    }
}

@media (max-width: 480px) {

    .hbsm-status-card,
    .hbsm-route-card,
    .hbsm-package-card {
        border-radius: 10px;
    }

    .hbsm-tracking-code {
        font-size: 19px;
    }

    .hbsm-main-status {
        font-size: 19px;
    }

    .hbsm-timeline-card {
        padding: 14px;
    }

    .hbsm-event-status,
    .hbsm-event-location,
    .hbsm-event-description {
        font-size: 13px;
    }
}

/* =========================================================
   FINAL USPS-INSPIRED TRACKING POLISH
========================================================= */

.hbsm-status-card {
    border-top: 4px solid #1d4ed8;
}

.hbsm-label {
    color: #475569;
    font-weight: 700;
}

.hbsm-tracking-code {
    color: #111827;
}

.hbsm-main-status {
    color: #111827;
    font-weight: 800;
}

.hbsm-main-status.status-delivered {
    color: #15803d;
}

.hbsm-main-status.status-in-transit,
.hbsm-main-status.status-picked-up {
    color: #1d4ed8;
}

.hbsm-main-status.status-out-for-delivery {
    color: #b45309;
}

.hbsm-main-status.status-on-hold,
.hbsm-main-status.status-delayed {
    color: #b91c1c;
}

.hbsm-last-scan,
.hbsm-estimated-delivery {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.hbsm-estimated-delivery {
    margin-bottom: 0;
}

.hbsm-estimated-delivery strong {
    color: #1e293b;
}

.hbsm-section-heading {
    margin-bottom: 18px;
}

.hbsm-section-heading h2 {
    color: #111827;
    font-weight: 750;
}

.hbsm-section-heading p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 13px;
}

.hbsm-shipment-timeline {
    padding-left: 42px;
}

.hbsm-shipment-timeline::before {
    left: 15px;
    width: 2px;
    background: #cbd5e1;
}

.hbsm-timeline-marker {
    left: -42px;
    top: 14px;
    width: 30px;
    height: 30px;
    background: #ffffff;
    color: #1d4ed8;
    border: 3px solid #1d4ed8;
    box-shadow: 0 0 0 4px #ffffff;
    font-size: 10px;
}

.hbsm-timeline-marker.is-latest {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 4px #ffffff, 0 0 0 7px rgba(29,78,216,.10);
}

.hbsm-timeline-card {
    border: 0;
    border-left: 3px solid #e2e8f0;
    border-radius: 0 8px 8px 0;
    box-shadow: none;
    background: #f8fafc;
    padding: 16px 18px;
}

.hbsm-timeline-item:first-child .hbsm-timeline-card {
    border-left-color: #1d4ed8;
    background: #f8fbff;
}

.hbsm-timeline-top h3 {
    font-weight: 750;
}

.hbsm-event-status {
    color: #1f2937;
}

.hbsm-event-location {
    color: #475569;
}

.hbsm-event-description {
    color: #64748b;
}

.hbsm-package-card {
    border-top: 3px solid #e2e8f0;
}

@media (max-width: 768px) {
    .hbsm-status-card {
        border-top-width: 3px;
    }

    .hbsm-shipment-timeline {
        padding-left: 34px;
    }

    .hbsm-shipment-timeline::before {
        left: 11px;
    }

    .hbsm-timeline-marker {
        left: -34px;
    }

    .hbsm-timeline-card {
        padding: 14px 15px;
    }
}

/* =========================================================
   HORIZON CARRIER TRACKING — FINAL USPS-INSPIRED LAYOUT
========================================================= */

.hbsm-public-tracking {
    max-width: 980px;
    margin: 30px auto;
    color: #1f2937;
}

.hbsm-tracking-result {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

/* ---------------------------------------------------------
   TRACKING NUMBER + STATUS
--------------------------------------------------------- */

.hbsm-status-card {
    background: #ffffff;
    border: 1px solid #d7dde5;
    border-top: 4px solid #1d4ed8;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    padding: 24px 28px;
    margin-bottom: 16px;
}

.hbsm-status-card-item {
    padding: 2px 0;
}

.hbsm-tracking-code {
    font-size: 25px;
    font-weight: 700;
    letter-spacing: .2px;
}

.hbsm-main-status {
    font-size: 24px;
    font-weight: 700;
}

.hbsm-last-scan,
.hbsm-estimated-delivery,
.hbsm-current-location {
    font-size: 14px;
    margin-top: 7px;
}

.hbsm-status-card-divider {
    background: #d7dde5;
}

/* ---------------------------------------------------------
   ORIGIN + DESTINATION
--------------------------------------------------------- */

.hbsm-route-card {
    background: #ffffff;
    border: 1px solid #d7dde5;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    padding: 24px 28px;
    margin-bottom: 30px;
}

.hbsm-route-point strong {
    font-size: 18px;
}

.hbsm-route-arrow {
    color: #1d4ed8;
    font-size: 24px;
}

/* ---------------------------------------------------------
   SHIPMENT TIMELINE
--------------------------------------------------------- */

.hbsm-timeline-section {
    margin: 0 0 30px;
}

.hbsm-section-heading {
    margin: 0 0 14px;
}

.hbsm-section-heading h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.hbsm-section-heading p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 14px;
}

.hbsm-shipment-timeline {
    position: relative;
    padding-left: 185px;
}

.hbsm-shipment-timeline::before {
    left: 166px;
    top: 16px;
    bottom: 16px;
    width: 2px;
    background: #cbd5e1;
}

.hbsm-timeline-item {
    display: grid;
    grid-template-columns: 1px minmax(0,1fr);
    position: relative;
    margin-bottom: 12px;
    min-height: 92px;
}

.hbsm-timeline-date {
    position: absolute;
    left: -185px;
    top: 12px;
    width: 145px;
    color: #475569;
    font-size: 13px;
    line-height: 1.45;
    text-align: right;
}

.hbsm-timeline-date span {
    display: block;
    color: #64748b;
    font-size: 12px;
}

.hbsm-timeline-marker {
    position: absolute;
    left: -32px;
    top: 12px;
    width: 28px;
    height: 28px;
    background: #ffffff;
    border: 2px solid #64748b;
    color: #64748b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    z-index: 3;
    box-shadow: 0 0 0 4px #ffffff;
}

.hbsm-timeline-marker.is-latest {
    width: 32px;
    height: 32px;
    left: -34px;
    top: 10px;
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 0 0 4px #ffffff, 0 0 0 7px rgba(29,78,216,.10);
}

.hbsm-timeline-card {
    width: 100%;
    min-width: 0;
    padding: 14px 18px;
    background: #ffffff;
    border: 1px solid #d7dde5;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.hbsm-timeline-item:first-child .hbsm-timeline-card {
    border-left: 4px solid #1d4ed8;
    padding-left: 15px;
}

.hbsm-timeline-top {
    display: block;
    margin: 0 0 5px;
}

.hbsm-timeline-top h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #111827;
}

.hbsm-event-status {
    display: block;
    margin: 3px 0;
    font-size: 14px;
    color: #334155;
}

.hbsm-event-location {
    margin: 5px 0;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.hbsm-event-description {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

/* ---------------------------------------------------------
   PACKAGE DETAILS
--------------------------------------------------------- */

.hbsm-package-card {
    background: #ffffff;
    border: 1px solid #d7dde5;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    padding: 24px 28px;
}

.hbsm-package-grid {
    border-color: #d7dde5;
}

.hbsm-package-item {
    padding: 17px 18px;
}

/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */

@media (max-width: 768px) {

    .hbsm-public-tracking {
        width: 100%;
        max-width: 100%;
        margin: 12px auto;
        padding: 8px;
    }

    .hbsm-status-card {
        padding: 18px;
        border-radius: 3px;
    }

    .hbsm-tracking-code {
        font-size: 21px;
    }

    .hbsm-main-status {
        font-size: 21px;
    }

    .hbsm-route-card {
        padding: 18px;
        border-radius: 3px;
    }

    .hbsm-shipment-timeline {
        padding-left: 34px;
    }

    .hbsm-shipment-timeline::before {
        left: 12px;
        top: 13px;
        bottom: 13px;
    }

    .hbsm-timeline-item {
        display: block;
        min-height: 0;
        margin-bottom: 14px;
        padding: 0;
    }

    .hbsm-timeline-date {
        position: static;
        width: auto;
        text-align: left;
        margin: 0 0 6px;
        padding-left: 0;
        font-size: 12px;
    }

    .hbsm-timeline-date span {
        display: inline;
        margin-left: 5px;
        font-size: 12px;
    }

    .hbsm-timeline-marker,
    .hbsm-timeline-marker.is-latest {
        left: -34px;
        top: 35px;
        width: 27px;
        height: 27px;
        box-shadow: 0 0 0 4px #ffffff;
    }

    .hbsm-timeline-card,
    .hbsm-timeline-item:first-child .hbsm-timeline-card {
        padding: 14px;
        border-left: 1px solid #d7dde5;
        border-radius: 3px;
    }

    .hbsm-timeline-item:first-child .hbsm-timeline-card {
        border-top: 3px solid #1d4ed8;
    }

    .hbsm-package-card {
        padding: 18px;
    }

}

@media (max-width: 480px) {

    .hbsm-public-tracking {
        padding: 5px;
    }

    .hbsm-status-card,
    .hbsm-route-card,
    .hbsm-package-card {
        padding: 15px;
    }

    .hbsm-shipment-timeline {
        padding-left: 30px;
    }

    .hbsm-shipment-timeline::before {
        left: 10px;
    }

    .hbsm-timeline-marker,
    .hbsm-timeline-marker.is-latest {
        left: -30px;
    }

    .hbsm-timeline-card {
        padding: 12px;
    }
}

/* =========================================================
   FIXED SHIPMENT TIMELINE
   Only affects the shipment timeline.
========================================================= */

.hbsm-final-carrier-page .hbsm-fixed-timeline-item
.hbsm-timeline-marker {
    background: #fff;
    border-color: #cbd5e1;
    color: #94a3b8;
}

.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-completed
.hbsm-timeline-marker {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
    font-weight: 700;
}

.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-current
.hbsm-timeline-marker {
    width: 32px;
    height: 32px;
    left: -34px;
    top: 10px;
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
    font-size: 11px;
    box-shadow:
        0 0 0 4px #fff,
        0 0 0 7px rgba(29,78,216,.12);
}

.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-waiting
.hbsm-timeline-marker {
    background: #fff;
    border-color: #cbd5e1;
    color: #94a3b8;
}

.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-current
.hbsm-timeline-card {
    border-left: 4px solid #1d4ed8;
    padding-left: 15px;
}

.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-waiting
.hbsm-timeline-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-waiting
.hbsm-timeline-top h3 {
    color: #64748b;
}

.hbsm-final-carrier-page .hbsm-timeline-waiting-date {
    color: #94a3b8;
}

.hbsm-final-carrier-page .hbsm-timeline-awaiting {
    color: #94a3b8;
    font-style: italic;
}

@media (max-width: 768px) {

    .hbsm-final-carrier-page .hbsm-fixed-timeline-item
    .hbsm-timeline-marker {
        left: -32px;
        top: 34px;
        width: 27px;
        height: 27px;
    }

    .hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-current
    .hbsm-timeline-marker {
        left: -34px;
        top: 32px;
        width: 31px;
        height: 31px;
    }

}


/* =========================================================
   CURRENT TIMELINE SPOT — BOLD & NOTICEABLE
   Only affects the active/current timeline item.
========================================================= */

.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-current
.hbsm-timeline-marker {
    width: 38px;
    height: 38px;
    left: -37px;
    top: 7px;
    background: #0f766e;
    border: 4px solid #ffffff;
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
    line-height: 30px;
    box-shadow:
        0 0 0 3px #0f766e,
        0 0 0 7px rgba(15,118,110,.16);
    z-index: 5;
}

.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-current
.hbsm-timeline-card {
    border-left: 5px solid #0f766e;
    background: #f0fdfa;
    box-shadow: 0 4px 14px rgba(15,118,110,.10);
}

.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-current
.hbsm-timeline-card h3 {
    font-weight: 800;
    color: #0f172a;
}

.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-current
.hbsm-timeline-date {
    font-weight: 700;
    color: #0f766e;
}

@media (max-width: 768px) {

    .hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-current
    .hbsm-timeline-marker {
        width: 34px;
        height: 34px;
        left: -36px;
        top: 30px;
        border-width: 3px;
        font-size: 13px;
        line-height: 28px;
        box-shadow:
            0 0 0 3px #0f766e,
            0 0 0 6px rgba(15,118,110,.16);
    }

}


/* =========================================================
   CURRENT TIMELINE INDICATOR — POSITION FIX
   The blue highlight belongs to the CURRENT step, not the
   first step. This overrides the older first-child styling.
========================================================= */

/* Remove the old permanent blue highlight from the first item. */
.hbsm-fixed-timeline-item:first-child .hbsm-timeline-card {
    border-left-color: #e2e8f0 !important;
    border-top-color: #d7dde5 !important;
    background: #ffffff !important;
    padding-left: 18px !important;
}

/* Completed steps stay neutral after they have been passed. */
.hbsm-fixed-timeline-item.is-completed .hbsm-timeline-card {
    border-left: 1px solid #d7dde5 !important;
    border-top-color: #d7dde5 !important;
    background: #ffffff !important;
    padding-left: 18px !important;
}

/* The blue highlight moves to the actual current step. */
.hbsm-fixed-timeline-item.is-current .hbsm-timeline-card {
    border-left: 5px solid #1d4ed8 !important;
    border-top-color: #d7dde5 !important;
    background: #f8fbff !important;
    padding-left: 15px !important;
}

/* Make the current marker unmistakable. */
.hbsm-fixed-timeline-item.is-current .hbsm-timeline-marker {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
    box-shadow:
        0 0 0 4px #ffffff,
        0 0 0 7px rgba(29,78,216,.16) !important;
    z-index: 5;
}

/* Waiting steps remain neutral. */
.hbsm-fixed-timeline-item.is-waiting .hbsm-timeline-card {
    border-left: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
}

@media (max-width: 768px) {

    .hbsm-fixed-timeline-item:first-child .hbsm-timeline-card {
        border-left: 1px solid #d7dde5 !important;
        border-top: 1px solid #d7dde5 !important;
        padding-left: 14px !important;
    }

    .hbsm-fixed-timeline-item.is-current .hbsm-timeline-card {
        border-left: 4px solid #1d4ed8 !important;
        border-top: 1px solid #d7dde5 !important;
        padding-left: 14px !important;
    }

}


/* =========================================================
   FINAL CURRENT-STATE OVERRIDE
   The blue vertical/card accent MUST follow .is-current.
   Completed and waiting items remain neutral.
========================================================= */

/* Neutralize any legacy blue accent on the first timeline item. */
.hbsm-final-carrier-page .hbsm-fixed-timeline-item:first-child
.hbsm-timeline-card,
.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-completed
.hbsm-timeline-card,
.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-waiting
.hbsm-timeline-card {
    border-left: 1px solid #d7dde5 !important;
    background: #ffffff !important;
}

/* ONLY the current item gets the blue vertical accent. */
.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-current
.hbsm-timeline-card {
    border-left: 5px solid #1d4ed8 !important;
    background: #f8fbff !important;
    padding-left: 15px !important;
}

/* ONLY the current circle is blue and visually distinct. */
.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-current
.hbsm-timeline-marker {
    background: #1d4ed8 !important;
    border: 4px solid #ffffff !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    box-shadow:
        0 0 0 3px #1d4ed8,
        0 0 0 7px rgba(29,78,216,.16) !important;
    z-index: 10 !important;
}

/* Completed circles are different from current, but still completed. */
.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-completed
.hbsm-timeline-marker {
    background: #ffffff !important;
    border: 3px solid #64748b !important;
    color: #64748b !important;
    box-shadow: none !important;
}

/* Waiting circles remain light/empty. */
.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-waiting
.hbsm-timeline-marker {
    background: #ffffff !important;
    border: 3px solid #cbd5e1 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
}

/* The connecting timeline line stays neutral; the current circle
   sits above it and is the only colored indicator. */
.hbsm-final-carrier-page .hbsm-fixed-timeline:before {
    background: #cbd5e1 !important;
}

@media (max-width: 768px) {

    .hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-current
    .hbsm-timeline-card {
        border-left: 4px solid #1d4ed8 !important;
        padding-left: 14px !important;
    }

    .hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-current
    .hbsm-timeline-marker {
        border-width: 3px !important;
        box-shadow:
            0 0 0 3px #1d4ed8,
            0 0 0 6px rgba(29,78,216,.16) !important;
    }

}


/* =========================================================
   TIMELINE CURRENT ITEM — FINAL STATE-BASED OVERRIDE
   The blue accent is controlled ONLY by .is-current.
========================================================= */

.hbsm-final-carrier-page .hbsm-fixed-timeline-item
.hbsm-timeline-card {
    border-left: 1px solid #d7dde5 !important;
    border-top: 1px solid #d7dde5 !important;
    background: #ffffff !important;
    padding-left: 18px !important;
}

.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-completed
.hbsm-timeline-card {
    border-left: 1px solid #d7dde5 !important;
    background: #ffffff !important;
}

.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-waiting
.hbsm-timeline-card {
    border-left: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
}

/* Current card/line — this is the ONLY blue card accent. */
.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-current
.hbsm-timeline-card {
    border-left: 5px solid #1d4ed8 !important;
    border-top: 1px solid #d7dde5 !important;
    background: #f8fbff !important;
    padding-left: 15px !important;
    box-shadow: 0 3px 12px rgba(29,78,216,.08) !important;
}

/* Completed circle */
.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-completed
.hbsm-timeline-marker {
    width: 30px !important;
    height: 30px !important;
    background: #ffffff !important;
    border: 3px solid #64748b !important;
    color: #64748b !important;
    box-shadow: 0 0 0 4px #ffffff !important;
}

/* Waiting circle */
.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-waiting
.hbsm-timeline-marker {
    width: 30px !important;
    height: 30px !important;
    background: #ffffff !important;
    border: 3px solid #cbd5e1 !important;
    color: #94a3b8 !important;
    box-shadow: 0 0 0 4px #ffffff !important;
}

/* CURRENT CIRCLE — deliberately different from every other circle. */
.hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-current
.hbsm-timeline-marker,
.hbsm-final-carrier-page .hbsm-fixed-timeline-item
.hbsm-timeline-marker.hbsm-current-indicator {
    width: 36px !important;
    height: 36px !important;
    left: -36px !important;
    top: 7px !important;
    background: #1d4ed8 !important;
    border: 4px solid #ffffff !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    box-shadow:
        0 0 0 3px #1d4ed8,
        0 0 0 7px rgba(29,78,216,.18) !important;
    z-index: 20 !important;
}

@media (max-width: 768px) {

    .hbsm-final-carrier-page .hbsm-fixed-timeline-item
    .hbsm-timeline-card {
        border-left: 1px solid #d7dde5 !important;
        padding-left: 14px !important;
    }

    .hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-current
    .hbsm-timeline-card {
        border-left: 4px solid #1d4ed8 !important;
        padding-left: 14px !important;
    }

    .hbsm-final-carrier-page .hbsm-fixed-timeline-item.is-current
    .hbsm-timeline-marker,
    .hbsm-final-carrier-page .hbsm-fixed-timeline-item
    .hbsm-timeline-marker.hbsm-current-indicator {
        width: 32px !important;
        height: 32px !important;
        left: -33px !important;
        top: 31px !important;
        border-width: 3px !important;
        box-shadow:
            0 0 0 3px #1d4ed8,
            0 0 0 6px rgba(29,78,216,.18) !important;
    }

}