/* =====================================================================
   Mex Miles — parcel service page components
   Shared by the domestic and international parcel delivery pages.
   All classes are prefixed .svc- so nothing collides with the theme CSS.
   Colours inherit from --mainColor where the theme defines it.
   ===================================================================== */

.svc-scope {
    --svc-accent: var(--mainColor, #f96a1c);
    --svc-ink: #1c2434;
    --svc-muted: #6b7385;
    --svc-rule: #e4e7ee;
}

.svc-surface {
    background: #f6f7fa;
}

/* ---------- Solution cards ---------- */
.svc-solution {
    position: relative;
    background: #fff;
    border: 1px solid var(--svc-rule);
    border-radius: 6px;
    padding: 34px 30px 30px;
    margin-bottom: 30px;
    height: calc(100% - 30px);
    overflow: hidden;
    transition: border-color .35s ease, box-shadow .35s ease;
}

    .svc-solution::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: var(--svc-accent);
        transform: scaleX(0);
        transform-origin: left center;
        transition: transform .4s ease;
    }

    .svc-solution:hover {
        border-color: transparent;
        box-shadow: 0 12px 34px rgba(28, 36, 52, .1);
    }

        .svc-solution:hover::before {
            transform: scaleX(1);
        }

    .svc-solution i {
        font-size: 34px;
        line-height: 1;
        display: block;
        margin-bottom: 20px;
        color: var(--svc-accent);
    }

    .svc-solution h3 {
        font-size: 20px;
        line-height: 1.35;
        margin-bottom: 12px;
        color: var(--svc-ink);
    }

    .svc-solution p {
        margin-bottom: 0;
        color: var(--svc-muted);
        max-width: 42em;
    }

/* ---------- Callout note ---------- */
.svc-note {
    background: #fff;
    border: 1px solid var(--svc-rule);
    border-left: 4px solid var(--svc-accent);
    border-radius: 4px;
    padding: 28px 30px;
}

    .svc-note p:last-child {
        margin-bottom: 0;
    }

/* ---------- Shipment route (animated) ----------
   Set --stops on .svc-route to the number of steps, e.g.
   <div class="svc-route" style="--stops:5">
   The track then starts and ends at the first and last dot centres. */
.svc-route {
    --stops: 6;
    position: relative;
    padding-top: 10px;
}

.svc-route-line {
    position: absolute;
    left: calc(50% / var(--stops));
    right: calc(50% / var(--stops));
    top: 42px;
    height: 3px;
    background: var(--svc-rule);
    border-radius: 3px;
    overflow: hidden;
}

    .svc-route-line span {
        display: block;
        width: 100%;
        height: 100%;
        background: var(--svc-accent);
        transform: scaleX(0);
        transform-origin: left center;
        transition: transform 2.8s cubic-bezier(.4, 0, .2, 1);
    }

.svc-route.is-running .svc-route-line span {
    transform: none;
}

.svc-stops {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.svc-stop {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    padding: 0 14px;
    text-align: center;
}

.svc-stop-dot {
    position: relative;
    z-index: 2;
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--svc-rule);
    color: var(--svc-muted);
    font-size: 19px;
    font-weight: 700;
    line-height: 58px;
    transition: border-color .45s ease, background-color .45s ease, color .45s ease;
}

.svc-stop.is-lit .svc-stop-dot {
    background: var(--svc-accent);
    border-color: var(--svc-accent);
    color: #fff;
}

.svc-stop h3 {
    font-size: 17px;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--svc-ink);
}

.svc-stop p {
    font-size: 14.5px;
    line-height: 1.65;
    margin-bottom: 0;
    color: var(--svc-muted);
}

/* ---------- Reasons list ---------- */
.svc-reasons {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--svc-rule);
}

.svc-reason {
    display: flex;
    gap: 20px;
    padding: 28px 0;
    border-bottom: 1px solid var(--svc-rule);
}

    .svc-reason i {
        flex: 0 0 auto;
        font-size: 26px;
        line-height: 1.2;
        color: var(--svc-accent);
    }

    .svc-reason h3 {
        font-size: 19px;
        margin-bottom: 6px;
        color: var(--svc-ink);
    }

    .svc-reason p {
        margin-bottom: 0;
        color: var(--svc-muted);
    }

/* ---------- Sendable items ---------- */
.svc-items {
    padding: 0;
    margin: 0;
    list-style: none;
}

    .svc-items li {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        background: #fff;
        border: 1px solid var(--svc-rule);
        border-radius: 40px;
        padding: 11px 22px;
        margin: 0 10px 14px 0;
        font-size: 15px;
        color: var(--svc-ink);
    }

        .svc-items li i {
            color: var(--svc-accent);
            font-size: 18px;
        }

/* ---------- Closing panel ---------- */
.svc-close {
    background: var(--svc-ink);
    border-radius: 6px;
    padding: 60px 40px;
    text-align: center;
    color: #fff;
}

    .svc-close h2 {
        color: #fff;
        font-size: 34px;
        line-height: 1.3;
        margin-bottom: 18px;
    }

    .svc-close p {
        color: rgba(255, 255, 255, .78);
        max-width: 62ch;
        margin: 0 auto 16px;
    }

    .svc-close .default-btn {
        margin-top: 14px;
    }

/* ---------- Left-aligned section heading ---------- */
.svc-heading-left {
    text-align: left;
    max-width: none;
}

/* ---------- Accessibility ---------- */
.svc-scope a:focus-visible,
.svc-scope button:focus-visible {
    outline: 3px solid var(--svc-accent);
    outline-offset: 3px;
}

/* ---------- Responsive ---------- */
@media only screen and (max-width: 991px) {
    .svc-route-line {
        left: 31px;
        right: auto;
        top: 10px;
        bottom: 40px;
        width: 3px;
        height: auto;
    }

        .svc-route-line span {
            transform: scaleY(0);
            transform-origin: center top;
        }

    .svc-stops {
        display: block;
    }

    .svc-stop {
        display: flex;
        gap: 22px;
        align-items: flex-start;
        text-align: left;
        padding: 0 0 32px 0;
    }

    .svc-stop-dot {
        flex: 0 0 auto;
        margin: 0;
        width: 56px;
        height: 56px;
        line-height: 50px;
    }
}

@media only screen and (max-width: 767px) {
    .svc-close {
        padding: 45px 25px;
    }

        .svc-close h2 {
            font-size: 26px;
        }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .svc-route-line span,
    .svc-stop-dot,
    .svc-solution,
    .svc-solution::before {
        transition: none !important;
    }
}
