/* ============================================================
   Naked Kiwi — Tracking page styles
   ============================================================ */

/* Reset / base ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: #0B0B0B;
    color: #FFFFFF;
    font-family: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
    padding: 0;
}

/* Page wrapper ------------------------------------------------- */
#page-wrapper {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

/* Site header -------------------------------------------------- */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 0.5px solid #1F1F1F;
    margin-bottom: 32px;
    gap: 16px;
    flex-wrap: wrap;
}

.logo-link {
    display: inline-block;
}

#logo {
    height: 28px;
    width: auto;
}

.header-nav {
    display: flex;
    gap: 20px;
    font-size: 11px;
    color: #888780;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.header-nav a {
    transition: color 0.15s ease;
}

.header-nav a:hover {
    color: #FFFFFF;
}

/* Delay notice ------------------------------------------------- */
.delay-notice {
    background: rgba(250, 199, 117, 0.08);
    border: 0.5px solid rgba(250, 199, 117, 0.25);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 28px;
}

.delay-notice p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #E5E5E2;
    text-align: center;
}

.delay-notice a {
    color: #FAC775;
    text-decoration: underline;
}

/* Order header ------------------------------------------------- */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.order-ref {
    font-size: 10px;
    color: #5F5E5A;
    letter-spacing: 0.14em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.order-greeting {
    font-size: 24px;
    font-weight: 500;
    color: #FFFFFF;
    line-height: 1.2;
    margin: 0;
}

.order-subline {
    font-size: 13px;
    color: #888780;
    margin: 6px 0 0;
}

/* Status pill -------------------------------------------------- */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    white-space: nowrap;
    background: rgba(29, 158, 117, 0.12);
    color: #5DCAA5;
    border: 0.5px solid rgba(29, 158, 117, 0.3);
}

.status-pill .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1D9E75;
    display: inline-block;
}

/* Estimated delivery card — sits under the carrier strip, before
   any notice blocks. Subtle green/teal accent for transit and
   delivered states; uses the same panel feel as the carrier strip. */
.eta-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(29, 158, 117, 0.05);
    border: 0.5px solid rgba(29, 158, 117, 0.25);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.eta-card-icon {
    width: 36px;
    height: 36px;
    background: rgba(29, 158, 117, 0.12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1D9E75;
    flex-shrink: 0;
    font-size: 18px;
}

.eta-card-body {
    flex: 1;
    min-width: 0;
}

.eta-card-label {
    margin: 0 0 2px 0;
    font-size: 11px;
    color: #888780;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

.eta-card-value {
    margin: 0;
    font-size: 15px;
    color: #FFFFFF;
    font-weight: 500;
}

.eta-card-helper {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: #888780;
}

/* Delivered variant — same shape, warmer green accent on the value */
.eta-card-delivered {
    background: rgba(29, 158, 117, 0.08);
    border-color: rgba(29, 158, 117, 0.35);
}

.eta-card-delivered .eta-card-value {
    color: #5DCAA5;
}

/* Imminent variant — slightly more attention-grabbing accent */
.eta-card-imminent {
    background: rgba(186, 117, 23, 0.06);
    border-color: rgba(186, 117, 23, 0.3);
}

.eta-card-imminent .eta-card-icon {
    background: rgba(186, 117, 23, 0.15);
    color: #EF9F27;
}

.eta-card-imminent .eta-card-value {
    color: #EF9F27;
}

/* Late variant — window has passed but parcel not delivered. Muted
   amber to acknowledge delay without alarming the customer. */
.eta-card-late {
    background: rgba(186, 117, 23, 0.06);
    border-color: rgba(186, 117, 23, 0.3);
}

.eta-card-late .eta-card-icon {
    background: rgba(186, 117, 23, 0.15);
    color: #EF9F27;
}

.eta-card-late .eta-card-value {
    color: #FAC775;
}

/* Stage-specific pill colors */
.status-stage-1 {
    background: rgba(136, 135, 128, 0.12);
    color: #B4B2A9;
    border-color: rgba(136, 135, 128, 0.3);
}
.status-stage-1 .status-dot { background: #888780; }

.status-stage-3 {
    background: rgba(239, 159, 39, 0.12);
    color: #FAC775;
    border-color: rgba(239, 159, 39, 0.3);
}
.status-stage-3 .status-dot { background: #EF9F27; }

.status-stage-4 {
    background: rgba(29, 158, 117, 0.18);
    color: #5DCAA5;
    border-color: rgba(29, 158, 117, 0.4);
}

.status-returned {
    background: rgba(226, 75, 74, 0.12);
    color: #F09595;
    border-color: rgba(226, 75, 74, 0.35);
}
.status-returned .status-dot { background: #E24B4A; }

/* Progress tracker --------------------------------------------- */
.progress-tracker {
    position: relative;
    margin-bottom: 36px;
}

.progress-track {
    position: absolute;
    top: 13px;
    left: 12.5%;   /* centre of column 1 (where node 1 sits) */
    right: 12.5%;  /* centre of column 4 (where node 4 sits) */
    height: 2px;
    background: #1F1F1F;
    border-radius: 1px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #1D9E75;
    transition: width 0.6s ease;
}

.progress-stages {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: relative;
    z-index: 1;
}

.stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.stage-node {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 14px;
    transition: all 0.3s ease;
}

.stage-done .stage-node {
    background: #1D9E75;
    color: #FFFFFF;
}

.stage-current .stage-node {
    background: #1D9E75;
    color: #FFFFFF;
}

.stage-current .stage-pulse {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 1.5px solid #1D9E75;
    opacity: 0.5;
    animation: stage-pulse 2s ease-out infinite;
}

.stage-current .stage-inner-dot {
    width: 8px;
    height: 8px;
    background: #FFFFFF;
    border-radius: 50%;
}

@keyframes stage-pulse {
    0%   { transform: scale(1);   opacity: 0.5; }
    100% { transform: scale(1.6); opacity: 0;   }
}

.stage-pending .stage-node {
    background: #0B0B0B;
    border: 1.5px solid #2C2C2A;
    color: #444441;
}

.stage-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: #5F5E5A;
    text-align: center;
}

.stage-done .stage-label,
.stage-current .stage-label {
    color: #FFFFFF;
}

/* Carrier strip ------------------------------------------------ */
.carrier-strip {
    background: #141414;
    border: 0.5px solid #1F1F1F;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

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

.carrier-badge {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.carrier-badge i {
    font-size: 18px;
    color: #E5E5E2;
}

.carrier-name {
    font-size: 13px;
    font-weight: 500;
    color: #FFFFFF;
}

.carrier-number {
    font-size: 11px;
    color: #888780;
    font-family: 'Courier New', monospace;
    margin-top: 1px;
}

.carrier-actions {
    display: flex;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1;
}

.btn i {
    font-size: 13px;
}

.btn-primary {
    background: #FFFFFF;
    color: #0B0B0B;
    border: 0.5px solid #FFFFFF;
}

.btn-primary:hover {
    background: #E5E5E2;
    border-color: #E5E5E2;
}

.btn-icon {
    background: transparent;
    color: #FFFFFF;
    border: 0.5px solid #2C2C2A;
    padding: 9px 10px;
}

.btn-icon:hover {
    background: #1F1F1F;
    border-color: #444441;
}

.btn-icon i {
    font-size: 14px;
}

/* Returned to sender notice ----------------------------------- */
.return-notice {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: rgba(226, 75, 74, 0.08);
    border: 0.5px solid rgba(226, 75, 74, 0.3);
    border-left: 3px solid #E24B4A;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 32px;
}

.return-notice-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(226, 75, 74, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #F09595;
    margin-top: 2px;
}

.return-notice-icon i {
    font-size: 18px;
}

.return-notice-body {
    flex: 1;
    min-width: 0;
}

.return-notice-title {
    font-size: 14px;
    font-weight: 500;
    color: #F09595;
    margin: 0 0 6px;
    line-height: 1.4;
}

.return-notice-text {
    font-size: 12px;
    color: #E5E5E2;
    line-height: 1.6;
    margin: 0 0 12px;
}

.return-notice-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #FFFFFF;
    background: rgba(226, 75, 74, 0.2);
    border: 0.5px solid rgba(226, 75, 74, 0.4);
    padding: 7px 12px;
    border-radius: 6px;
    transition: background 0.15s ease;
    text-decoration: none;
}

.return-notice-cta:hover {
    background: rgba(226, 75, 74, 0.3);
}

.return-notice-cta i {
    font-size: 13px;
    transition: transform 0.15s ease;
}

.return-notice-cta:hover i {
    transform: translateX(2px);
}

/* Locker pickup notice ---------------------------------------- */
.locker-notice {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: rgba(239, 159, 39, 0.08);
    border: 0.5px solid rgba(239, 159, 39, 0.3);
    border-left: 3px solid #EF9F27;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.locker-notice-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(239, 159, 39, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FAC775;
    margin-top: 2px;
}

.locker-notice-icon i {
    font-size: 18px;
}

.locker-notice-body {
    flex: 1;
    min-width: 0;
}

.locker-notice-title {
    font-size: 13px;
    font-weight: 500;
    color: #FAC775;
    margin: 0 0 2px;
    line-height: 1.4;
}

.locker-notice-text {
    font-size: 12px;
    color: #E5E5E2;
    line-height: 1.5;
    margin: 0;
}

.locker-notice-text strong {
    color: #FFFFFF;
    font-weight: 500;
}

/* Timeline ----------------------------------------------------- */
.timeline-section {
    margin-top: 24px;
    margin-bottom: 32px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.timeline-title {
    font-size: 14px;
    font-weight: 500;
    color: #FFFFFF;
    margin: 0;
}

.timeline-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #888780;
    transition: color 0.15s ease;
}

.timeline-toggle:hover {
    color: #FFFFFF;
}

.timeline-toggle i {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.timeline-toggle.is-expanded i {
    transform: rotate(180deg);
}

.timeline-toggle .toggle-text-expanded { display: none; }
.timeline-toggle.is-expanded .toggle-text-collapsed { display: none; }
.timeline-toggle.is-expanded .toggle-text-expanded { display: inline; }

.timeline {
    position: relative;
    padding-left: 28px;
}

/* Rail: 2px wide, centered on x = 8px from timeline left edge */
.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: #1F1F1F;
    border-radius: 1px;
}

.timeline-event {
    position: relative;
    padding-bottom: 20px;
}

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

.timeline-event.is-collapsed {
    display: none;
}

.timeline.is-expanded .timeline-event.is-collapsed {
    display: block;
}

/*
 * Every node has the same 20x20 footprint and is centered on the rail
 * by positioning its center at x = -20px from .event-body's left edge
 * (which sits at padding-left = 28px, so node center = 28 - 20 = 8px from
 * timeline edge — same as rail center). This way every variant aligns
 * identically regardless of border/shadow geometry.
 */
.event-node {
    position: absolute;
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    left: -30px;       /* -20 - half-width(10) */
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The visible inner dot — non-latest */
.event-node::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #444441;
    border: 2px solid #0B0B0B;
    box-sizing: border-box;
}

/* Latest event — larger green dot with halo, same 20x20 footprint */
.timeline-event.is-latest .event-node::after {
    width: 14px;
    height: 14px;
    background: #1D9E75;
    border: 2px solid #0B0B0B;
    box-shadow: 0 0 0 2px #1D9E75;
}

.event-body {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.event-activity {
    font-size: 13px;
    color: #E5E5E2;
    line-height: 1.4;
}

.event-activity::first-letter {
    text-transform: uppercase;
}

.timeline-event.is-latest .event-activity {
    color: #FFFFFF;
    font-weight: 500;
}

.event-location {
    font-size: 12px;
    color: #888780;
    margin-top: 3px;
}

.event-location i {
    font-size: 12px;
    vertical-align: -1px;
}

.event-time {
    font-size: 11px;
    color: #5F5E5A;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Timeline empty state ---------------------------------------- */
.timeline-empty {
    background: #141414;
    border: 0.5px dashed #2C2C2A;
    border-radius: 8px;
    padding: 28px 24px;
    text-align: center;
    margin-left: -28px;
}

.timeline-empty i {
    font-size: 28px;
    color: #5F5E5A;
    margin-bottom: 8px;
    display: block;
}

.timeline-empty-title {
    font-size: 14px;
    font-weight: 500;
    color: #E5E5E2;
    margin: 0 0 6px;
}

.timeline-empty-body {
    font-size: 12px;
    color: #888780;
    line-height: 1.6;
    max-width: 380px;
    margin: 0 auto;
}

/* Footer ------------------------------------------------------- */
.page-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 0.5px solid #1F1F1F;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-prompt {
    font-size: 12px;
    color: #5F5E5A;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #FFFFFF;
    transition: opacity 0.15s ease;
}

.footer-link:hover {
    opacity: 0.7;
}

.footer-link i {
    font-size: 13px;
}

/* Tracking entry form ----------------------------------------- */
.track-form-section {
    max-width: 460px;
    margin: 32px auto 0;
    padding: 48px 32px;
    background: #141414;
    border: 0.5px solid #1F1F1F;
    border-radius: 12px;
    text-align: center;
}

.track-form-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 0.5px solid #2C2C2A;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E5E5E2;
}

.track-form-icon i {
    font-size: 26px;
}

.form-heading {
    font-size: 22px;
    font-weight: 500;
    color: #FFFFFF;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

.form-subline {
    font-size: 13px;
    color: #888780;
    margin: 0 0 24px;
    line-height: 1.6;
}

.track-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
}

.track-form-input-wrap {
    position: relative;
}

.track-form-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #5F5E5A;
    font-size: 16px;
    pointer-events: none;
    transition: color 0.15s ease;
}

.track-form input[type="text"] {
    width: 100%;
    background: #0B0B0B;
    border: 0.5px solid #2C2C2A;
    border-radius: 8px;
    padding: 12px 14px 12px 40px;
    color: #FFFFFF;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.track-form input[type="text"]:focus {
    outline: none;
    border-color: #5F5E5A;
    background: #111111;
}

.track-form input[type="text"]:focus + .track-form-input-icon,
.track-form-input-wrap:focus-within .track-form-input-icon {
    color: #FFFFFF;
}

.track-form input[type="text"]::placeholder {
    color: #444441;
    font-family: 'Courier New', monospace;
}

.track-form-submit {
    background: #FFFFFF;
    color: #0B0B0B;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
    font-family: 'Archivo', inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.track-form-submit:hover {
    background: #E5E5E2;
}

.track-form-submit:active {
    transform: scale(0.99);
}

.track-form-submit i {
    font-size: 14px;
    transition: transform 0.15s ease;
}

.track-form-submit:hover i {
    transform: translateX(2px);
}

.track-form-help {
    font-size: 12px;
    color: #5F5E5A;
    margin: 20px 0 0;
    line-height: 1.6;
}

.track-form-help a {
    color: #E5E5E2;
    text-decoration: none;
    transition: color 0.15s ease;
}

.track-form-help a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

/* Responsive --------------------------------------------------- */
@media (max-width: 560px) {
    #page-wrapper {
        padding: 20px 16px 32px;
    }

    .site-header {
        margin-bottom: 24px;
    }

    .header-nav {
        gap: 12px;
        font-size: 10px;
    }

    .order-header {
        margin-bottom: 28px;
    }

    .order-greeting {
        font-size: 20px;
    }

    .progress-tracker {
        margin-bottom: 36px;
    }

    .stage-label {
        font-size: 9px;
    }

    .carrier-strip {
        padding: 12px 14px;
    }

    .carrier-actions {
        width: 100%;
        margin-top: 4px;
    }

    .btn-primary {
        flex: 1;
    }

    .event-body {
        flex-direction: column;
        gap: 4px;
    }

    .track-form-section {
        padding: 36px 20px;
        margin-top: 16px;
    }

    .track-form-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 16px;
    }

    .track-form-icon i {
        font-size: 22px;
    }

    .form-heading {
        font-size: 20px;
    }

    .event-time {
        font-size: 10px;
    }
}