/* 现代物流查轨迹 - 前台样式 */

.mlt-container {
    --mlt-primary: #2563eb;
    --mlt-primary-light: color-mix(in srgb, var(--mlt-primary) 12%, white);
    --mlt-radius: 20px;
    --mlt-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    max-width: 720px;
    margin: 0 auto;
    padding: 12px 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    color: #1f2937;
    line-height: 1.6;
    box-sizing: border-box;
}

/* 搜索卡片 - 更大更醒目 */
.mlt-search-card {
    background: #fff;
    border-radius: var(--mlt-radius);
    box-shadow: var(--mlt-shadow);
    padding: 40px 28px 36px;
    margin-bottom: 28px;
    border: 1px solid #f3f4f6;
}

.mlt-title {
    margin: 0 0 28px;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    color: #111827;
    letter-spacing: -0.02em;
}

.mlt-search-form {
    margin: 0;
}

.mlt-input-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mlt-input {
    width: 100%;
    height: 56px;
    padding: 0 20px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    font-size: 17px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
    box-sizing: border-box;
}

.mlt-input:focus {
    border-color: var(--mlt-primary);
    box-shadow: 0 0 0 4px var(--mlt-primary-light);
    background: #fff;
}

.mlt-btn {
    width: 100%;
    height: 56px;
    padding: 0 28px;
    background: var(--mlt-primary);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mlt-btn:hover {
    filter: brightness(1.08);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--mlt-primary) 40%, transparent);
}

.mlt-btn:active {
    transform: scale(0.98);
}

.mlt-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 结果卡片 */
.mlt-result-card {
    background: #fff;
    border-radius: var(--mlt-radius);
    box-shadow: var(--mlt-shadow);
    border: 1px solid #f3f4f6;
    overflow: hidden;
    animation: mltFadeIn 0.35s ease;
}

@keyframes mltFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.mlt-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 28px;
    background: linear-gradient(135deg, var(--mlt-primary-light), #fff);
    border-bottom: 1px solid #f3f4f6;
}

.mlt-tracking-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mlt-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.mlt-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: 0.02em;
}

.mlt-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: var(--mlt-primary);
    color: #fff;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--mlt-primary) 35%, transparent);
}

/* 元信息网格 */
.mlt-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 20px 28px;
    border-bottom: 1px solid #f3f4f6;
}

.mlt-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mlt-meta-label {
    font-size: 12px;
    color: #9ca3af;
}

.mlt-meta-value {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

/* 时间轴 */
.mlt-timeline {
    padding: 24px 28px 28px;
}

.mlt-timeline-title {
    margin: 0 0 20px;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.mlt-timeline-list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.mlt-timeline-list::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: #e5e7eb;
}

.mlt-timeline-item {
    position: relative;
    padding-left: 32px;
    padding-bottom: 24px;
}

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

.mlt-timeline-dot {
    position: absolute;
    left: 0;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #d1d5db;
    z-index: 1;
    transition: border-color 0.2s;
}

.mlt-timeline-item.is-latest .mlt-timeline-dot {
    border-color: var(--mlt-primary);
    background: var(--mlt-primary);
    box-shadow: 0 0 0 4px var(--mlt-primary-light);
}

.mlt-timeline-content {
    background: #f9fafb;
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px solid #f3f4f6;
}

.mlt-timeline-item.is-latest .mlt-timeline-content {
    background: var(--mlt-primary-light);
    border-color: color-mix(in srgb, var(--mlt-primary) 20%, transparent);
}

.mlt-timeline-time {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 4px;
}

.mlt-timeline-status {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.mlt-timeline-item.is-latest .mlt-timeline-status {
    color: var(--mlt-primary);
}

.mlt-timeline-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 2px;
}

.mlt-timeline-location svg {
    flex-shrink: 0;
}

.mlt-timeline-desc {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

.mlt-empty-traj {
    padding: 32px;
    text-align: center;
    color: #9ca3af;
}

.mlt-note {
    padding: 16px 28px 24px;
    font-size: 13px;
    color: #6b7280;
    border-top: 1px solid #f3f4f6;
}

/* 错误提示 */
.mlt-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 16px 20px;
    border-radius: 12px;
    text-align: center;
    font-size: 15px;
    animation: mltFadeIn 0.3s ease;
}

/* 响应式 */
@media (max-width: 600px) {
    .mlt-container {
        padding: 8px 12px;
    }

    .mlt-search-card {
        padding: 36px 22px 32px;
    }

    .mlt-title {
        font-size: 1.6rem;
        margin-bottom: 24px;
    }

    .mlt-input {
        height: 54px;
        font-size: 16px;
    }

    .mlt-btn {
        height: 54px;
        font-size: 17px;
    }

    .mlt-result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 18px 20px;
    }

    .mlt-meta-grid,
    .mlt-timeline {
        padding-left: 20px;
        padding-right: 20px;
    }

    .mlt-note {
        padding-left: 20px;
        padding-right: 20px;
    }
}
