/* TRANS APEX tracking + map */

.apex-shipment {
    background: #fff;
    border: 1px solid #d4e4ef;
    border-radius: 22px;
    overflow: hidden;
    margin-top: 22px;
    box-shadow: 0 16px 40px rgba(7, 26, 54, 0.08);
}

.apex-shipment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 22px;
    background: linear-gradient(135deg, #071a36, #0c2d56);
    color: #fff;
}

.apex-shipment-head h3 {
    color: #fff;
    margin: 6px 0 0;
    font-size: 22px;
}

.apex-chip {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #1ea8d8;
    font-weight: 700;
}

.apex-status {
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    white-space: nowrap;
}

.apex-status.is-delivered {
    background: #1ea878;
}

.apex-status.is-transit {
    background: #1ea8d8;
}

.apex-status.is-booked {
    background: #3d5a80;
}

.apex-shipment-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 18px;
    padding: 20px;
}

.apex-map-wrap {
    min-height: 320px;
}

.apex-map-label {
    font-weight: 700;
    color: #071a36;
    margin-bottom: 8px;
}

.apex-map-label i {
    color: #1ea8d8;
    margin-right: 4px;
}

.apex-map {
    height: 340px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #d4e4ef;
    background: #e7f5fb;
}

.apex-map-hint,
.apex-timeline-empty {
    color: #5b6b80;
    font-size: 13px;
    margin: 8px 0 0;
}

.apex-map-wrap.is-empty .apex-map-hint::after {
    content: ' Location pins appear after hub scans are recorded.';
}

.apex-shipment-meta {
    display: grid;
    gap: 10px;
    align-content: start;
}

.apex-detail {
    background: #f4f8fc;
    border-radius: 12px;
    padding: 10px 12px;
}

.apex-detail span {
    display: block;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5b6b80;
}

.apex-detail strong,
.apex-detail a {
    color: #071a36;
    font-size: 14px;
}

.apex-timeline-wrap {
    padding: 0 20px 24px;
}

.apex-timeline-wrap h4 {
    color: #071a36;
    font-size: 18px;
    margin-bottom: 16px;
}

.apex-timeline-wrap h4 i {
    color: #1ea8d8;
    margin-right: 6px;
}

.apex-timeline {
    list-style: none;
    padding: 0 0 0 8px;
    margin: 0;
    border-left: 2px solid #d4e4ef;
}

.apex-timeline li {
    position: relative;
    padding: 0 0 22px 28px;
}

.apex-timeline-icon {
    position: absolute;
    left: -15px;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0c2d56;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.apex-timeline li.is-current .apex-timeline-icon {
    background: #1ea8d8;
}

.apex-timeline h4 {
    font-size: 15px;
    margin-bottom: 4px;
}

.apex-timeline p {
    margin: 0;
    color: #5b6b80;
    font-size: 13px;
}

.apex-timeline small {
    color: #7a8a9a;
}

.apex-track-loading,
.apex-track-empty {
    text-align: center;
    padding: 28px 16px;
    border-radius: 16px;
    background: #f4f8fc;
    color: #152033;
    margin-top: 18px;
}

.apex-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #d4e4ef;
    border-top-color: #1ea8d8;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    vertical-align: -3px;
    animation: apex-spin 0.8s linear infinite;
}

@keyframes apex-spin {
    to { transform: rotate(360deg); }
}

.leaflet-container {
    font-family: 'Manrope', sans-serif;
}

@media (max-width: 991px) {
    .apex-shipment-grid {
        grid-template-columns: 1fr;
    }

    .apex-shipment-head {
        flex-direction: column;
        align-items: flex-start;
    }
}
