.pt-tracking-widget {
    max-width: 720px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1d2327;
}

.pt-tracking-title {
    font-size: 1.5rem;
    margin: 0 0 1rem;
}

.pt-tracking-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
    padding: 1.25rem;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 8px;
}

.pt-field {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pt-field label {
    font-size: 0.85rem;
    font-weight: 600;
}

.pt-input {
    padding: 0.65rem 0.75rem;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.pt-button {
    padding: 0.7rem 1.5rem;
    background: #1d4ed8;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.pt-button:hover {
    background: #1e40af;
    color: #fff;
}

.pt-tracking-unavailable {
    padding: 1.25rem;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    text-align: center;
    color: #50575e;
}

.pt-tracking-result {
    margin-top: 1.5rem;
}

.pt-tracking-error {
    padding: 0.85rem 1rem;
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    border-radius: 4px;
    margin: 0;
}

.pt-tracking-external {
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    background: #f0f6fc;
    border: 1px solid #c5d9ed;
    border-radius: 8px;
    text-align: center;
}

.pt-tracking-external-desc {
    font-size: 0.9rem;
    color: #50575e;
    margin: -0.5rem 0 1rem;
}

.pt-tracking-external-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pt-button-website {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.5rem;
    background: #fff;
    color: #1d4ed8;
    border: 1px solid #1d4ed8;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
}

.pt-button-website:hover {
    background: #eef2ff;
    color: #1d4ed8;
}

.pt-button-website .pt-icon-inline {
    width: 15px;
    height: 15px;
}

/* Shipment label (logo + barcode) */
.pt-shipment-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    margin-bottom: 1.25rem;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 12px;
}

.pt-shipment-label-brand {
    display: flex;
    align-items: center;
}

.pt-shipment-label-brand img {
    max-height: 64px;
    width: auto;
    display: block;
}

.pt-shipment-label-sitename {
    font-weight: 800;
    font-size: 1.1rem;
}

.pt-shipment-label-barcode {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.pt-shipment-label-barcode img {
    display: block;
    max-width: 100%;
    height: auto;
}

.pt-shipment-label-awb {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: #50575e;
}

@media (max-width: 480px) {
    .pt-shipment-label {
        justify-content: center;
        text-align: center;
    }

    .pt-shipment-label-brand img {
        max-height: 48px;
    }

    .pt-shipment-label-barcode {
        align-items: center;
    }
}

/* Status hero */
.pt-status-hero {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1.5rem 1.75rem;
    border-radius: 12px;
    background: #eef2ff;
    border: 1px solid #dbe3ff;
}

.pt-status-hero-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #1d4ed8;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pt-status-hero-icon svg {
    width: 26px;
    height: 26px;
}

.pt-status-hero-text {
    flex: 1;
    min-width: 0;
}

.pt-status-hero-eyebrow {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #50575e;
    margin-bottom: 0.15rem;
}

.pt-status-hero-text h3 {
    margin: 0 0 0.25rem;
    font-size: 1.3rem;
    line-height: 1.2;
}

.pt-status-hero-location {
    margin: 0;
    font-size: 0.9rem;
    color: #50575e;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.pt-icon-inline {
    display: inline-flex;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.pt-icon-inline svg {
    width: 100%;
    height: 100%;
}

.pt-status-hero-eta {
    flex-shrink: 0;
    text-align: right;
    padding-left: 1rem;
    border-left: 1px solid rgba(29, 78, 216, 0.2);
}

.pt-status-hero-eta span {
    display: block;
    font-size: 0.75rem;
    color: #50575e;
}

.pt-status-hero-eta strong {
    font-size: 1.05rem;
}

.pt-status-hero-success { background: #eafaf1; border-color: #bfe8cf; }
.pt-status-hero-success .pt-status-hero-icon { background: #1a7f37; }
.pt-status-hero-alert { background: #fcf0f1; border-color: #f3c6c8; }
.pt-status-hero-alert .pt-status-hero-icon { background: #d63638; }

/* Rider contact card */
.pt-rider-card {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1.1rem 1.5rem;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 12px;
}

.pt-rider-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #eef2ff;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pt-rider-icon svg {
    width: 22px;
    height: 22px;
}

.pt-rider-info {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.pt-rider-label {
    font-size: 0.75rem;
    color: #50575e;
}

.pt-rider-name {
    font-weight: 700;
    font-size: 1rem;
}

.pt-rider-vehicle {
    font-size: 0.85rem;
    color: #50575e;
}

.pt-rider-call {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.25rem;
    background: #1d4ed8;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}

.pt-rider-call:hover {
    background: #1e40af;
    color: #fff;
}

.pt-rider-call .pt-icon-inline {
    width: 15px;
    height: 15px;
}

@media (max-width: 480px) {
    .pt-rider-card {
        justify-content: center;
        text-align: center;
    }

    .pt-rider-info {
        min-width: 100%;
        align-items: center;
    }

    .pt-rider-call {
        width: 100%;
        justify-content: center;
    }
}

/* Stepper */
.pt-stepper {
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 0.25rem;
    margin: 1.75rem 0 0;
    padding: 0;
    counter-reset: pt-step;
}

.pt-stepper-step {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.pt-stepper-step::before {
    content: "";
    position: absolute;
    top: 17px;
    left: -50%;
    width: 100%;
    height: 2px;
    background: #dcdcde;
    z-index: 0;
}

.pt-stepper-step:first-child::before {
    display: none;
}

.pt-stepper-step.pt-stepper-complete::before {
    background: #1d4ed8;
}

.pt-stepper-icon {
    position: relative;
    z-index: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #dcdcde;
    color: #8c8f94;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pt-stepper-icon svg {
    width: 18px;
    height: 18px;
}

.pt-stepper-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #8c8f94;
    max-width: 90px;
}

.pt-stepper-complete .pt-stepper-icon { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.pt-stepper-complete .pt-stepper-label { color: #1d2327; }
.pt-stepper-current .pt-stepper-icon { background: #fff; border-color: #1d4ed8; color: #1d4ed8; box-shadow: 0 0 0 4px #eef2ff; }
.pt-stepper-current .pt-stepper-label { color: #1d4ed8; }

/* Section headings inside the result */
.pt-section-heading {
    margin: 2rem 0 1rem;
    font-size: 1.05rem;
}

/* Sender / recipient */
.pt-parties {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

.pt-party-card {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1.1rem 1.25rem;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 12px;
}

.pt-party-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #eef2ff;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pt-party-icon svg {
    width: 18px;
    height: 18px;
}

.pt-party-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.pt-party-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #50575e;
}

.pt-party-name {
    font-weight: 700;
    font-size: 1rem;
    word-break: break-word;
}

.pt-party-location {
    font-size: 0.9rem;
    color: #50575e;
    word-break: break-word;
}

.pt-party-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1d4ed8;
    text-decoration: none;
    word-break: break-word;
}

.pt-party-phone:hover {
    color: #1e40af;
    text-decoration: underline;
}

.pt-party-phone .pt-icon-inline {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .pt-parties {
        grid-template-columns: 1fr;
    }
}

/* Detail grid */
.pt-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    margin-top: 1.75rem;
}

.pt-detail-card {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 10px;
}

.pt-detail-icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
    color: #1d4ed8;
    margin-bottom: 0.15rem;
}

.pt-detail-icon svg {
    width: 100%;
    height: 100%;
}

.pt-detail-label {
    font-size: 0.75rem;
    color: #50575e;
}

.pt-detail-value {
    font-weight: 700;
    font-size: 0.95rem;
    word-break: break-word;
}

/* Timeline (zigzag) */
.pt-timeline-heading {
    margin: 2rem 0 1rem;
    font-size: 1.05rem;
}

.pt-tracking-timeline {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

.pt-tracking-timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #e2e4e7;
    transform: translateX(-50%);
}

.pt-timeline-item {
    position: relative;
    box-sizing: border-box;
    width: 50%;
    display: flex;
    padding-bottom: 2rem;
}

.pt-timeline-item:last-child {
    padding-bottom: 0;
}

.pt-timeline-item:nth-child(odd) {
    justify-content: flex-end;
    padding-right: 2.25rem;
}

.pt-timeline-item:nth-child(even) {
    margin-left: 50%;
    justify-content: flex-start;
    padding-left: 2.25rem;
}

.pt-timeline-marker {
    position: absolute;
    top: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f0f1;
    color: #8c8f94;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 4px #fff;
    z-index: 1;
}

.pt-timeline-item:nth-child(odd) .pt-timeline-marker {
    right: -18px;
}

.pt-timeline-item:nth-child(even) .pt-timeline-marker {
    left: -18px;
}

.pt-timeline-marker svg {
    width: 16px;
    height: 16px;
}

.pt-timeline-item-latest .pt-timeline-marker {
    background: #1d4ed8;
    color: #fff;
}

.pt-timeline-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    max-width: 100%;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
}

.pt-timeline-status {
    font-weight: 700;
}

.pt-timeline-location,
.pt-timeline-description {
    font-size: 0.9rem;
    color: #50575e;
}

.pt-timeline-time {
    font-size: 0.8rem;
    color: #8c8f94;
    margin-top: 0.25rem;
}

@media (max-width: 700px) {
    .pt-tracking-timeline::before {
        left: 17px;
    }

    .pt-timeline-item,
    .pt-timeline-item:nth-child(even) {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
        padding-left: 2.75rem;
        padding-right: 0;
    }

    .pt-timeline-item:nth-child(odd) .pt-timeline-marker,
    .pt-timeline-item:nth-child(even) .pt-timeline-marker {
        left: 0;
        right: auto;
    }
}

.pt-tracking-updated {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 0.4rem;
    margin: 1.5rem auto 0;
    padding: 0.55rem 1.1rem;
    background: #f0f6fc;
    border: 1px solid #c5d9ed;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #50575e;
}

.pt-tracking-updated-icon {
    display: inline-flex;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #1d4ed8;
}

.pt-tracking-updated-icon svg {
    width: 100%;
    height: 100%;
}

@media (max-width: 600px) {
    .pt-tracking-form {
        flex-direction: column;
        align-items: stretch;
    }

    .pt-field {
        flex: none;
    }

    .pt-status-hero {
        flex-wrap: wrap;
    }

    .pt-status-hero-eta {
        border-left: none;
        padding-left: 0;
        text-align: left;
        width: 100%;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(29, 78, 216, 0.15);
    }

    .pt-stepper-label {
        font-size: 0.65rem;
        max-width: 64px;
    }

    .pt-stepper-icon {
        width: 30px;
        height: 30px;
    }

    .pt-stepper-icon svg {
        width: 15px;
        height: 15px;
    }

    .pt-stepper-step::before {
        top: 14px;
    }

    .pt-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 420px) {
    .pt-status-hero {
        padding: 1.1rem 1.25rem;
    }

    .pt-status-hero-icon {
        width: 44px;
        height: 44px;
    }

    .pt-status-hero-icon svg {
        width: 22px;
        height: 22px;
    }

    .pt-stepper {
        gap: 0;
    }

    .pt-stepper-label {
        font-size: 0.6rem;
        max-width: 48px;
    }

    .pt-detail-grid {
        grid-template-columns: 1fr;
    }

    .pt-tracking-updated {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        border-radius: 12px;
        font-size: 0.75rem;
        text-align: center;
        white-space: normal;
    }
}
