/* Seven Seas tracking + map */

.apex-shipment {
    background: #fff;
    border: 1px solid #cfe4eb;
    border-radius: 22px;
    overflow: hidden;
    margin-top: 22px;
    box-shadow: 0 16px 40px rgba(6, 56, 71, 0.08);
}

.apex-shipment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 22px;
    background: linear-gradient(135deg, #063847, #0a4f61);
    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: #049bc3;
    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: #049bc3;
}

.apex-status.is-booked {
    background: #0a4f61;
}

.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: #063847;
    margin-bottom: 8px;
}

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

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

.apex-map-hint,
.apex-timeline-empty {
    color: #4d6a73;
    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: #f3fafc;
    border-radius: 12px;
    padding: 10px 12px;
}

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

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

.apex-timeline-wrap {
    padding: 8px 20px 28px;
}

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

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

.apex-timeline-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 4px 16px;
    -webkit-overflow-scrolling: touch;
}

.apex-timeline-scroll::-webkit-scrollbar {
    height: 8px;
}

.apex-timeline-scroll::-webkit-scrollbar-thumb {
    background: #049bc3;
    border-radius: 999px;
}

.apex-timeline-scroll::-webkit-scrollbar-track {
    background: #e7f6fa;
    border-radius: 999px;
}

.apex-timeline {
    list-style: none;
    display: flex;
    align-items: flex-start;
    min-width: 100%;
    width: max-content;
    padding: 0;
    margin: 0;
    border: 0;
}

.apex-timeline li {
    position: relative;
    flex: 1 0 190px;
    max-width: 240px;
    padding: 0 16px 8px;
    text-align: center;
}

.apex-timeline li::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 0;
    right: 50%;
    height: 3px;
    background: #cfe4eb;
    z-index: 0;
}

.apex-timeline li::after {
    content: '';
    position: absolute;
    top: 16px;
    left: 50%;
    right: 0;
    height: 3px;
    background: #cfe4eb;
    z-index: 0;
}

.apex-timeline li:first-child::before,
.apex-timeline li:last-child::after {
    display: none;
}

.apex-timeline li.is-done::before,
.apex-timeline li.is-done::after,
.apex-timeline li.is-current::before {
    background: #049bc3;
}

.apex-timeline-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #0a4f61;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 0 0 4px #fff;
}

.apex-timeline li.is-done .apex-timeline-icon {
    background: #049bc3;
}

.apex-timeline li.is-current .apex-timeline-icon {
    background: #049bc3;
    box-shadow: 0 0 0 4px #fff, 0 0 0 8px rgba(4, 155, 195, 0.22);
}

.apex-timeline h4 {
    font-size: 14px;
    line-height: 1.35;
    margin: 0 0 6px;
    color: #063847;
}

.apex-timeline p {
    margin: 0 0 4px;
    color: #4d6a73;
    font-size: 12px;
    line-height: 1.4;
}

.apex-timeline p i,
.apex-timeline small i {
    color: #049bc3;
    margin-right: 2px;
}

.apex-timeline small {
    display: block;
    color: #7a8a9a;
    font-size: 11px;
    line-height: 1.4;
    margin-top: 2px;
}

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

.apex-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #cfe4eb;
    border-top-color: #049bc3;
    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;
    }
}
