/**
 * ShipTrack Local - Customer Tracking Page Styles
 * Precision UI matching clean design specifications:
 * - Centered top brand header on desktop and mobile
 * - Multi-tracking package tabs
 * - Post Express / Courier card header with order number
 * - Horizontal 4-stage icon stepper
 * - Concentric circle vertical event timeline
 */

:root {
    --stl-primary: #0284c7;
    --stl-success: #16a34a;
    --stl-text-dark: #111827;
    --stl-text-muted: #4b5563;
    --stl-border: #e5e7eb;
    --stl-bg: #f3f4f6;
}

body.stl-tracking-body {
    margin: 0;
    padding: 0;
    background-color: var(--stl-bg);
    color: var(--stl-text-dark);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.stl-page-wrapper {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    box-sizing: border-box;
}

/* 1. Centered Top Brand Logo Header */
.stl-brand-header {
    text-align: center;
    margin: 16px 0 24px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stl-brand-logo {
    max-height: 52px;
    max-width: 260px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.stl-brand-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.stl-brand-symbol {
    font-size: 22px;
}

/* 2. Multi-tracking Package Tabs */
.stl-packages-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.stl-package-tab-btn {
    padding: 9px 15px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.stl-package-tab-btn:hover {
    border-color: #9ca3af;
    color: #111827;
}

.stl-package-tab-btn.active {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}

.stl-package-tab-badge {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 500;
}

.stl-package-tab-btn.active .stl-package-tab-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* 3. Main White Card Container */
.stl-card-main {
    background: #ffffff;
    border: 1px solid var(--stl-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.02);
    margin-bottom: 24px;
}

/* 4. Card Header */
.stl-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--stl-border);
    background: #ffffff;
}

.stl-carrier-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stl-carrier-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #00509a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.stl-carrier-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.stl-carrier-name {
    font-size: 13.5px;
    color: #4b5563;
    font-weight: 500;
}

.stl-tracking-number-link {
    font-size: 14.5px;
    font-weight: 700;
    color: #0284c7;
    text-decoration: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.3px;
}

.stl-tracking-number-link:hover {
    text-decoration: underline;
}

.stl-order-number {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

/* 5. Card Body */
.stl-card-body {
    padding: 24px 24px 30px;
}

/* 6. Status Headline */
.stl-status-headline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.stl-status-check-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stl-status-text {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

/* 7. Horizontal Stepper Bar (Segmented connectors: no line to the right of checkmark) */
.stl-stepper-container {
    position: relative;
    margin-bottom: 40px;
    padding: 0 4px;
}

.stl-stepper-row {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
}

.stl-step-connector {
    flex: 1;
    height: 4px;
    background: #d1d5db;
    transition: background-color 0.35s ease;
}

.stl-step-connector.active-completed {
    background: #16a34a;
}

.stl-step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #9ca3af;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 5px #ffffff;
    transition: all 0.2s ease;
}

.stl-step-circle.active-completed {
    background: #16a34a;
}

.stl-step-circle.active-current {
    background: #0284c7;
}

/* 8. Concentric-Circle Vertical Timeline */
.stl-timeline-container {
    margin-top: 10px;
}

.stl-timeline-list {
    position: relative;
    padding-left: 36px;
}

.stl-timeline-list::before {
    content: '';
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 11px;
    width: 2px;
    background: #d1d5db;
}

.stl-timeline-node {
    position: relative;
    padding-bottom: 22px;
}

.stl-timeline-node:last-child {
    padding-bottom: 0;
}

/* Concentric circle bullet matching image */
.stl-timeline-bullet {
    position: absolute;
    left: -36px;
    top: 1px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 3px #ffffff;
    box-sizing: border-box;
}

.stl-timeline-bullet-inner {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9ca3af;
}

.stl-timeline-node.is-latest .stl-timeline-bullet {
    border-color: #16a34a;
}

.stl-timeline-node.is-latest .stl-timeline-bullet-inner {
    background: #16a34a;
}

.stl-timeline-content {
    display: flex;
    flex-direction: column;
}

.stl-timeline-date {
    font-size: 13.5px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 3px;
    line-height: 1.3;
}

.stl-timeline-desc {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.45;
}

/* 9. Minimal Footer */
.stl-footer-bottom {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 12px;
}

.stl-footer-bottom p {
    margin: 0;
}

/* Responsive adjustments for mobile devices */
@media (max-width: 640px) {
    .stl-page-wrapper {
        padding: 16px 12px 36px;
    }

    .stl-brand-header {
        margin: 12px 0 18px 0;
    }

    .stl-brand-logo {
        max-height: 44px;
        max-width: 210px;
    }

    .stl-card-header {
        padding: 12px 16px;
        flex-direction: row;
        align-items: center;
    }

    .stl-carrier-name {
        display: none; /* Keep clean on small mobile header: Icon + Code and Order # */
    }

    .stl-tracking-number-link {
        font-size: 13.5px;
    }

    .stl-card-body {
        padding: 18px 16px 24px;
    }

    .stl-status-text {
        font-size: 21px;
    }

    .stl-stepper-container {
        padding: 0 4px;
        margin-bottom: 32px;
    }

    .stl-stepper-track-bg,
    .stl-stepper-track-fill {
        left: 20px;
        right: 20px;
    }

    .stl-step-circle {
        width: 32px;
        height: 32px;
    }

    .stl-step-circle svg {
        width: 15px;
        height: 15px;
    }

    .stl-timeline-list {
        padding-left: 32px;
    }

    .stl-timeline-list::before {
        left: 10px;
    }

    .stl-timeline-bullet {
        left: -32px;
        width: 22px;
        height: 22px;
    }

    .stl-timeline-bullet-inner {
        width: 7px;
        height: 7px;
    }

    .stl-timeline-date {
        font-size: 13px;
    }

    .stl-timeline-desc {
        font-size: 12.5px;
    }
}
