/* Shipment Tracker - Frontend Styles */

.sht-tracker-widget {
    max-width: 640px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.sht-track-form {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.sht-track-form input[type="text"] {
    flex: 1;
    padding: 12px 14px;
    font-size: 15px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease;
}

.sht-track-form input[type="text"]:focus {
    border-color: #2c6ecb;
    box-shadow: 0 0 0 3px rgba(44, 110, 203, 0.12);
}

.sht-track-form button {
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 600;
    color: #191919;
    background: #FFAD2B;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.sht-track-form button:hover {
    background: #e89a1e;
}

.sht-track-form button:disabled {
    background: #ffd28a;
    cursor: not-allowed;
}

.sht-track-result {
    min-height: 0;
}

.sht-error {
    padding: 14px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 8px;
    font-size: 14px;
}

.sht-loading {
    padding: 20px;
    text-align: center;
    color: #667085;
    font-size: 14px;
}

.sht-card {
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    padding: 24px;
    background: #fff;
}

.sht-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef0f3;
}

.sht-tracking-num {
    font-size: 13px;
    color: #667085;
    margin-bottom: 4px;
}

.sht-tracking-num strong {
    color: #1d2939;
    font-size: 15px;
    letter-spacing: 0.3px;
}

.sht-status-pill {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: #eef2ff;
    color: #3538cd;
}

.sht-status-pill.delivered { background: #ecfdf3; color: #027a48; }
.sht-status-pill.in_transit, .sht-status-pill.shipped, .sht-status-pill.estimated_arrival, .sht-status-pill.customs_clearance, .sht-status-pill.arrived_fr_logistics { background: #eff8ff; color: #175cd3; }
.sht-status-pill.pending, .sht-status-pill.processing { background: #fffaeb; color: #b54708; }
.sht-status-pill.delayed { background: #fef3f2; color: #b42318; }
.sht-status-pill.cancelled { background: #f2f4f7; color: #475467; }

.sht-route {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #475467;
    margin-bottom: 22px;
}

.sht-route div strong {
    display: block;
    color: #1d2939;
    font-size: 14px;
    margin-top: 2px;
}

.sht-progress-track {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin: 28px 0 8px;
}

.sht-progress-track::before {
    content: "";
    position: absolute;
    top: 11px;
    left: 11px;
    right: 11px;
    height: 3px;
    background: #e4e7ec;
    z-index: 0;
}

.sht-progress-track .sht-progress-fill {
    position: absolute;
    top: 11px;
    left: 11px;
    height: 3px;
    background: #2c6ecb;
    z-index: 1;
    transition: width 0.3s ease;
}

.sht-progress-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.sht-progress-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e4e7ec;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sht-progress-step.done .sht-progress-dot {
    border-color: #2c6ecb;
    background: #2c6ecb;
}

.sht-progress-step.done .sht-progress-dot::after {
    content: "✓";
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.sht-progress-label {
    margin-top: 8px;
    font-size: 11px;
    text-align: center;
    color: #98a2b3;
    max-width: 90px;
    line-height: 1.3;
}

.sht-progress-step.done .sht-progress-label {
    color: #344054;
    font-weight: 600;
}

.sht-progress-date {
    margin-top: 3px;
    font-size: 10.5px;
    color: #b0b7c3;
    text-align: center;
}

.sht-progress-step.done .sht-progress-date {
    color: #2c6ecb;
    font-weight: 600;
}

.sht-notes {
    margin-top: 20px;
    padding: 12px 14px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 13.5px;
    color: #475467;
}

.sht-updated {
    margin-top: 14px;
    font-size: 12px;
    color: #98a2b3;
}

.sht-timeline {
    margin-top: 24px;
    border-top: 1px solid #eef0f3;
    padding-top: 18px;
}

.sht-timeline h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #98a2b3;
    margin: 0 0 14px;
}

.sht-timeline-item {
    display: flex;
    gap: 12px;
    padding-bottom: 16px;
    position: relative;
}

.sht-timeline-item::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 14px;
    bottom: 0;
    width: 1px;
    background: #e4e7ec;
}

.sht-timeline-item:last-child::before {
    display: none;
}

.sht-timeline-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2c6ecb;
    margin-top: 5px;
    flex-shrink: 0;
}

.sht-timeline-content strong {
    display: block;
    font-size: 14px;
    color: #1d2939;
}

.sht-timeline-content span.sht-tl-meta {
    font-size: 12.5px;
    color: #98a2b3;
}

.sht-timeline-content p {
    margin: 2px 0 0;
    font-size: 13.5px;
    color: #475467;
}

@media (max-width: 480px) {
    .sht-track-form { flex-direction: column; }

    .sht-card { padding: 18px; }

    /* Vertical row list on mobile instead of cramped horizontal steps */
    .sht-progress-track {
        display: block;
        margin: 20px 0 4px;
    }

    .sht-progress-track::before,
    .sht-progress-track .sht-progress-fill {
        display: none;
    }

    .sht-progress-step {
        position: relative;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        padding: 9px 0;
        gap: 12px;
    }

    .sht-progress-step:not(:last-child)::after {
        content: "";
        position: absolute;
        left: 11px;
        top: 24px;
        bottom: -9px;
        width: 3px;
        background: #e4e7ec;
        z-index: 0;
    }

    .sht-progress-step.done:not(:last-child)::after {
        background: #2c6ecb;
    }

    .sht-progress-dot {
        flex-shrink: 0;
        position: relative;
        z-index: 1;
    }

    .sht-progress-label {
        margin-top: 0;
        text-align: left;
        font-size: 13px;
        max-width: none;
        flex: 1;
    }

    .sht-progress-date {
        margin-top: 0;
        text-align: right;
        font-size: 11.5px;
        white-space: nowrap;
    }
}
